Click here to Skip to main content
15,899,634 members
Home / Discussions / Database
   

Database

 
QuestionTable Splitting ? Pin
cbhkenshin10-Feb-06 18:48
cbhkenshin10-Feb-06 18:48 
AnswerRe: Table Splitting ? Pin
Colin Angus Mackay10-Feb-06 22:40
Colin Angus Mackay10-Feb-06 22:40 
QuestionHow to eliminate duplicate rows from a table? Pin
jkrao10-Feb-06 17:33
jkrao10-Feb-06 17:33 
AnswerRe: How to eliminate duplicate rows from a table? Pin
Colin Angus Mackay10-Feb-06 22:48
Colin Angus Mackay10-Feb-06 22:48 
QuestionDatabase design Pin
TheJudeDude10-Feb-06 13:25
TheJudeDude10-Feb-06 13:25 
AnswerRe: Database design Pin
Ben Meyers10-Feb-06 18:29
Ben Meyers10-Feb-06 18:29 
GeneralRe: Database design Pin
TheJudeDude11-Feb-06 0:56
TheJudeDude11-Feb-06 0:56 
GeneralRe: Database design Pin
Rob Graham11-Feb-06 5:11
Rob Graham11-Feb-06 5:11 
You only need two tables.
1. Employee info : ID, Name , etc.
2. Timecard data: ID, TimeIn, TimeOut, Date, Work Type.

All clock in records for all employees go in the 2nd table.
A new record is added each ime a any employee cloicks in, clocking out updates the timeOut record (actually I would make a dateIn and date out field to allow for clock-out on different day than clock in.

There is no need for a per employee table, since the per employee DATA can be extracted and summarized by queries any time (for example: "select TimeIn ,TimeOut, WorkType from TimeCard where IX = xxx and date between zzz and www")

The goall\ is to store the data in a fashion that minimizes data duplication and data storage size while also minimizing complexity. A timecard table per employee makes no sense to me , and cerainly adds complexity. It would, on the other hand, make sense to have a "work Types" table, with WokTypeId,WorkTypeName as fields, so the id could be the only thing stored in the TimeCard table, thus minimizing data storage required, ad insuring data consistency (you can change the spelling or name used for work type, without breaking existing data, since the WorkID would remain the same). It also provides a quick place to build selection lists of the legal work types for your UI.


Absolute faith corrupts as absolutely as absolute power
Eric Hoffer

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke

GeneralRe: Database design Pin
Ben Meyers11-Feb-06 9:42
Ben Meyers11-Feb-06 9:42 
GeneralRe: Database design Pin
TheJudeDude13-Feb-06 7:14
TheJudeDude13-Feb-06 7:14 
QuestionWrong values being stored to table Pin
TheJudeDude10-Feb-06 11:37
TheJudeDude10-Feb-06 11:37 
AnswerRe: Wrong values being stored to table Pin
Paul Conrad10-Feb-06 12:26
professionalPaul Conrad10-Feb-06 12:26 
GeneralRe: Wrong values being stored to table Pin
TheJudeDude10-Feb-06 12:30
TheJudeDude10-Feb-06 12:30 
GeneralRe: Wrong values being stored to table Pin
Paul Conrad10-Feb-06 12:36
professionalPaul Conrad10-Feb-06 12:36 
GeneralRe: Wrong values being stored to table Pin
TheJudeDude10-Feb-06 12:45
TheJudeDude10-Feb-06 12:45 
QuestionHow to change DataGridView row bg color if modified Pin
BambooMoon10-Feb-06 6:12
BambooMoon10-Feb-06 6:12 
QuestionSQL Pin
dev_rfid10-Feb-06 3:02
dev_rfid10-Feb-06 3:02 
AnswerRe: SQL Pin
Michael Potter10-Feb-06 3:30
Michael Potter10-Feb-06 3:30 
GeneralRe: SQL Pin
dev_rfid10-Feb-06 3:42
dev_rfid10-Feb-06 3:42 
GeneralRe: SQL Pin
Michael Potter10-Feb-06 8:25
Michael Potter10-Feb-06 8:25 
GeneralRe: SQL Pin
dev_rfid10-Feb-06 20:57
dev_rfid10-Feb-06 20:57 
AnswerRe: SQL Pin
try8810-Feb-06 17:28
try8810-Feb-06 17:28 
GeneralRe: SQL Pin
Ben Meyers10-Feb-06 18:37
Ben Meyers10-Feb-06 18:37 
QuestionDifference btn join & subquery Pin
ramani.r9-Feb-06 20:07
ramani.r9-Feb-06 20:07 
AnswerRe: Difference btn join & subquery Pin
Neel p3-Mar-06 5:34
Neel p3-Mar-06 5:34 

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.