Advertisement

10.15.2008 at 09:31PM PDT, ID: 23819238
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Help with Database Design

Asked by Simon336697 in MySQL Server, PHP Scripting Language, Database

Hi Everyone.
Guys I have the following setup.

A) A Many to Many Relationship:
1 category can belong to many technolgies
1 technology can have many categories

technologies_tek:                              technologies_categories_tekcat:                          categories_cat:
id_tek (PK)   <--1-----------Many---     fk_idtek_tekcat (FK, PK)                                      
name_tek (unique)                              fk_idcat_tekcat (FK, PK) ---Many -------------1--> id_cat (PK)
                                                                                                                                          name_cat (unique)

B) This is the part Im struggling with:
I want to create an entries table called 'entries_ent', which has the following criterion:
(i) 1 entry can only belong to 1 technology
(ii) 1 entry can only belong to 1 category
What Im not sure about is how to define what foreign keys to what tables in the new entries_ent table.
Do I create foreign keys to the technologies_tek and categories_cat tables, or do I create foreign keys to each of the "foreign keys" in the linked table called technologies_categories_tekcat?

Any help on this greatly appreciated.
Basically the only things I want unique in the entries_ent table are:
id_ent
name_ent (which is the name of the new entry)
Im just not sure how I "look up" or reference the technology and category that this new entry record will belong to. The new entry must belong to a technology and a category.

Thank you.

Start Free Trial
[+][-]10.15.2008 at 11:39PM PDT, ID: 22728500

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL Server, PHP Scripting Language, Database
Sign Up Now!
Solution Provided By: momi_sabag
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.16.2008 at 12:14AM PDT, ID: 22728614

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628