Jump to content

Is it okay to create table for each user?


Go to solution Solved by requinix,

Recommended Posts

I want to create a website that records whether the user is present or absent during a meeting. The problem is, I'm having difficulty how to create my database structure. 

Each employee has a different meetings, and I see all the employee, date of their meeting and their status.

Something like this.

Example.

Cary

09/12/2013 - present

09/13/2013 - absent

09/18/2013 - absent

 

 

Stanlee

09/12/2013 - absent

09/14/2013 - present

09/19/2013 - present

  • Solution

Is it okay to create table for each user?

No.

 

All you have is the employee, date, and status. Why not a table with the employee, date, and status? Even better, why not a table that lists out all the employees, gives them some ID numbers so it's easier to refer to them in the database, and then a table with the employee ID, date, and status?

employees

id | employee
---+---------
 1 | Cary
 2 | Stanlee

meetings

employee | date       | status
---------+------------+-------
       1 | 09/12/2013 | present
       1 | 09/13/2013 | absent
       1 | 09/18/2013 | absent
       2 | 09/12/2013 | absent
       2 | 09/14/2013 | present
       2 | 09/19/2013 | present
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.