Multiple tables or one big one? Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Multiple tables or one big one? without wasting too much if your time.

The question is published on by Tutorial Guruji team.

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!

We are here to answer your question about Multiple tables or one big one? - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji