Skip to content

Tag: database-design

How do I correctly map letters in the database?

I have two tables. One table with the letters of different countries and a second table with a mapping of these letters to each other. I need to make a query to get the mapped letters of the two languages. Can you tell me how this can be done optimally? The letter table id letter language 1 A en 2

How to add a column default?

I created a Postgres DB which contains 5 tables. Then I realized that the column student.student_id lacks a column default to generate an UUID: Knowing that some tables are linked to the student table, how can I add to the function as column default for student_id so that the result will be: Answer Use ALTER …

Data Model for multiple checkboxes

I currently have a supplier table and now I want to store the regions served by each supplier. As a first thought, I made my supplier model like this : Does this seem to be a good pattern? Especially for queries to filter suppliers by region served etc. Is this solution still reliable if in the future I want …