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.
| Author |
Topic |
|
Toadums
Starting Member
2 Posts |
Posted - 2009-05-19 : 19:05:41
|
| Hey,So im working on my first database...and have read up on database normalization and stuff...but I am still a little hazy on the concept/execution. (although i think i understand the concept, just not how to USE it)...So for an example, ill just use my database..It is going to be a timesheet for my work. everyones time sheet data will be stored in it and will be query-able and stuff, so the accountant can look at each person. There are a few things that are going to always be the same, depending on which project a person is on. For example, project number AL990 may be installing security cameras in a building. Therefore, the project NAME, CLIENT and TYPE will all be the same, depending on which project NUMBER it is...So what I want is that someone picks a project number and the other information will auto populate (another problem i know, but I can figure the coding out :P [using php/html])...This is where my question comes. I understand that in a normalized DB, information is in only one spot. But what i want, is a seperate database that holds all the projects, and info about them (the things listed in caps above)...and then in a few different databases this info will be used.So Does this mean that in the tblTimesheet that I currently have set up, I will have a field for:Name, Date, hours, project number, project name, client, type, description, etc..? or since the information is already in another database, would I not include it...? That is where I get confused about normalization...whether or not this is considered 'repeating' data...Hopefully this makes sense, post back if you need any clarification :)Thanks!Paul |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-05-20 : 04:21:03
|
| I think you may be a little confused between front end and database here.You would probably have the following tables:Timesheet - holds all factual information e.g EmployeeID, ProjectID, StartDateTime, EndDateTime, Rate.Employee - EmployeeId, Name, Address etc..Project - ProjectID, Name, Type, ClientIdClient - ClientId, Name, Address, etc..Then you would write queries to join the information in your front end, these may be stored procedures/views or even on the front-end (I wouldn't suggest this last one, but you may need to know about it). |
 |
|
|
Toadums
Starting Member
2 Posts |
Posted - 2009-05-20 : 12:33:24
|
quote: Originally posted by RickD I think you may be a little confused between front end and database here.Then you would write queries to join the information in your front end, these may be stored procedures/views or even on the front-end (I wouldn't suggest this last one, but you may need to know about it).
Ah, front end/back end...i did some researching on this topic aswell. but I think I understand it now. I doesn't have to be all on the same database from the start...just as long as when i make my display form, it captures everything! Thanks!!! I will work with this see what I get :) |
 |
|
|
|
|
|
|
|