· 6 years ago · Oct 04, 2019, 01:00 PM
1DROP TABLE if exists printers, type_of_printer;
2
3CREATE TABLE printers
4(
5 id serial unique,
6 exist int,
7 cost_price float,
8 cost float,
9 characteristics int
10);
11CREATE TABLE type_of_printer
12(
13 model text NOT NULL CHECK ( model IN ('Printer All-in-One', 'Printer')),
14 print_type text NOT NULL CHECK ( print_type IN ('jet', 'laser')),
15 number_colors int NOT NULL CHECK ( number_colors IN (4,6)),
16 size_paper text NOT NULL,
17 brand text NOT NULL
18);