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
 Problem in Databse Design

Author  Topic 

nozar
Starting Member

2 Posts

Posted - 2010-02-22 : 03:22:01
Hi, I have 10 tables and I need to enter primary key ID of one of these tables into interface table(s) (used as foreign key). In fact, I want to make relations between these 10 tables and the interfece table. I have two solutions: 1- assign 10 interface tables for all tables and insert FK to the related tables. 2- create one table and insert FK and TableName into it. which one opf them is best regarded to simpleness(in design and making query) and optimization?
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-22 : 08:51:03
you can keep single table and assign all ids to it. but didnt understand why you need to store table name in it though.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

nozar
Starting Member

2 Posts

Posted - 2010-02-22 : 10:00:21
Thank you very much!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-22 : 10:50:32
quote:
Originally posted by nozar

Thank you very much!


You didnt answer my question yet

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -