Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


composite primary keys with amendment in table


composite primary keys with amendment in table

Author
Message
silentbeautybalaji
silentbeautybalaji
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 149
hi plz help me

i want help from u guys

example
grade internal grade sno amendno manpower required cost
developer developer1(1year exp) 1 0 3 10000
developer developer2(2year exp) 2 0 2 12000
developer developer3(3 year exp) 3 0 1 15000
senior developer senior grade1 1 0 4 100000
senior developer senior grade1 1 1 3 750000

like that in a table.
can anyone help me for which columns primary columns is need.
how to perform these operations in query wise in T sql.
regards
BAlaji.N
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16542 Visits: 16997
silentbeautybalaji (10/7/2013)
hi plz help me

i want help from u guys

example
grade internal grade sno amendno manpower required cost
developer developer1(1year exp) 1 0 3 10000
developer developer2(2year exp) 2 0 2 12000
developer developer3(3 year exp) 3 0 1 15000
senior developer senior grade1 1 0 4 100000
senior developer senior grade1 1 1 3 750000

like that in a table.
can anyone help me for which columns primary columns is need.
how to perform these operations in query wise in T sql.
regards
BAlaji.N


Hi and welcome to SSC. We can't even take a shot at what you should use for a primary key. To be honest it doesn't like you have a very good candidate key here at all.

You might want to start here so you understand what a primary key is. http://www.w3schools.com/sql/sql_primarykey.asp

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3093 Visits: 4639
silentbeautybalaji (10/7/2013)
can anyone help me for which columns primary columns is need.


My guess is that data modeling for this project is half cooked - at best.

Do you have an E/R model?

Either way, when selecting a Primary Key, a Natural PK I should add, you should ask yourself; "What column/s in this table uniquely identify a member of this entity?"

_____________________________________
Pablo (Paul) Berzukov

Author of Understanding Database Administration available at Amazon and other bookstores.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search