J
J
Jake Taylor2021-06-12 19:37:17
SQL
Jake Taylor, 2021-06-12 19:37:17

How to properly design a database table that should store a mailing address?

There are 3 tables "Countries", "Regions", "Cities".

I have a "Companies" table that contains all information about a company (name, UNP, and so on). There should also be information that contains the address of the company.
How should this "Companies" table look like:
- contains a city column, a region column, a country column
- or contains one VARCHAR type field named "address"

I also have an "Orders" table, which should also contain the data "Loading address" , "Discharge address".

This table must contain one field "address" of type VARCHAR(45), for example, or you need to create a table "address" separately, in which there will be columns (id, country, city,

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question