Hello, a very good eveing to you all.
I have a question regarding er modelling that has been plaguing me for a few days now.
I will have to develop an eer from my er and the simple problem is as follows.
Suppose i have 2 entities University and School which are stated explicitly.
Now suppose a University provides a studentlibrary (entity) with attributes staff books etc...
And suppose School provides a publicLibrary (entity) with identical attributes as the above (i.e staff books etc..) and both have same primary key
whats the best way to represent this in an er model.I have just [university] (relationshiprovides) [studentlibrary] and also [school] (relationshiprovides) [publiclibrary].this seems a bit redundant though.Should i just have 1 entity called [ibrary]instead of the [studentlibrary], [publiclibrary] entities.if i do this how will it play in my eer model,
thanking you all.
use two entities, [studentlibrary] and also [publiclibrary]
trying to combine them will lead to headaches
when the time comes to implement them in a physical database, there are all kinds of tricks that you can use in order to implement only one library table (e.g. mutually exclusive optional foreign keys to two different parent tables), but for conceptual and logical modelling, you definitely want to keep them separate
gotcha.makes sense!just to clarify even though they have the exact same attributes and primary key, ill keep them seperate.Will they still be seperate in the EER model too?
Finally for what reason would it cause headaches combining them (just curious)!
thanks a million for your help!
hi thanks for both of your help.Just to briefly inform people reading this topic, EER modelling means "Enhanced Entity Relationship" Modelling and enhances an ER model to include generalization/specialization, inheritance, disjoint/non-disjoint relationships between sub and super classes and participation constraints etc...
In my eer model i now believe i will have a Library superclass that has entities (books, staff, members...) and it will have 2 subclasses universityLibrary and SchoolLibrary within a disjoint relationship, meaning that a library can be a university library "OR" a school library but never both because they are seperate in their own contexts even though they have the same entities.
One final question
within my "ER" diagram (as r937 commented) should i have something like:
and then have superclass (library) and subclasses (studentlibrary and universitylibrary entities) in my eer diagram as mentioned the part about my EER diagram and similar to what Mr. Andrews posted?
again many thanks for your informative help and contribution,