|
-
March 15th, 2009, 05:26 PM
#1
[MySQL 5.1 & PHP] Proper table relation
What would be a proper design of the relationships for this case?
Table 'one' has column "id", which is primary key and few other columns.
Table 'two' has column "applies", which is primary key and few other columns.
Table 'one' has 10 records / rows with "id"s values:
7
19
18
13
16
15
20
23
24
25
Table 'two' has 5 records / rows with "applies"s values:
15
16
18
23-24-25
7-13-19-20
What this means, for example, is that row with "applies"s value: 7-13-19-20, holds values in columns that are valid / applicable for
rows with "id"s values 7, 13, 19 & 20, from table one.
Rows 7, 13, 19 & 20, are alway joined to row 7-13-19-20.
I need a better way.
How to do it?
HINT: Table 'one' MUST NOT be altered!
Ipsens
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|