Multiple tables or one big one?

In a scenario where I have a table of students all applying for a job and I want to record where they have applied would it be better practise to create a separate table for each student with their individual applications in or create a separate big table that just links an application to a student?

Answer

When you say database do you mean table?

Each noun should map to an entity, which in most cases would be represented by a single table so:

STUDENTS-<APPLICATIONS>-JOBS

A student can make many applications An application is made by a single student

An application relates to a single job One job could have many applications.

Students
--------
STUDENT_ID
NAME
...

Applications
------------
APPLICATION_ID
JOB_ID
STUDENT_ID
APPLICATION_DATE
...

Jobs
----
JOB_ID
TITLE
SALARY
...

add more columns as required!

Leave a Reply

Your email address will not be published. Required fields are marked *