123456789101112131415161718192021222324252627282930
CREATE TABLE Publisher (ID INT PRIMARY KEY,Name VARCHAR(100) NOT NULL);INSERT INTO publisher (ID, name) VALUES(1,'Penguin Random House'),(2,'HarperCollins'),(3,'Phoenix Press,INC'),(4,'St. Bernadette Publishing House Corporation'),(5,'Morlanda Publishing');CREATE TABLE Book (ID INT PRIMARY KEY,Title VARCHAR(100) NOT NULL,Isbn VARCHAR(20) NOT NULL,Publication_year YEAR NOT NULL,Publisher_id INT NOT NULL,FOREIGN KEY (publisher_id) REFERENCES Publisher(ID));CREATE TABLE Author (ID INT PRIMARY KEY,First_name VARCHAR(50) NOT NULL,Last_name VARCHAR(50) NOT NULL);CREATE TABLE Writing (Book_id INT NOT NULL,Author_id INT NOT NULL,FOREIGN KEY (book_id) REFERENCES Book(ID),FOREIGN KEY (author_id) REFERENCES Author(ID));