drop table Artists cascade constraints;
drop table customers cascade constraints;
drop table ARTWORKS cascade constraints;
drop table EXHIBITION cascade constraints;
drop table PAINTING cascade constraints;
drop table SCULPTURE cascade constraints;
drop table STATUE cascade constraints;
CREATE TABLE ARTISTS(ART_ID CHAR(3) PRIMARY KEY,
FNAME VARCHAR(15) NOT
NULL,
MNAME VARCHAR(10),
LNAME VARCHAR(15) NOT
NULL,
BIRTHPLACE VARCHAR(15),
DATEBORN DATE,
DATEDIED DATE,
OCOUNTRY VARCHAR(15),
ARTSTYLE VARCHAR(15) NOT
NULL);
CREATE TABLE CUSTOMERS(CUST_ID CHAR(3) PRIMARY KEY,
FNAME VARCHAR(15) NOT
NULL,
MNAME VARCHAR(10),
LNAME VARCHAR(15) NOT
NULL,
ADDRESS VARCHAR(15) NOT
NULL,
TTAMOUNT INT NOT NULL,
ART_ID CHAR(3),
FOREIGN KEY(ART_ID)
REFERENCES ARTISTS(ART_ID));
CREATE TABLE ARTWORKS(ART_WO_ID CHAR(4) PRIMARY KEY,
TITLE VARCHAR(15)NOT
NULL,
YEAR INT NOT NULL,
WIDE INT NOT NULL,
HEIGHT INT NOT NULL,
DESCRIPTION
VARCHAR(15),
PRICE INT NOT NULL,
ART_ID CHAR(3),
FOREIGN KEY(ART_ID)
REFERENCES ARTISTS(ART_ID));
CREATE TABLE EXHIBITION(NAME VARCHAR(15) PRIMARY KEY,
THEME
VARCHAR(15) NOT NULL,
STARTDATE
DATE NOT NULL,
ENDDATE
DATE NOT NULL,
ART_WO_ID
CHAR(4),
FOREIGN
KEY(ART_WO_ID) REFERENCES ARTWORKS(ART_WO_ID));
CREATE TABLE PAINTING(TYPE VARCHAR(15) NOT NULL,
MATERIAL VARCHAR(15),
ART_WO_ID CHAR(4) ,
FOREIGN KEY(ART_WO_ID)
REFERENCES ARTWORKS(ART_WO_ID));
CREATE TABLE SCULPTURE(WEIGHT INT,
MATERIAL VARCHAR(15),
ART_WO_ID CHAR(4) ,
FOREIGN KEY(ART_WO_ID)
REFERENCES ARTWORKS(ART_WO_ID));
CREATE TABLE STATUE(WEIGHT INT,
MATERIAL VARCHAR(15),
ART_WO_ID CHAR(4) ,
FOREIGN KEY(ART_WO_ID)
REFERENCES ARTWORKS(ART_WO_ID));
DESC ARTISTS;
DESC CUSTOMERS;
DESC ARTWORKS;
DESC EXHIBITION;
DESC PAINTING;
DESC SCULPTURE;
DESC STATUE;
ARTISTS Artists may or may not be contain middle name and hence
middle name can contain null value.
Similarly DOB,datedied and birthpalce may or nay not be exists for
a specified artists and hence these three
fields may contain null values.
CUSTOMERS customer may or may not be contain middle name and hence middle name can contain null value.
ARTWORK some authors want to describe the ART and some do not want to describe hence decription field ma contain null values.
PAINTING - Material used for painting may contain null values.
SCULPTURE,STATUE if Artists want to mention weight and material of SCULPTURE,STATUE then they mention other it contains null values.
This assignment your tasks is to convert the E-R diagram to a relational model and then...
Considering the following E-R diagram, your task is to create a script file for defining relations and populating data, you can use any text editor (notepad/notepad+) to write SQL statements and save it with the file extension.sql (i.e., Test3Tsay.sql). Name the file as Test3XXX.sql (where XXX is your last name). Upload it to here. endedDate phone startedDate name address name location no salary no Employees Projects assignDate P WorksOn Scientists Technicians research hEduDegree N certifications Equipments cost no Task 1...
please use dia to draw the e-r diagram to create Entity - Relationship Diagrams then use MS access This project requires you to create a database design. Your design will be documented in a set of Entity-Relationship Crow's Foot diagrams using the representation as shown in the lecture materials. Draw a set of Entity-Relationship diagrams to model the following scenario. The Maggs Realty Company wants to track the Sales Offices that they have across all of Ontario They are interested...