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.
Author |
Topic |
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2014-07-16 : 03:46:30
|
Hi,I have a table which stores the details of a project,its fine till here.Now we have intorduced the concept of child projects,i.e each project can have multiple child projects.So,whats the best way to go.1.single table with parent and child projects or2.seperate table for projects and child projects,where child project table will have link to main projects table with project_id as fkey.Thanks,Javeed.Javeed Ahmed |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-07-16 : 06:31:05
|
Either one, depending on what you feel comfortable with and depending on the nature of the data would work. If both parent and child projects have exactly similar (or almost similar) characteristics, I would tend towards using a single table with an additional column for parent project id. If you were to use two tables, you would need to have two similar tables with same columns. Also, some day, if you decide that you want to have more levels - i.e., grand children - using one table would make it easier. |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2014-07-16 : 07:51:19
|
Thanks JamesJaveed Ahmed |
|
|
|
|
|