M
M
mShpakov2018-09-10 18:27:59
Database design
mShpakov, 2018-09-10 18:27:59

How to correctly name a table for the third level of nesting?

The question may not be new, but I could not find the answer.
There is a huge entity (storing it within a single table is not an option) with a nested link between tables, as in the screenshot
5b968d0cedce3541477663.png
. Actually, the question is, how to correctly name the 3rd table (and the column with the link key):
foo_bar_bazs (foo_bar_id) or bar_bazs (bar_id)
?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2018-09-10
@mShpakov

Here's a snippet of the tutorial database .

CREATE TABLE aircrafts (
    aircraft_code character(3) NOT NULL,
    model text NOT NULL,
    range integer NOT NULL,
    CONSTRAINT aircrafts_range_check CHECK ((range > 0))
);
COMMENT ON TABLE aircrafts IS 'Самолеты';
COMMENT ON COLUMN aircrafts.aircraft_code IS 'Код самолета, IATA';
COMMENT ON COLUMN aircrafts.model IS 'Модель самолета';
COMMENT ON COLUMN aircrafts.range IS 'Максимальная дальность полета, км';

Is it clear now?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question