From 635dd2fd31e3a6345eb0b0b6711e2918f720e5a4 Mon Sep 17 00:00:00 2001 From: "nikbel2004@outlook.com" Date: Mon, 16 Sep 2024 00:16:06 +0400 Subject: [PATCH] AllLabs --- Lab 5-6/script.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Lab 5-6/script.txt b/Lab 5-6/script.txt index 4fe5bcc..66fbfb4 100644 --- a/Lab 5-6/script.txt +++ b/Lab 5-6/script.txt @@ -1,22 +1,23 @@ CREATE TABLE Genre ( - GenreID INTEGER PRIMARY KEY, + GenreID INTEGER PRIMARY KEY, GenreName varchar(30) NOT NULL ); CREATE TABLE Employee ( - EmployeeID int PRIMARY KEY, + EmployeeID int PRIMARY KEY, GenreID INTEGER, FIO varchar(50) NOT NULL, - FOREIGN KEY (GenreID) REFERENCES Genre (GenreID) + FOREIGN KEY (GenreID) REFERENCES Genre (GenreID) ); CREATE TABLE Book ( - BookID INTEGER PRIMARY KEY, + BookID INTEGER PRIMARY KEY, GenreID INTEGER, Title varchar(200) NOT NULL, Author varchar(200) NOT NULL, - FOREIGN KEY (GenreID) REFERENCES Genre (GenreID) + + FOREIGN KEY (GenreID) REFERENCES Genre (GenreID) ); INSERT INTO Genre VALUES @@ -41,7 +42,7 @@ COPY (SELECT table_to_xml('Book', true, false, '')) to 'E:\MiAKD\Lab 5-6\book.xm -/* Индексы (6 lab) */ +/* === Индексы (6 lab) === */ CREATE INDEX index_g ON Genre (GenreID)