?
Solved

ER Diagram - Which is the better design?

Posted on 2008-11-17
9
Medium Priority
?
5,018 Views
Last Modified: 2012-05-05
See Diagram Attached,

which is the better design and why?
ER Diagram 1 or 2 or 3

Entity-Relationship-Diagram123.jpg
0
Comment
Question by:Khou
  • 6
  • 2
9 Comments
 
LVL 17

Expert Comment

by:HoggZilla
ID: 22981875
Please explain, what are you trying to accomplish? The best model for ____?
0
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 400 total points
ID: 22984778
I would say that #2 is superior to #1 b/c #1 needlessly includes AccountID in a couple of tables.

It appears that #3 eliminates the Profile table.  I don't know ... Does what you're modeling really have a "profile" entity?
0
 

Author Comment

by:Khou
ID: 22990580
@DanielWilson

Thanks

In regards to your comment, If you choose #2, then you would have to find the "AccountID" then match it with the "ProfileID" - thats ok But would it not be better to just use AccountID for everything per user, instead of having an additional ProfileID? (See Diagram attached)

Reason why there is a profile table in the first place: is.............The Profile table keeps all the user's information. There might be another table called "Transaction" under this would be all transactions performed by the user.

But Is there a real need for "Profile" table to have its own "Primary" Key? I would say no, just use AccountID, There would only be a need for ProfileID if the user is to have multiple profiles, if this is not the case, there should be no need to make profileid a primary key, is this correct? or there's an advantage of having a seperate primarykey for each table such as the Profile Table.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Khou
ID: 22990590
Attached, ProfileID removed, replaced with AccountID,

is this better than #2? for the situtation above.

erdmod.gif
0
 

Author Comment

by:Khou
ID: 22990611
REF: Comment - 11.19.2008 at 11:49AM EST, ID: 22990580
   

There seems to be a few words cut off


Correction: Is there a real need for the "Profile" table to have its own "Primary" Key?
I would say no, just use a single AccountID per user. There would only be a need for ProfileID if the user is to have multiple profiles, if this is not the case, there should be no need to make profileid a primary key, is this correct? or there's an advantage of having a seperate primarykey for each table such as the Profile Table.


0
 

Author Closing Comment

by:Khou
ID: 31517681
Good answer! You got it! 100 points. Thanks
0
 
LVL 32

Expert Comment

by:Daniel Wilson
ID: 23003624
Is teh Profile - Account relationship 1-1? If so, merge the tables into 1.  If not, each table needs its own PK.
0
 

Author Comment

by:Khou
ID: 23003659
Unable to merge profile with account, its rather too complicated right now.

Profile has its own key.
Account has its own key.

In the system Tables that do not have its own key are the joining tables for "many to many" relationships. Other than that every table has its own key.


Went with option #2.

0
 

Author Comment

by:Khou
ID: 23003672
Not that it can not be merged, its better if it was not merged.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question