Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

** Data creationCreate some appropriate data for the database (at least 6 tuples for each table) andinsert this data in your implementation. Choose you data

image text in transcribed

** Data creationCreate some appropriate data for the database (at least 6 tuples for each table) andinsert this data in your implementation. Choose you data properly so that thefollowing queries return at least a relation with one tuple. ** SQL QueriesDesign and implement MySQL statement for the following queries: 1.List all the students 2.List all the courses 3.List all the lecturers 4.What students take course CS04? 5.Which lecturer teaches course CS04? 6.What courses does Dr. Dodd teach? 7.Are there any students not enrolled in any course and who are they? 8.Are there any courses with no students enrolled and what are they? 9.Delete a tuple from table student, check the results. 10.Update the value of course number in table course, check the results.

** What to submit? Submit the list of SQL-queries, query-output, and the list of tuples of all relations in the database

Objectives On completion of this experiment the student should be able to: Design a set of relations corresponding to an ER model Implement these relations using SQL and insert test data Formulate and submit SQL queries Log the results Check to see whether the results are correct 1. 2. 3. 4. 5. 1,Database definition Transform the following ER diagram into a suitable set of relations and implement these using MySQL. Specify any primary and foreign keys in your definition. Specify referential integrity constraints for foreign keys for both deletion and update student-name course-number title student-number year student enrols course lecturer teaches staff-number room-number lecturer-name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions