Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Hierarchical Design

Author  Topic 

scantoria
Starting Member

15 Posts

Posted - 2008-03-27 : 12:30:16
I am designing database that will store clinic and doctor information.

1) A clinic can have doctors and staff members.
2) A clinic can belong to another clinic.
3) A doctor can practice on his/her own practice/clinic and still belong to another clinic.

I will email my current design if needed.

Thanks,

Stephen Cantoria
scantoria@msn.com

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-03-27 : 13:00:09
http://www.datamodels.org

check out normalization rules.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-03-27 : 13:46:20
A datamodel is a critical step in the design process so take the time to get it right. This topic (I had to search awhile to find it) had a nice discussion about modeling in general. Check out the whole thing but I liked byrmol comments:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47943


I'm not necessarily recommending you do it this way but it would be worth considering the concepts in this aritical (written by Jeff Smith):
http://www.sqlteam.com/article/implementing-table-inheritance-in-sql-server

It has some similarities to your situation since a single entity could potentially be any of a (clinic, doctor, staffmember)

However you decide to model the entities you should be aware of, and take into consideration the classic ways to model a hierarchy. Usually a table with at least (ID, ParentID). 2005 has a nice feature to retrieve the hierarchy using recursion and cte. Check out WITH in Books Online.

Be One with the Optimizer
TG
Go to Top of Page

scantoria
Starting Member

15 Posts

Posted - 2008-04-03 : 14:06:26
TG,

The Implementing Table Inheritance example will help alot.

Thanks,

Steve

Stephen Cantoria
scantoria@msn.com
Go to Top of Page
   

- Advertisement -