Jump to content

Database table creating


sager29

Recommended Posts

Say I want to create a staff directory database with two tables.  One that has their addresses and one table with there likes and dislikes.

I'ld need some sort of Member_ID column in each of my tables.  Is there a way to INSERT from a html form into two tables. 

Any suggestions would be appreciated.

Link to comment
Share on other sites

HI,

It is better if you use two tables. cus any empployees has only one address and when it changes you can update it. however,each employee has different and several likes and dislikes ..hence , it is better to save those records in a separate table. You have to make primary key in first table (for example, emp_id) and forign key in the second table which stores employee ids.

 

First Table:

Emp_id

first_name

last_name

address

gender

etc

 

Second Table:

ref_Emp_id

likes/dislikes //this has to be of boolean data type

content //this field will save what he/she likes or dislikes

etc

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.