Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Relational Algebra Expression Create Database, Table and Use SQL Server Managament Studio to write code on New Query for each question Cho luoc do quan
Relational Algebra Expression Create Database, Table and Use SQL ServerManagament Studio to write code on New Query for each question
Cho luoc do quan h gm cc quan h - Sailors(sid: integer, sname: string, rating: integer, age real) Boats(bid:integer, bname: string, color: string Reserves(sid: integer, bid: integer, day: date) Sid Sname Rating Age 45.0 33.0 55.5 25.5 35.0 35.0 16.0 35.0 25.5 63.5 SidBidDa 22 101 10/10/08 22 102 10/10/08 22 103 10/08/08 22 104 10/07/08 31 102 11/10/08 31 103 11/06/08 31 104 11/12/08 64 101 64 102 9/08/08 74 Bid Bname Color 101 Interlake Blue 102 InterlakeRed 103 Cli 104 Marine Red 22 Dustin7 29 Brutus1 31 Lubber 8 32 Andy 8 58 Rus 64 Horatio 7 71 Zorba 10 74 Horatio 9 85 Art 95 Bob 3 Green 10 Boats 9/05/08 103 9/08/08 Sailors Reserves Bail: Xy dung cc rang buoc cho m hinh quan h trn 1. Cc thuy th tham gia di tu (Reserves) phi thuc ve cc thy th Sailors. 2. Khng c 2 con tu c cng bid quan h Boats. 3. Tui ca cc thy th i tu khng ln hn 70 v khng nh hn 15. Bai 2: Tr loi cc cu hoi sau bang biu thuc dai s quan he (relational algebra expression) Find the names of sailors who have reserved boat 103 (Tim tn ca nhung thy th da tham gia di tu 103) Find the names of sailors who have reserved a red boat (Tim tn ca nhung thy th da tham gia di tu mu d) Find the colors of boats reserved by Lubber. (Tim mu ca nhung con tu c Lubber di) Find the names of sailors who have reserved at least one boat. 1. 2. 3. 4. Find the names of sailors who have reserved a red or a green boat (Tim tn ca nhung thy th d di tu mu do hoc mu xanh) Find the names of sailors who have reserved a red and a green boat (Tim tn ca nhung thy th d di tu mu do v mu xanh) Find the sids of sailors with age over 20 who have not reserved a red boat Find the names of sailors who have reserved all boats (Tim tn ca nhrng thy th da di tat c cc con tu) 5. 6. 7. sid ca nhng thy th tui >20 m khng i tu mu ) 8. 9. Find the names of sailors who have reserved all boats called Interlake (Tim tn ca nhrng thy th da di nhung con tu c tn Interlake 10. Find the names of sailors who have reserved at least two boats (Tim tn ca nhrng thy th d di it nht hai con tu)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started