Click here to Skip to main content
15,893,668 members
Home / Discussions / Database
   

Database

 
AnswerRe: hi...How to store datas temp in database Pin
Leah_Garrett5-Jul-07 0:48
Leah_Garrett5-Jul-07 0:48 
QuestionSQL Database Backup Pin
allan.cawood4-Jul-07 23:27
allan.cawood4-Jul-07 23:27 
AnswerRe: SQL Database Backup Pin
Paul Conrad13-Jul-07 11:55
professionalPaul Conrad13-Jul-07 11:55 
GeneralRe: SQL Database Backup Pin
allan.cawood15-Jul-07 20:01
allan.cawood15-Jul-07 20:01 
GeneralRe: SQL Database Backup Pin
Paul Conrad15-Jul-07 20:11
professionalPaul Conrad15-Jul-07 20:11 
QuestionSDF files Pin
ShuklaGirish4-Jul-07 23:03
ShuklaGirish4-Jul-07 23:03 
QuestionComposite Primary keys - A question Pin
vagl4-Jul-07 23:00
vagl4-Jul-07 23:00 
AnswerRe: Composite Primary keys - A question Pin
Michael Potter5-Jul-07 5:01
Michael Potter5-Jul-07 5:01 
I prefer the second one. I assume that the reviewer is reviewing an employees actions on a particular project so I would revamp the ProjectReviews to look like this:
ReviewID (PK),
AssignID (FK - ProjectAssignment),
ReviewerEmployeeID (FK - Employee),
RevieweeEmployeeID (FK - Employee),
ReviewDate,
ReviewTask

The reason I would choose your second method is for maintenance reasons. I could look at the column structures and pretty much tell what links to what without having look too deeply into the FK constrants. This makes things much easier 2 years down the road.

I would enforce the relationship of the Reviewer/reviewee & AssignId in the ProjectReviews via a stored proceedure (or trigger). You could add deeper FK relationships to manage this for you but, the nature of the data does not seem to make it necessary. If a reviewer gets hit by a car and is removed from a project, is it necessary to remove all of his/her reviews? Only you can answer questions like that.

If you are expecting millions of records, then the second method will execute joins faster because of the smaller keys. If your database is small, the time saved will not be noticeable.
GeneralRe: Composite Primary keys - A question Pin
vagl5-Jul-07 19:59
vagl5-Jul-07 19:59 
Questionsyntax error in insert into statement Pin
magedhv4-Jul-07 22:53
magedhv4-Jul-07 22:53 
AnswerRe: syntax error in insert into statement Pin
Krish - KP4-Jul-07 23:09
Krish - KP4-Jul-07 23:09 
QuestionImproving the database performance Pin
S.Rajeshwar4-Jul-07 22:21
S.Rajeshwar4-Jul-07 22:21 
AnswerRe: Improving the database performance Pin
Pete O'Hanlon4-Jul-07 22:32
mvePete O'Hanlon4-Jul-07 22:32 
AnswerRe: Improving the database performance Pin
N a v a n e e t h4-Jul-07 22:50
N a v a n e e t h4-Jul-07 22:50 
AnswerRe: Improving the database performance Pin
andyharman4-Jul-07 22:51
professionalandyharman4-Jul-07 22:51 
Questionsql stored procedure Pin
harithadotnet4-Jul-07 21:18
harithadotnet4-Jul-07 21:18 
AnswerRe: sql stored procedure Pin
Krish - KP4-Jul-07 21:24
Krish - KP4-Jul-07 21:24 
AnswerRe: sql stored procedure Pin
N a v a n e e t h4-Jul-07 22:24
N a v a n e e t h4-Jul-07 22:24 
QuestionHave problem with displaying columns as rows Pin
masyarial4-Jul-07 20:35
masyarial4-Jul-07 20:35 
AnswerRe: Have problem with displaying columns as rows Pin
Krish - KP4-Jul-07 21:22
Krish - KP4-Jul-07 21:22 
GeneralRe: Have problem with displaying columns as rows Pin
masyarial5-Jul-07 1:39
masyarial5-Jul-07 1:39 
GeneralRe: Have problem with displaying columns as rows Pin
Krish - KP9-Jul-07 22:23
Krish - KP9-Jul-07 22:23 
GeneralRe: Have problem with displaying columns as rows Pin
masyarial10-Jul-07 1:09
masyarial10-Jul-07 1:09 
GeneralRe: Have problem with displaying columns as rows Pin
Krish - KP10-Jul-07 17:33
Krish - KP10-Jul-07 17:33 
GeneralRe: Have problem with displaying columns as rows Pin
masyarial14-Jul-07 1:15
masyarial14-Jul-07 1:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.