Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Which is Better Design and Faster

Author  Topic 

SD_Monkey
Starting Member

38 Posts

Posted - 2010-08-04 : 10:59:32
i am making a hrms database
i separately chuck the table of DTR

here is sample table

timein
-------
logid pk
logdate
logtime
empid

timeout
-------
logid pk
logdate
logtime
empid


which is better if i combine the field...

A maze make you much more better

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-08-04 : 11:13:40
i would put everything in one table.
and for each login and logout a new record, grouped by empID and logDate.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-08-04 : 11:39:04
[code]TimeLog
-------
LogID (identity) 1, 2, 3, 4 ...
EmpID (int) 1001, 1002 etc
Direction (char 1) 'I' or 'O'
LogTime (datetime, clustered) date AND time together!
[/code]


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-08-04 : 11:39:35
Also read this topic
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=148187


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -