Sample Header Ad - 728x90

Do I need to implement id column to table if i know that every added row will be unique?

0 votes
1 answer
101 views
I want to create database which allow me to store IT job offers from various websites. While creating ER diagram I started wondering if I really need an id column in one particular table. Look at this situation below: enter image description here 1. Every job offer has a title and a source website. It happens quite often that job offers from the same website have the same title so in order to distinguish them somehow I created column job_id which makes each offer (row in table) unique. 2. Job offers sometimes contain information about required additional Tech_skill. For these I made a separate table. As with job offers, their names are often repeated. And this is where the main thread comes in: unlike in case of job offers, I think I don't need to store every Tech_skill name because if I did this they would repeat. Instead, I think I can add only unique ones (those that haven't appeared yet) to my Tech_skill table so that there wouldn't be repetition. And if I needed to associate job offer with one or several skills then I'd use linking table (many to many relationship). So if I were to inserting non-repeating skill names into a Tech_skill table would I need to create an id column?
Asked by beginsql (65 rep)
Sep 23, 2021, 04:35 PM
Last activity: Sep 23, 2021, 04:58 PM