Clock - table design

What is the best design for an I / O table?

Do you save the bundle in / in the same table or separate tables? Why?

Change . Watch employees pounce at the beginning of their shift and knock out at the end of their shift. Hourly - exempted employees must pick up / go out for lunch in addition to to / from the beginning / end of the day.

+4
source share
9 answers

Just think of it as an event table, with attributes for the usual who, what (punched in or out), when and where. (As probably not applicable in this case.)

+10
source

, PUNCH IN PUNCH OUT, ,

, , , , "" ( ), , ; - , - , , , , , out

: /

, () , 1:1 ,

EDIT: , OP , . , , ; , / , .

+5

. . . , , , . , , .

: , . , - , .

Edit: , . (, ) .

+3

// - , . , :

Punch In:

  • .

Punch Out:

  • Punch In Punch Out, Punch Out .
  • .

( Punch Out Punch In ), ( , null), , , .

, , Punch Out Punch In - , , In/Out/In/Out..., - , , , .

+2

, : , , ( , "" "" ) ; /, "in" "out" .

, . ? (, ) . , , , , - , 24 , 16 . .

, ( , , , / , , - ).

, , , , , , . , /, (, , ), / .

+2
Table name: Sessions
Columns   : ID, UserID, Timestamp_IN, Timestamp_OUT

, , . . , IN OUT? ? Etc..

, . ? .

+1

UserID, Date, TimeIn, TimeOut, LunchStart LunchEnd . LunchStart LunchEnd NULL , .

, , . , .

+1

- make/buy, . , , , , . , , . , .

, , ...

+1

Waves / , . , . , , , .

, . (, ) , .

, , . , / .

, / SQL Server . SQL Server -, / .

: . , , .

"" . , "in" "out" punch.

, , /; , , , . - / , , In/Out , .

, :

  1. "" , EmployeeNumber, TimeStamp PunchDevice - . , , , .
  2. In/Out, EmployeeNumber, InTimeStamp OutTimeStamp.
  3. , . LastTimestamp, "raw" In/Out.

Key In/Out Personnel /NULL, ​​ In/Out, InTimeStamp TimeStamp "" . "/" "" "/".

In/Out Personnel , In/Out TimeStamp "raw" OutTimeStamp. / Personnel.

, . , , Entry/Exit, , - . . 7 . , "" , 7 ; .

, , 8 , . , 8 , .

I apologize for the length of this, but I felt that the great answers that were given here were important in order to get a more complete explanation of the context. Again, the waves sent a question on my behalf, and I essentially “captured” the stream. Hope he's alright.

Yours faithfully,

Steve Erbach
Neenah, WI

PS, I would like to pay tribute to those who had helpful answers. Can I do this as a "thread hijacker"?

0
source

All Articles