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
 New to SQL Server Programming
 table design-how to

Author  Topic 

kampand
Starting Member

1 Post

Posted - 2012-01-21 : 04:54:35
Kindly provide with best meathod
.Database type: Health care

What i would like to do: instead of making tables like staff,employee,doctors etc i would like to make a generic person table provide a category (as above to person),then fill standard details common to all. After that would like to fill details specefic to particular person of particular category ( ie person who is in staff will have salary details)

Problam is how do i make table choosing person and category details

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-01-21 : 07:05:14
What you have described is possible and probably a good design strategy depending on the expected data. There are some details and examples here: http://www.sqlteam.com/article/implementing-table-inheritance-in-sql-server

SQL 2008 supports sparse columns, so if storage is the main consideration, you want to consider using sparse columns in some cases. However, I personally prefer the "simulating O-O approach" which you have described for its cleanliness.
Go to Top of Page
   

- Advertisement -