March 26th, 2002, 05:59 PM
Database normalisation challenge.... Please help!??!?!?!
I am struggling with my final year project and need some help on my database structure.... Please can someone help!?!?!
I am trying to build a web portal using PHP and MySQL and have sucessfully built and integrated the pages that customise a login to the user.
I need to include a set of links specific to a user and I cannot get my head around the database structure that would make this easiest.
I have a user_info table that stores the information about the user that is in a reasonable 1st normal form.
The fields are:
I cannot relate this to the information that I require about the link's though without creating lots of many-to-many relationships and therefore duplicate data.
The attributes I need to store for the links are:
link_type (text or graphic)
link_type_resource (i.e. location of graphic)
link_pos_x (relating to a row in a table so that the links can be sorted)
link_pos_y (relating to a column in a table)
If anyone can help me with this it would be greatly appreciated as time is starting to run out, as is my hair!!!!
-=oLd SkOoL RaVeR=-
March 27th, 2002, 07:42 AM
What I assume you want is three tables
table_1 : Unique data about each user
table_2 : Unique data about a link
table_3 : many to many link table
what's so wrong with that ?
Candyman. CandyMan. Candy ... Oh, Hi !
March 27th, 2002, 08:01 AM
Don't you learn techniques for database design? This example looks fairly simple, but a good idea is to model the database using ORM or E/R. (Don't use UML, it's hopeless for this purpose!).
Puritanism: The haunting fear that someone, somewhere may be having fun