Question

Considering the following E-R diagram, your task is to create a script file for defining relations and populating data, you c

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CREATE TABLE EMPLOYEE (NO INT PRIMARY KEY, NAME CHAR (20), PHONE VARCHAR(8), ADDRESS CHAR (25), SALARY INT(7));

INSERT INTO EMPLOYEE (111, JOY, 83684672, CROSS ROAD LONDON, 25000);

INSERT INTO EMPLOYEE (112, MARIA, 82345472, MALL ROAD LONDON, 15000);

CREATE TABLE TECHNICIANS (NO INT REFERENCES EMPLOYEE, CERTIFICATIONS(15));

INSERT INTO TECHNICIANS (112, LIBRARIAN);

INSERT INTO TECHNICIANS (111, NET);

CREATE TABLE SCIENTISTS (NO INT REFERENCES EMPLOYEE, RESEARCH CHAR (20), HEDUDEGREE CHAR (20));

INSERT INTO SCIENTISTS (111, ADHOC, PHD);

INSERT INTO SCIENTISTS (112, FORENSIC, PHD);

CREATE TABLE PROJECTS (NO CHAR (10) PRIMARY KEY, NAME CHAR (20), ENDED_DATE DATETIME, STARTED_DATE DATETIME, LOCATION CHAR (15));

INSERT INTO PROJECTS (P001, HOTEL MGMT, 22-06-2019, 10-06-2019, LONDON);

INSERT INTO PROJECTS (P002, CYBER MGMT, 25-07-2019, 11-06-2019, NEW JERSY);

CREATE TABLE WORKSON (NO INT REFERENCES EMPLOYEE, NO CHAR (10) REFERENCES PROJECTS, ASSIGNDATE DATETIME);

INSERT INTO WORKSON (111, P001, 10-05-2019);

INSERT INTO WORKSON (112, P002, 01-06-2019);

CREATE TABLE EQUIPMENTS (NO CHAR(10) REFERENCES PROJECTS, NO INT PRIMARY KEY, COST INT);

INSERT INTO EQUIPMENTS (P001, 811, 5400);

INSERT INTO EQUIPMENTS (P002, 812, 5100);

Add a comment
Know the answer?
Add Answer to:
Considering the following E-R diagram, your task is to create a script file for defining relations and populating data,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Map the following ER diagram to relations by writing SQL statements to capture as many of...

    Map the following ER diagram to relations by writing SQL statements to capture as many of constraints as possible. If you cannot capture some constraints, explain why.

  • This assignment your tasks is to convert the E-R diagram to a relational model and then...

    This assignment your tasks is to convert the E-R diagram to a relational model and then to SQL. The mapping process is straightforward. Three components of the conversion process are Specify schema of relation itself Specify primary key on the relation Specify any foreign key references to other relations 1. 2. 3. dateBorn mName birthPlace IName dateDied fName IName address - oCountry ID mName ttlAmt Customers N Artists M Favors fName artStyle ID N Creates Like M startedDate theme title...

  • CAN YOU PLEASE EXPLAIN IN TASK 3 - HOW DO WE REPRESENT TOTAL PARTICIPATION AND KEY...

    CAN YOU PLEASE EXPLAIN IN TASK 3 - HOW DO WE REPRESENT TOTAL PARTICIPATION AND KEY CONSTRAINTS IN SQL CODE. PLEASE PROVIDE SOLUTION AND DETAILED EXPLANATION. I WOULD REALLY APPRECIATE IF YOU CAN HELP ME WITH THE ABOVE 2 QUESTIONS. I WILL DEFINITELY RATE!! Thank you. Task 2 [40 points Given an ER diagram (as shown below), write SQL statements to create the corresponding relations and capture as many of the constraints as possible. If you cannot capture some constraints,...

  • Map the following ER diagram to relations by writing SQL statements to capture as many of...

    Map the following ER diagram to relations by writing SQL statements to capture as many of the constraints as possible. If you cannot capture some constraints, explain why. FILE DESIGN REVIEW VI HOME Cut Copy Format Painter INSERT VIEW Sign in Find ▼ AaBbCcC AaBbCcI AaBbCcI ac Replace Paste ーー:, 2 ▼ m▼ | TNormal TNoSpac Heading 1 Heading 2 Title Subtitle Subtle Em Emphasis Select Clipboard Font Paragraph Styles Editing phone ame location name birthday ID salary Employees Has...

  • The lab for this week addresses taking a logical database design (data model) and transforming it...

    The lab for this week addresses taking a logical database design (data model) and transforming it into a physical model (tables, constraints, and relationships). As part of the lab, you will need to download the zip file titled CIS336Lab3Files from Doc Sharing. This zip file contains the ERD, Data Dictionary, and test data for the tables you create as you complete this exercise. Your job will be to use the ERD Diagram found below as a guide to define the...

  • Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accoun...

    Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accounting, and employee data, and these different data sets must all be efficiently managed in order to make the data accessible. Companies rely on database engineers to ensure that their records are accurate, updated, and tracked in real time. This course covers structured query language (SQL) and how it can be used to manage database schemas, manipulate data, and analyze data. For your final...

  • need help Create or edit the SQL statements required to accomplish the following tasks. All columns...

    need help Create or edit the SQL statements required to accomplish the following tasks. All columns should have a column name, feel free to create appropriate aliases Use screen shots to ca evidence that each task is completed; include the SQL records before and after statements are executed, as appropriate. Include all work, even if you get errors. Paste your screen shots into a single PowerPoint file pture statements output from the statements, and views of the object explorer when...

  • For this set of Review Questions, we will create and use a database for the Wedgewood...

    For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...

  • Create a bash script to do the following on your CentOS6 VM. To back up your...

    Create a bash script to do the following on your CentOS6 VM. To back up your home folder using tar command daily. Use gzip as the compression for tar (z option). – 10pts Hint: Make sure you exclude the tar file itself from the backup. The script should name the tar file backupYYYYMMDD.tar.gz -10 pts The script should keep the last seven days of backup files and delete backup files older than seven days. -10 pts The script should check...

  • Python Assignment In this assignment, you will use Pandas library to perform analysis on the dataset stored in the following csv file: breast-cancer-wisconsin.csv. Please write script(s) to do the fol...

    Python Assignment In this assignment, you will use Pandas library to perform analysis on the dataset stored in the following csv file: breast-cancer-wisconsin.csv. Please write script(s) to do the following: 1. Read the csv file and covert the dataset into a DataFrame object. 2. Persist the dataset into a SQL table and a JASON file. • Write the content of the DataFrame object into an SQLite database table. This will convert the dataset into a SQL table format. You can...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT