why the artwork table is not accepting to create and keeps giving errors in MySQL??

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

why the artwork table is not accepting to create and keeps giving errors in MySQL??

DROP DATABASE IF NOT EXISTS ArtExibtion_DB;
CREATE DATABASE IF NOT EXISTS ArtExibtion_DB;
USE  ArtExibtion_DB;

 CREATE TABLE ExibtionSite
(
    siteName        VARCHAR(50) NOT NULL,
    cost            INT,
    contact         VARCHAR(50),
    Phone           VARCHAR(9) NOT NULL,
    Address         varchar(50) NOT NULL,

CONSTRAINT ExibtionSite_PK PRIMARY KEY (siteName)

);

CREATE TABLE Artist
(
    name        VARCHAR(50) NOT NULL,
    socsecnum   char(9) NOT NULL,
    birthdate   date NOT NULL,
    phone       VARCHAR(50),
    Address     VARCHAR(50) NOT NULL,
    email       VARCHAR(50) ,

    CONSTRAINT Artist_PK PRIMARY KEY (socsecnum)
);

CREATE TABLE ArtExibtion
(
    exibtionNum  int NOT NULL,
    startDate   date NOT NULL,
    endDate     date NOT NULL,
    cost        INT,
    siteName_FK VARCHAR(50) NOT NULL,
    exhibName   VARCHAR(50) NOT NULL,

    CONSTRAINT ArtExibtion_PK PRIMARY KEY (exibtionNum),
    CONSTRAINT ArtExibtion_FK1 FOREIGN KEY (siteName_FK)
    REFERENCES ExibtionSite (siteName)
);

CREATE TABLE ArtWork
(
    artworkName     varchar(50) NOT NULL,
    value           varchar(50)NOT NULL,
    type            varchar(50)NOT NULL,
    email_FK        VARCHAR(50) ,

    CONSTRAINT ArtWork_PK1 PRIMARY KEY (artworkName),
    CONSTRAINT ArtWork_FK1 FOREIGN KEY (email_FK)
    REFERENCES Artist (email) ON DELETE SET NULL


);
siteName
Created By Craig Nelson
name
cost
socsecnum
Exhibition Site
Artist
contact
birthdate
phone
phone
address
address
email
held at
creates
email FK
M'
exhibition Num FK
artworkName FK
Notifies
M
artworkName
exhibitionNum
exihibName FK
startDate
artworkName FK)
artworkName
endDate
value
Art Exhibition
-M-
Displays
N-
Artwork
cost
email FK
startDate
type
endDate
siteName_FK
exihibName
Transcribed Image Text:siteName Created By Craig Nelson name cost socsecnum Exhibition Site Artist contact birthdate phone phone address address email held at creates email FK M' exhibition Num FK artworkName FK Notifies M artworkName exhibitionNum exihibName FK startDate artworkName FK) artworkName endDate value Art Exhibition -M- Displays N- Artwork cost email FK startDate type endDate siteName_FK exihibName
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education