Helpful Information
 
 
Category: Database Management
Database normalisation challenge.... Please help!??!?!?!

Hi,

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:

user_id
user_password
user_firstname
user_surname
user_room
user_building
user_telephone
user_email
user_lastaccess

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:

user_id
link_url
link_description
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!!!!

Many thanks

-=oLd SkOoL RaVeR=-

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 ?

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!).










privacy (GDPR)