Relational Database to CMS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Relational Database to CMS

nik10.mah

Hello everyone

,

I have to migrate my db tables into cms. I am quite confused in maintaining forgien key relations in CMS. I thought of following approach:-
For example, i have a USER table and a user can have multiple address. So i will create a DocumentType user and a CompoundType Address . In user documnet i have a property Address of type array which can accepts multiple addresses.

  • Is this approcah correct?
  • Will i be able to search my users on basis of particular property of address?
  • Will this approach cause an problems in the future?
Reply | Threaded
Open this post in threaded view
|

Re: Relational Database to CMS

Frank van Lankvelt
On Thu, Aug 23, 2012 at 10:21 AM, nik10.mah <[hidden email]> wrote:

> Hello everyone
> ,
>
> I have to migrate my db tables into cms. I am quite confused in maintaining
> forgien key relations in CMS. I thought of following approach:-
>
> For example, i have a USER table and a user can have multiple address. So i
> will create a DocumentType user and a CompoundType Address . In user
> documnet i have a property Address of type array which can accepts multiple
> addresses.
>
I'm not sure what you mean here with 'property' or 'type array'.  When
you have created the address compound type, you can add it to the user
document type.  Select 'multiple' to be able to add multiple addresses
to the same user.  When editing a user and adding an address, a child
node will be created of the compound type.

>
> Is this approcah correct?
> Will i be able to search my users on basis of particular property of
> address?

yes, every node is indexed by default.  So you can use regular JCR
Xpath or SQL[2] searches to find them.

Using such a child node property in faceted navigation is not
immediately possible, since the property has to be indexed with the
parent node (the document).  Let us know if you need this.

> Will this approach cause an problems in the future?
>
it seems quite reasonable, assuming that you don't need address reuse
and that the users you're describing are not intended to be cms or
site users.

cheers, Frank

>
>
>
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Relational-Database-to-CMS-tp7579126.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html