Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
SQL Server 2008 - Table - Clarifications
October 17, 2009
I am new to SQL Server 2008 database development.
Here I have a master table named 'Student' and a child table named 'Address'. The common column between these tables is 'Student ID'.
My doubts are:
> Do we need to put 'Address Id' in the 'Address' table and make it primary key? Is it mandatory?
( I won't be suing this 'Address Id' in any of my reports )
> Is Primary key column a must in any table?
Would you please help me on these.
Would you please also refer best links/tutorials for SQL Server 2008 database design practices (If you are aware of) which includes naming conventions, best practices, SQL optimizations etc. etc.
Posted Date: October 17, 2009 Points: 5
Yes if the Child table is
than you should put
as a primary key.
No its not necessary to have primary key in all the tables but its best SQL Practices to have primary in in all the table. It will help to fetch the record faster because index is been created in the primary key column and foreign key column automatically.
I would also recommend you to have foreign key
Mark As Answer
" if this post help you.
To post reply
Related Questions Related Questions
Table-Valued Parameters in Sql Server 2008
Sql SERVER 2008 ,automatice add all table of database this code what is problem plz suggest me
Get XML Data in datagridview from SQL SERVER Table
how to reset identity column value in a table in sql server
how to lock table in sql server
Latest Forum Questions From The Same Category
Split function for String in SQL Server
how to solve error in the storeprocedure
convert nvarchar sql server data type to number in ssis
while updating table...the old data should be save in another table
Updating Stored Procedure
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend