You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nichi <ni...@yahoo.com> on 2009/03/18 21:48:09 UTC

Datastore(MySql)

Hi,

I am new to Jackrabbit. I configured Jackrabbit with datastore(MySql) but I
still can't see anything in the database. A table named datastore gets
created but nothing is getting added to it. My question is if there is a way
to see(in a readable format) how jackrabbit is storing information in the
database. Does it use the optimizations provided by the underlying database
for queries like join,etc?

Thanks,
Nichi
-- 
View this message in context: http://www.nabble.com/Datastore%28MySql%29-tp22587989p22587989.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Datastore(MySql)

Posted by Nichi <ni...@yahoo.com>.
  Thanks a lot. The link really helped
  -Nichi

Alexander Klimetschek wrote:
> 
> On Thu, Mar 19, 2009 at 8:44 PM, Nichi <ni...@yahoo.com> wrote:
>> Say, I have two tables Experiment and ExperimentData that I want to store
>> using Jackrabbit’s content repository.  Experiment has around a thousand
>> rows and ExperimentData tens of millions of rows. There is a one-to-many
>> relation between Experiment and ExperimentData.
>> My understanding is that each of these tables will be the node types and
>> rows in these tables would be the nodes, columns being their properties.
>> The
>> reference property would be used to implement the one-to-many relation.
>> Is my interpretation correct? Could there be a problem because of the
>> large
>> size of the database ?
> 
> A "generic" mapping like tables = node types and rows = nodes would
> imply you get flat hierarchies with millions of child nodes of one
> "experiments" node. This is inefficient in Jackrabbit (we estimate the
> max. recommended number of child nodes per node at 10K). And
> completely misses the advantages of JCR modeling. You should rather
> find a good hierarchy for your data. Almost always working is the date
> of the item, creating subnodes like "2009/03/20/mydata1".
> 
> See also http://wiki.apache.org/jackrabbit/DavidsModel
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Datastore%28MySql%29-tp22587989p22674246.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Datastore(MySql)

Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Mar 19, 2009 at 8:44 PM, Nichi <ni...@yahoo.com> wrote:
> Say, I have two tables Experiment and ExperimentData that I want to store
> using Jackrabbit’s content repository.  Experiment has around a thousand
> rows and ExperimentData tens of millions of rows. There is a one-to-many
> relation between Experiment and ExperimentData.
> My understanding is that each of these tables will be the node types and
> rows in these tables would be the nodes, columns being their properties. The
> reference property would be used to implement the one-to-many relation.
> Is my interpretation correct? Could there be a problem because of the large
> size of the database ?

A "generic" mapping like tables = node types and rows = nodes would
imply you get flat hierarchies with millions of child nodes of one
"experiments" node. This is inefficient in Jackrabbit (we estimate the
max. recommended number of child nodes per node at 10K). And
completely misses the advantages of JCR modeling. You should rather
find a good hierarchy for your data. Almost always working is the date
of the item, creating subnodes like "2009/03/20/mydata1".

See also http://wiki.apache.org/jackrabbit/DavidsModel

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Datastore(MySql)

Posted by Nichi <ni...@yahoo.com>.

I got it. Thanks Alex.

Say, I have two tables Experiment and ExperimentData that I want to store
using Jackrabbit’s content repository.  Experiment has around a thousand
rows and ExperimentData tens of millions of rows. There is a one-to-many
relation between Experiment and ExperimentData.
My understanding is that each of these tables will be the node types and
rows in these tables would be the nodes, columns being their properties. The
reference property would be used to implement the one-to-many relation.  
Is my interpretation correct? Could there be a problem because of the large
size of the database ? 

Thanks,
Nichi


Also I am trying to understand how Jackrabbit works. 

Alexander Klimetschek wrote:
> 
> On Wed, Mar 18, 2009 at 9:48 PM, Nichi <ni...@yahoo.com> wrote:
>> I am new to Jackrabbit. I configured Jackrabbit with datastore(MySql) but
>> I
>> still can't see anything in the database. A table named datastore gets
>> created but nothing is getting added to it. My question is if there is a
>> way
>> to see(in a readable format) how jackrabbit is storing information in the
>> database. Does it use the optimizations provided by the underlying
>> database
>> for queries like join,etc?
> 
> The DataStore is used for larger binaries, typically the
> "jcr:content/jcr:data" property of an "nt:file" node. It comes into
> play when the binary is larger than the minRecordLength configured
> with the DataStore.
> 
> The database datastore uses a simple table for all binaries. It
> accesses the table always via the primary key, an id that is unique
> and is an md5 hash of the data. Therefor the primary key index that
> the DB creates for the table automatically is all "optimization" that
> happens there (and that is required).
> 
> For more info see also the wiki
> page:http://wiki.apache.org/jackrabbit/DataStore
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Datastore%28MySql%29-tp22587989p22607975.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Datastore(MySql)

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Mar 18, 2009 at 9:48 PM, Nichi <ni...@yahoo.com> wrote:
> I am new to Jackrabbit. I configured Jackrabbit with datastore(MySql) but I
> still can't see anything in the database. A table named datastore gets
> created but nothing is getting added to it. My question is if there is a way
> to see(in a readable format) how jackrabbit is storing information in the
> database. Does it use the optimizations provided by the underlying database
> for queries like join,etc?

The DataStore is used for larger binaries, typically the
"jcr:content/jcr:data" property of an "nt:file" node. It comes into
play when the binary is larger than the minRecordLength configured
with the DataStore.

The database datastore uses a simple table for all binaries. It
accesses the table always via the primary key, an id that is unique
and is an md5 hash of the data. Therefor the primary key index that
the DB creates for the table automatically is all "optimization" that
happens there (and that is required).

For more info see also the wiki page:http://wiki.apache.org/jackrabbit/DataStore

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com