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
Upgrade from SQL Server 2000 to SQL Server 2008
Performing search on MS SQL Server 2008 database
Taking incremental backups from MS SQL Server 2008 Database
Copying Data from SQL Server 2008 to SQL Express
How to install softwares on client computer from server computer in Visual Basic.Net 2008.
Latest Forum Questions From The Same Category
Help to get SQL output
how to restore my sql database from my hosting provider?
SQL query to update date range
Add allowance to employee table is wrong or true according to my case
how to remove trailing zeroes in a decimal in sql server
Required Union All Result in two different column
Sql Multiple table data retrival
Table Translation records
How select huge Data from sql without take long time?
Passing using parameter in store procedure get the top3 record from the table
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