views:

40

answers:

3

Hey,

I have a entity diagram from some analysis that I'd like to have someone look over. For some reason the System object just doesn't seem right to me. Is there a better way to relate the objects?

Its basically a user authentication/management system in its infancy.

http://www.dumpt.com/img/viewer.php?file=zlh8ltbtho4mutbbb3yk.gif

Cheers, Mike

A: 

Considering the password has a 1-to-1 relationship with the User, and is not keyed to any other tables, I'd suggest saving yourself an inner join and just making it another column in the property table. Otherwise, looks pretty good.

callingshotgun
I'd agree.. However its not for a database design but rather just an analysis model of OO design.
Mike
This is not an OO design model as OO's whole purpose is to unify (and encapsulate) **behavior** with **data**. This diagram just shows data, so it's a DB design.
Frank Krueger
Frank can you expand on that? What would I need to change to make it more of an OO design model?
Mike
+1  A: 

User and Company should have a common base class (they both have names and mail addresses), then you can link the System to this base class. That's a common pattern for business modeling, look for example, into chapter one of Martin Fowler's book "Analysis Patterns".

EDIT: Or, if you think this makes more sense, you use System as the base class itself, put the EMail adress there (and perhaps give System a better name like LegalPerson, CorporateBody or something like that).

Doc Brown
Ok. I can see how that would clean it up. So basically the System object is really the core object that drives the authentication and management of the users.
Mike
A: 

It's hard to evaluate the "rightness" of something without some metrics of comparison. The easiest metrics for class designs are queries.

Think up as many of the queries that you will eventually want to ask of this data. Write them down and see how the design supports them. If you're unhappy, try another design and see how the queries look then.

Frank Krueger