In: Computer Science
Create a database for PAINTER and PAINTING entities/tables;
Decide on your own what will be the attributes of PAINTER and PAINTING tables;
Insert at least 5 records on each table
Deliverables:
Screenshot of PAINTER and PAINTING table structures using the describe command
Screenshot of PAINTER and PAINTING table records/entries using select command.
Submit your file in PDF format.
Please find below queries for above tables
I couldn't submit in PDF format as i have issues.
Queries:
CREATE TABLE painter(painterId integer PRIMARY KEY, painterName varchar(30),salary integer);
CREATE TABLE painting(paintid integer PRIMARY KEY,
painterid integer references painter(painterid),
color varchar(20));
INSERT INTO painter VALUES(1,'Tommy',70000);
INSERT INTO painter VALUES(2,'John',5000);
INSERT INTO painter VALUES(3,'Frankie',8000);
INSERT INTO painter VALUES(4,'James',7500);
INSERT INTO painter VALUES(5,'Robertson',6500);
INSERT INTO painter VALUES(6,'Mani',9500);
INSERT INTO painting VALUES(10,1,'red');
INSERT INTO painting VALUES(20,1,'green');
INSERT INTO painting VALUES(30,2,'blue');
INSERT INTO painting VALUES(40,3,'white');
INSERT INTO painting VALUES(50,5,'orange');
INSERT INTO painting VALUES(60,4,'red');
SELECT * FROM painting;
SELECT * from painter;
DESCRIBE painting;
DESCRIBE painter;