Consider the following relational database schema (primary keys are underlined, foreign keys are in italic, referring to

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider the following relational database schema (primary keys are underlined, foreign keys are in italic, referring to

Post by answerhappygod »

Consider The Following Relational Database Schema Primary Keys Are Underlined Foreign Keys Are In Italic Referring To 1
Consider The Following Relational Database Schema Primary Keys Are Underlined Foreign Keys Are In Italic Referring To 1 (52.87 KiB) Viewed 15 times
Consider the following relational database schema (primary keys are underlined, foreign keys are in italic, referring to the same attribute in a different table): MedicalCentres (cid, centre, address) Patients (pid, name, date_of_birth, insurance) Appointments (aid, cid, pid, date, time, vaccination, payment) On this schema, the following two SQL queries are given: Q1: SELECT centre FROM Medical Centres M, Appointments A WHERE M. cid = A.cid; Q2: SELECT centre FROM Medical Centres M WHERE M.cid IN (SELECT A.cid FROM Appointments A ); Although these queries Q1 and Q2 seem to ask for the same information, they actually can produce different answers, especially for medical centres with many appointments. Describe in your own words what each query is doing, ideally using a small example. How do the results of queries Q1 and Q2 differ? Edit View Insert Format Tools Table 12pt ✓ Paragraph B I U T² V 2 To 8 1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply