Welcome Guest, Not a member yet? Register   Sign In
Database layout
#1

[eluser]hykoh[/eluser]
Hi,

my question is not CI related; but i love this community in here Wink

I try to create a database for a model agency page. There must be some fields like hair color, eye color and so on ...

My idea:

Code:
tbl_model_data:
- id
.....
.....
- eyeColorID
- hairColorID
- skinColorID
.....

But there are up to ~5 ID-related values then - so 5 table joins like this

Code:
SELECT *
FROM tbl_model_data
LEFT JOIN tbl_hair_colors
ON tbl_hair_colors.id = tbl_model_data.eyeColorID
LEFT JOIN tbl_eye_colors
ON tbl_eye_colors.id = tbl_model_data.eyeColorID
LEFT JOIN tbl_skin_colors
ON tbl_skin_colors.id = tbl_model_data.skinColorID
....

In any case it seems like it is not the best way to solve it, isnt it ?

Any ideas ???

Thanks Smile


Messages In This Thread
Database layout - by El Forum - 02-15-2009, 11:13 PM
Database layout - by El Forum - 02-15-2009, 11:42 PM
Database layout - by El Forum - 02-16-2009, 01:28 AM
Database layout - by El Forum - 02-16-2009, 04:27 AM
Database layout - by El Forum - 02-16-2009, 07:01 AM
Database layout - by El Forum - 02-16-2009, 07:49 AM
Database layout - by El Forum - 02-16-2009, 08:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB