Question: Write SQL statements to create database and tables using the conceptual design from Phase I. Use appropriate naming conventions for all tables, attributes, primary keys,

Write SQL statements to create database and tables using the conceptual design from Phase I. Use appropriate naming conventions for all tables, attributes, primary keys, and foreign keys. You may copy and paste SQL statements from your own DBMS to the file you'll upload.
• Insert at least 5 rows data in each table via SQL statements. Write SELECT * for each table and do a SNIP or screen shot that shows your tables.
• Write SQL statements to update 1 column and delete 1 row for each table. You may copy and paste SQL statements from your own DBMS to the file you'll upload.
• Write four SQL queries,
1 contains GROUP BY
1 contains GROUP BY and HAVING
1 contains nested query with ALL
1 contains nested query with IN
show a screen shot or SNIP that shows the SQL code and the result.
 

For this relational schema:

Screen Shot 2023-04-16 at 10.12.48 PM.png 

PATIENT patient SSN full_name age gender address DEPARTMENT dept num name location In_patient DOCTOR doctor SSN Full_doctor_name Year_of_expirience specialty dnum +SERVICE service no BILL bill no DRUG drug no description bno name date PHARMACY pharmacy no address dose amount cost dssn phone_no dssn dssn name sno pno dnum dno dnum

Step by Step Solution

3.40 Rating (144 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Creating Tables Lets assume a simple example with two tables Students and Courses Creating Students ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!