kenwvs Posted September 2, 2006 Share Posted September 2, 2006 I have worked through my database trying to seperate the fields out, to normalize my database. Here are the various fields and tables, as I see they should be set up. I would appreciate any assistance, in making sure that I have it set up in the most efficient manner.I have a form set up where an employee will fill it out when an engine fails. The pertinent information is filled out, including images, then a copy of the information is sent to other employees (selected in the form). The Manager will then assign a purchase order to this work order, along with his comments. The employee can then add remarks to update the work order and when the job is completed, he will include a final report including the total cost of repairs.Table 1 - Work OrderWork Order # (generated using MMhhmmss format), Serial #, Hours on Unit, Site, Starts on Engine, Time Generated, Issue, Severity, Resolution, Safety, Assistance Required, Purchase Order #, Manager Comments, ID (Foreign Key)Table 2 - EmployeeName, Email Address, Password, Position (manager or technician), ID (Foreign Key)Table 3 - ImagesUpload 1, Upload 2, Upload 3, Upload 4, ID(Foreign Key)Table 4 - PartsParts # 1, Parts Description 1, etc. through to room for seven listings, and ID (Foreign Key)Table 5 - CommentsUpdate Remarks, ID(Foreign Key) Link to comment https://forums.phpfreaks.com/topic/19481-database-normalization/ Share on other sites More sharing options...
fenway Posted September 2, 2006 Share Posted September 2, 2006 Looks fine, except for the the hard-coded 4 uploads and 7 listings -- you should break these out into lookup tables. Link to comment https://forums.phpfreaks.com/topic/19481-database-normalization/#findComment-84617 Share on other sites More sharing options...
Barand Posted September 3, 2006 Share Posted September 3, 2006 Lots of foreign keys but not a primary key in sight Link to comment https://forums.phpfreaks.com/topic/19481-database-normalization/#findComment-84918 Share on other sites More sharing options...
kenwvs Posted September 3, 2006 Author Share Posted September 3, 2006 hmmmm, would I not use the fk as the primary key as well. I have made all of the **_id columns my primary key. Do I need to make a separate foreign key?EDIT: I HAVE THIS ISSUE FIGURED OUT AS FAR AS PRIMARY AND FOREIGN KEYS....THANKS ALL!! Link to comment https://forums.phpfreaks.com/topic/19481-database-normalization/#findComment-84923 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.