Answer the question
In order to leave comments, you need to log in
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
. 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
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 'Максимальная дальность полета, км';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question