Question about databases and foreign keys

From: Date: Mon, 15 Sep 2008 14:18:03 +0000
Subject: Question about databases and foreign keys
Groups: php.db 
Request: Send a blank email to php-db+get-45403@lists.php.net to get a copy of this message
Hi everyone, I just wanted to make sure that I am not making something more complicated then it has to be. I am working on a time clock application to use at my company, and so far, I have a login table, and with a foreign key that links to the time table. The thinking being, that when someone logs in, they get assigned there employee number, and then it adds a new record for that employee ID. All I will be doing with the info, is grabbing the total amount of time they were clocked in for each day, and then totaling for the week. I'm planning on using timestamps to store the actual time, hopefully making the math part easier :) Do I need the foreign key and the 2 tables? Or should I just add the column's into the database since it will be for a small company? Ideas? Suggestions? Thanks! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com japruim@raoset.com

« previous php.db (#45403) next »