-->
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: One database, multiple data models
PostPosted: Tue Jul 15, 2008 12:12 pm 
Newbie

Joined: Tue Jul 15, 2008 11:49 am
Posts: 1
I've just started with NHibernate and I've searched the forum and went over the documentation. There are articles about usage of multiple databases, but I'm still not clear about something - it is possible to achieve something like that:

Three data models (describing it with namespaces) and only one database:
-Company.CoreApplication.Model
-Company.ExtensionApplication1.Model
-Company.ExtensionApplication2.Model

-CoreApplication is a standalone application which doesn't know anything about ExtensionApplication, it only knows about CoreApplication.Model in it's own assembly.
-On the other hand ExtensionApplication1 knows about (and uses) both CoreApplication.Model and ExtensionApplication1.Model, it somehow inherits from it.
-ExtensionApplication2 knows about (and uses) both CoreApplication.Model and ExtensionApplication2.Model.
-ExtensionApplication1.Model and ExtensionApplication2.Model are not referenced in any way, they only include CoreApplication.Model

All models use the same database, all tables for CoreApplication.Model are selfsufficient, but in tables for ExtensionApplication1.Model and ExtensionApplication2.Model,, there are some foreign keys referencing to CoreApplication.Model's tables.

Application modules then use the data model for their own application.


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.