The Database Design Resource Center
The Database Design Resource Center
 
 FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in   The Website
Removing duplicate tables from model.

 
Post new topic   Reply to topic    Database Design Resource Forum: Forum Index -> Entity Relationship modeling
 Display posts from previous 
Display posts from previous:   

 Removing duplicate tables from model. 
Author Message
enthusiast
User


Joined: 01 Feb 2010
Posts: 1
Location: Slovakia

PostPosted: Mon Feb 01, 2010 3:10 pm    Post subject: Removing duplicate tables from model. Reply with quote

Hello,

I'm building model that tracks event history for classes, class students and class masters.
I now have duplicated tables for event for each of these entities.
Id like to have only one set of tables for events and event types.

Diagram is better way to describe what I mean so here:
http://yfrog.com/jndiagramp

ClassMasters and ClassStudents are weak entities derived from Class and Person (not shown on diagram).
Each entity type may have several different types of history events.

It needs some kind of intermediate entity, so far i failed every attempt to create one because I can't enforce full referential integrity on it (e.g. when student is deleted, all history events go with him).
I that even possible to create such entity?

EDIT: preferably, I would stay away from triggers or stored procedures

Thank you.
View user's profile Send private message ICQ Number

  
Author Message
peter
User


Joined: 09 Nov 2007
Posts: 81
Location: Berlin, Germany

PostPosted: Tue Feb 09, 2010 1:21 am    Post subject: Reply with quote

Hello enthusiast,

you say
Quote:
ClassMasters and ClassStudents are weak entities derived from Class and Person (not shown on diagram).
Each entity type may have several different types of history events.

So where are the duplicated tables for event for each of these entities? You say there are different types of history events. That means every event history has it's own meaning. And because ClassMasters and ClassStudents are weak entity types they inherit their key attributes to the corresponding history entity type. So they have to be different!

Pls correct me if I am wrong!

Quote:
Id like to have only one set of tables for events and event types.

If you only have one set how does the history events differ from each other? You might create a generalised supertype. But ClassMasters and ClassStudents will require a relationship to the subtypes. Otherwise you lose some imformation.
_________________
Peter
Moderator
View user's profile Send private message Visit poster's website

Post new topic   Reply to topic    Database Design Resource Forum: Forum Index -> Entity Relationship modeling All times are GMT
Page 1 of 1
View previous topic :: View next topic  

 
Jump to:  
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
You cannot vote in polls in this forum


Site Build It!

Copyright © 2004-2008 www.databasedesign-resource.com / Alf A. Pedersen
All rights reserved.
All information contained on this website is for informational purposes only.
*Disclaimer: www.databasedesign-resource.com does not warrant any company, product, service or any content contained herein.

Copyright acknowledgement note:

The name Oracle is a trademark of Oracle Corporation.
The names MS Access/MS SQL Server are trademarks of Microsoft Corporation.
Any other names used on this website may be trademarks of their respective owners, which I fully respect.


Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS :: phpbb Templates available at GemViper.com :: Contents © Database Design Resource Forum: