Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone fix the error i have at the bottom, make sure nothing else is wrong or needs changing. Also if possible use word to

Can someone fix the error i have at the bottom, make sure nothing else is wrong or needs changing.

Also if possible use word to create the DBDL for the 3NF

DROP DATABASE IF EXISTS BOOKSTORE_QUIZ2; GO

CREATE DATABASE BOOKSTORE_QUIZ2; GO

USE BOOKSTORE_NIHAL;

CREATE TABLE PUBLISHER ( PUBLISHER_ID INT PRIMARY KEY, PUBLISHER_NAME VARCHAR(50) NOT NULL, PUBLISHER_EMAIL VARCHAR(50) NOT NULL, PUBLISHER_PHONE VARCHAR(50) NOT NULL );

CREATE TABLE COLLEGE ( COLLEGE_ID INT PRIMARY KEY, COLLEGE_NAME VARCHAR(50) NOT NULL, address VARCHAR(250) NOT NULL );

CREATE TABLE AUTHOR ( AUTHOR_ID INT PRIMARY KEY, AUTHOR_NAME VARCHAR(50) NOT NULL );

CREATE TABLE BOOKSTORE_EMPLOYEE ( EMPLOYEE_ID int PRIMARY KEY, EMPLOYEE_NAME VARCHAR(100) NOT NULL, COLLEGE_ID int FOREIGN KEY REFERENCES COLLEGE(COLLEGE_ID) );

CREATE TABLE BOOK ( BOOK_ID int PRIMARY KEY, ISBN VARCHAR(100) NOT NULL, TITLE VARCHAR(100) NOT NULL, PRINT_YEAR int NOT NULL, EDITION int NOT NULL, PRICE Double NOT NULL, PUBLISHER_ID int FOREIGN KEY REFERENCES PUBLISHER(PUBLISHER_ID) );

CREATE TABLE BOOK_AUTHOR ( BOOK_AUTHOR_ID int PRIMARY KEY, AUTHOR_ID int FOREIGN KEY REFERENCES AUTHOR(AUTHOR_ID) );

CREATE TABLE BOOK_STORE ( BOOK_STORE_ID int PRIMARY KEY, BOOK_STORE_NAME varchar(50) NOT NULL, COLLEGE_ID int FOREIGN KEY REFERENCES COLLEGE(COLLEGE_ID) );

CREATE TABLE BOOK_STORE_DETAILS ( BOOK_STORE_DETAILS_ID int PRIMARY KEY, BOOK_ID int FOREIGN KEY REFERENCES BOOK(BOOK_ID), BOOK_STORE_ID int FOREIGN KEY REFERENCES BOOK_STORE(BOOK_STORE_ID) );

Error im getting

Msg 156, Level 15, State 1, Line 41 Incorrect syntax near the keyword 'NOT'.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

Did Elizabeth use visual aids effectively?

Answered: 1 week ago

Question

What is the mean world syndrome?

Answered: 1 week ago

Question

Is Elizabeths speech persuasive or informative or both?

Answered: 1 week ago