Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AbdulBazith's avatar

Doubt in table relationship in laravel?

Guys I am working with a project job portal site.

What’s my doubt is need a suggestion for table relationship.

Actually the project has skill_set table with fields id, name_of_skill_set.

Consider the data are inside the skill_set table

Html
Javascript,
Accounting,
Laravel,
Cakephp
So on.

This skill_set table must be used by both(job_seeker and employer ). Employer uses this skill_set table to post a job with the skill sets requirement and job_seeker uses this table to mention their skill sets.

So I made a relationship in this way is this right. Many-to-many relationship

There are 3 tables

 job_posting table, 
skill_set table, 
job_seeker table

To link the skill_set table for both of them I made two intermediate tables like below,

Job_posting -->Job_skill (Intermediate table) -->skill_set table <--seeker_skill (Intermediate table) <-- Job_seeker

Is this right format or is there any other way to make this process further simple and reliable? Kindly suggest your ideas please..

0 likes
4 replies
tykus's avatar

You could also use a polymorphic many to many relationship which would require only one intermediate table

1 like
AbdulBazith's avatar

@tykus thanks for you suggestion

But mine is many to many relationship so that a seeker can have more than one skill set and a job_positing can post more than one skill_set??

is this possible using polymorphic many to many relationship?

AbdulBazith's avatar

@tykus understood and thanks.

Another doubt,

i have the course details such as

education -

specialization-

The education contains B.Sc, BE, M.Sc and soo on.

and the specializtion contains maths, physics, civil etc..

whats my doubt is

i planned to have a table like

Qualification with fields(education_name, specialization_name)

but when filling the data the specialization is repeated.

see


education_name                specialization_name
Bsc,                                    maths
Bsc,                                    physics
Msc,                                    maths
Msc,                                    physics


so the see the above example the specialization is repeated

so how can i make a table and relationship for this qualification details

Simply to say job-seeker chooses the education from drop down and based on that drop down then next drop down specialization will be listed?

so need suggestion for table structure and relationship among them.

Please or to participate in this conversation.