Help with Table Structure

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nishmgopal
Forum Contributor
Posts: 101
Joined: Tue Mar 03, 2009 9:38 am

Help with Table Structure

Post by nishmgopal »

Hi Guys

I have been having some serious trouble getting the information I want, and Have taken the advise to restructure my tables. I have attached the Old Structure and the new one.

I was just after some constructive advise on whether the new one is better and if it will help me get the info i want, which is:

I want to display a table with the following colums

Required Skill (comes from ID_Table) Weight (Comes from ID_Table) Score (Comes from Person_Skill)

does this make sense?

Thanks in advance
Attachments
New Structure
New Structure
new_tbl_structure.png (91.54 KiB) Viewed 86 times
Old Structure
Old Structure
tbl_structure.png (96.21 KiB) Viewed 86 times
wellhole
Forum Newbie
Posts: 16
Joined: Mon Mar 23, 2009 1:38 pm

Re: Help with Table Structure

Post by wellhole »

You'll want to add Job_ID to Person_Skill as well because (Job_ID, Skill_Name) are the unique keys for ID_Table. I also recommend that you change your table names to upper case and your members to lowercase.

This may be a preference issue, but I wouldn't use the same member names for every table, such as ID. When joining, it'll be a pain in the ass to reference them. I suggest psid for Person_Skill, piid for Person_ID, jiid for Job_ID, and itid for ID_Table.
Post Reply