Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here the Er Diagram about project; This is Relational Schema of Er Diagram that given above. I want you to write sample queries given below

Here the Er Diagram about project;

image text in transcribed

This is Relational Schema of Er Diagram that given above.

image text in transcribed

I want you to write sample queries given below about relational schema;

  • Implement the following types of queries in SQL ( at least 2 queries for each category):

  1. a JOIN combining 2 relations.
  2. a JOIN combining 3 relations.
  3. a CROSS JOIN
  4. a SELF JOIN ( if it makes sense for your database.
ssn blood_grp name weight date etime name OUTSIDER mtime bp OUTSIDER (1,1) HEALTH RECORD purpose (1,1) has meets b temp mdate (1,1) (0,1) crld DOB start_date duration sex cr date cr time type Wld CRIMINAL (1,N) commits CRIME (1,N) (1,N) amount case_ld (0,N) do WORK Fname Lname (1,1) w_type Jall_ld cell ld (0,N) Has CELL JAIL ph_no (1,1) (1,1) Capacity e-mail jaller Ladd |_name CRIMINAL = (cr id, DOB, start_date, sex, Fname, Lname) JAIL = (jail id, ph_no, email, j_add, j_name, jailer) CELL = (cell id, capacity) WORK = (w id, amount, w_type, duration) HEALTH RECORD = (b_temp, bp, weight, blood grp, date) OUTSIDER = (ssn, name) CRIME = (type, case id) has = (date, cr_id, blood_grp) do = (duration, cr_id, w_id) occupy = (cr_id, jail_id) has = (cell_id, jail_id) commits= (cr_date, cr_crime, case_id, cr_id) meets = (purpose, mtime, etime, mdate, ssn, cr_id)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions