jojay Posted May 30, 2006 Share Posted May 30, 2006 Hi,I have a question regarding normalization: I have a company table which has following fields:compidcompnamecomploccompindustrycompjobtitlecompjobnocompjobdescMy question is: should job related fields come in same company table or have a subset table for job. Please advice. thanks. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 30, 2006 Share Posted May 30, 2006 I would have a seperate table for job and another one for industry. in the main table just use hte industryId and JobID Link to comment Share on other sites More sharing options...
jojay Posted May 30, 2006 Author Share Posted May 30, 2006 I would have a seperate table for job and another one for industry. in the main table just use hte industryId and JobID<{POST_SNAPBACK}> Hi,I have two more tables: Managers and EmpIs the below relationship good:tblcompanycompid -pkcompnamecomplocjobno - fkindustryid -fk-----tbljobjobtitlejobno -pk-----tblindustryindustryid -pkindustry-----tblmanagermanagernamemanagerlocmanagerphonemanageremail -pk-----tblempempidemplnameempfnameempphoneempemailmanageremail - fkcompid - fk Link to comment Share on other sites More sharing options...
aspnetguy Posted May 30, 2006 Share Posted May 30, 2006 looks good to me Link to comment Share on other sites More sharing options...
jojay Posted May 30, 2006 Author Share Posted May 30, 2006 looks good to me <{POST_SNAPBACK}> Ok, Thanks. One more question, just clarification: Main table and subset tables. The main table is populated first, then when subset tables are populated, it links to the main table, right? If I am wrong, please correct me. thanks again. Link to comment Share on other sites More sharing options...
jojay Posted May 30, 2006 Author Share Posted May 30, 2006 Ok, Thanks. One more question, just clarification: Main table and subset tables. The main table is populated first, then when subset tables are populated, it links to the main table, right? If I am wrong, please correct me. thanks again.<{POST_SNAPBACK}> I guess I am wrong. I think it should be vice-versa. for example: tblcompany and tbljob. If tbljob is populated first with jobno as 111, then tblcompany will be populated with the jobno, and that will be as an relationship. Should I really raise this question, that is, is it neccessary to think of this at this time of implementation, or not? really confused. Link to comment Share on other sites More sharing options...
aspnetguy Posted May 30, 2006 Share Posted May 30, 2006 If you use hte proper constraints you will only be allowed to insert into the main table data that is defined in the subset tables like jobs and industries. Link to comment Share on other sites More sharing options...
jojay Posted May 30, 2006 Author Share Posted May 30, 2006 If you use hte proper constraints you will only be allowed to insert into the main table data that is defined in the subset tables like jobs and industries.<{POST_SNAPBACK}> I am using MS Access and according to my little knowledge i have, Access itself a relational database and I dont need to explicitly do the relationships. But still I always connect all the relationships and use only "Enforce Referencial Integrity". With this relationship, is it still the main table be populated first? Link to comment Share on other sites More sharing options...
aspnetguy Posted May 31, 2006 Share Posted May 31, 2006 I am using MS Access and according to my little knowledge i have, Access itself a relational database and I dont need to explicitly do the relationships. But still I always connect all the relationships and use only "Enforce Referencial Integrity". With this relationship, is it still the main table be populated first?<{POST_SNAPBACK}> You still need to define the relationships and the subtables will need to be populated first. If you set everything correctly you wil get errors if you try and populate the main table first Link to comment Share on other sites More sharing options...
jojay Posted May 31, 2006 Author Share Posted May 31, 2006 You still need to define the relationships and the subtables will need to be populated first. If you set everything correctly you wil get errors if you try and populate the main table first<{POST_SNAPBACK}> Ok, Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now