Jump to content
Sign in to follow this  
jojay

normalization question

Recommended Posts

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.

Share this post


Link to post
Share on other sites

I would have a seperate table for job and another one for industry. in the main table just use hte industryId and JobID

Share this post


Link to post
Share on other sites
I would have a seperate table for job and another one for industry. in the main table just use hte industryId and JobID

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

Share this post


Link to post
Share on other sites
looks good to me :)

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.

Share this post


Link to post
Share on other sites
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.

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

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?

Share this post


Link to post
Share on other sites
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?

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

Share this post


Link to post
Share on other sites
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

Ok, Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...