-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: some problems with b2b site architecture
PostPosted: Fri Apr 22, 2005 1:51 am 
Newbie

Joined: Wed Apr 20, 2005 3:28 am
Posts: 1
I just had a chat to my PM with our b2b site architecture, and he gave out a drafted decision as follows:
Quote:
Some Domain object, such as MarketInfo and Product (or even as CompanyProfile, TrustProfile, Management, Certificates...), should be kind of independent to the main domain object Company. And if needed, just add a column named companyid in its database table and hook up to company table with a foreign key.


But, it will cause a design problem:
According to our legacy database design, which remains no surrogate keys and auto increment triggers, and if I need to get products from company, I must get a “comid” from http session, and then

Code:
List products = productManager.getProductsByCompanyId(comId);


I always feel like using hibernate in this way is so amateur,although I do be a rookie:), since I will never use object association at all.

However,based on my knowledge to hibernate, my ideal design is:
changing the schema of database table which needed to related to company table,adding the surrogate keys, oracle sequences and triggers as auto increment,adding a column named company_skid and hooking up to company table with a foreign key. Then configuring with some sorts of set or map in my *.hbm.xml, finally I can do like this:

Code:
List products = companyManager.getCompany(comId).getProducts();


On the other hand, if there are many associations to Company, it will be quite a heavy domain object,so now it seems my first solution is also valuable to my design.
Well, I am in such a dilemma. Any experienced designer can give me a trade-off?
Any help or insight into this problem would be much appreciated!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.