Hello,
I want to create a database driven website as a learning project. Please help me out with this.
I have a few machines on which I have to log a couple of tasks. Tasks such as harddisk testing, defrags, back up, deleting temp files etc. I also want to log who does the tasks, which machines had the tasks done, what task was done.
I want to be able to add more users, machines, and tasks in the future.
Example output would be:
User | date | Machine | Task 1 | Task 2 | .... | Task N
bob | mmyydd | machine1 | done | not done | .... | done
How would you suggest I make this simple database?
Would the following work?
Users Table
-------------
user_id
username
password
firstname
lastname
Machines Table
------------------
machine_id
machinename
Tasks table
------------------
task_id
task
Jobs Table
------------
job_id
date
user_id
machine_id
tasks
Job-Task Table
-----------------
job-task_id
job_id
task_id
User Table would store the users.
Machine Table would store the machines/computers.
Tasks Table would store the available tasks
Jobs table would store the date, user id, machine id and a reference to a job_Task item
Job-Task Table would match job id with task id so it would be like:
Job Task Table output
-------------------------
id | job_id | task_id
---------------------------
1 | 1 | 1
2 | 1 | 2
3 | 1 | 4
4 | 2 | 1
5 | 2 | 3
Thanks!