Question

-Consider the following table definition, where the primary keys are underlined. Give an expression in relational...

-Consider the following table definition, where the primary keys are underlined. Give an expression in relational algebra for each of the following queries.

Athlete (aID integer, aName string, ranking integer, age integer)

Event (eID string, eName string, eLocation string)

Competes (aID integer, eID string, sport string, year integer)

3. Find the names of the events an athlete named Dennis competed in (aName = ‘Dennis’)

4. Find the names of the athletes who have competed in at least one Event

5. Find the names of athletes who have competed in ‘XGames’ or ‘Dew Tour’

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comemnt...

3. Find the names of the events an athlete named Dennis competed in (aName = ‘Dennis’)

eName(Event Completes (aName = 'Dennis' (Athlete)))

4. Find the names of the athletes who have competed in at least one Event

aName(Athlete Completes)

5. Find the names of athletes who have competed in ‘XGames’ or ‘Dew Tour’

aName(Athlete Completes (eName='XGames' eName='Dew Tour'(Event)))

Add a comment
Know the answer?
Add Answer to:
-Consider the following table definition, where the primary keys are underlined. Give an expression in relational...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the following table definition, where the primary keys are underlined. Give an expression in relational...

    Consider the following table definition, where the primary keys are underlined. Give an expression in relational algebra for each of the following queries. Athlete (aID integer, aName string, ranking integer, age integer) Event (eID string, eName string, eLocation string) Competes (aID integer, eID string, sport string, year integer) 1. Find the names of athletes who have competed in event 1Sk8P (eiD = ‘1Sk8P’) 2. Find the names of athletes who have competed in the event XGames (eName = ‘XGames’) 3....

  • Problem 1 Consider the following relations containing airline flight information, where the keys are underlined ghts(no:...

    Problem 1 Consider the following relations containing airline flight information, where the keys are underlined ghts(no: integer, from: string, to: string, distance: integer, departs: time, arrives: time) aircraftlaid: integer, aname: string, crusingrange: integer) certified(eid: integer,aid: integer) employees(eid: integer, ename: string, salary: integer) Note that the employees relation describes pilots and other kinds of employees as well; every pilot is certified for some aircraft (otherwise, he or she would not qualify as a pilot), and only pilots are certified to fly....

  • Given the following relational database schema (primary keys are bold and underlined). Answer questions 2.1 to 2.4 Orde...

    Given the following relational database schema (primary keys are bold and underlined). Answer questions 2.1 to 2.4 Orders(orderld, customerld, dateOrdered, dateRequired, status) Customer(customerld, customerLastName, customerStreet, customerCity, customerState, customer Lip OrderDetails(orderld.productld, quantity, lineNumber, amount) Products(productld, name, description, quantity, unitPrice) Account(accountNumber, customerld, dateOpened, creditCard, mailingStreet, mailingCity, mailingState, mailingZip) 2.1 (2 Points) List all possible foreign keys. For each foreign key list both the referencing and referenced relations. 2.2 (2 Points) Devise a reasonable database instance by filling the tables with data of...

  • Consider the following relational schema. An employee can work in more than one department; the pct...

    Consider the following relational schema. An employee can work in more than one department; the pct time field of the Works relation shows the percentage of time that a given employee works in a given department. Emp(eid: integer, ename: string, phone: integer, salary: real) Works(eid: integer, did: integer, pct_time: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) Write the following SQL queries. d) Find the enames of managers who manage the departments with the largest budgets. e) Find the...

  • Consider the following relations for an airline company: Flights (flno: integer, from: string, to: string, distance:...

    Consider the following relations for an airline company: Flights (flno: integer, from: string, to: string, distance: integer, departs: time, arrives: time) Aircraft (aid: integer, aname: string, cruising_range: integer) Certifed (pid: integer, aid: integer) Pilots (pid: integer, pname: string, salary: integer) (word in bold are primary keys) Note that every pilot is certified for some aircraft. Write the following queries in relational algebra: 1- Find the flight numbers of flights departing from ‘Amsterdam’ or ‘London’ between 8:00am and 11:00am, and arriving...

  • **************PLEASE COMPLETE PART F) ONLY************** Consider the following relational database schema (primary keys are underlined) and...

    **************PLEASE COMPLETE PART F) ONLY************** Consider the following relational database schema (primary keys are underlined) and SQL query: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) SELECT g.guestNo, g.guestName FROM Room r, Booking b, Hotel h, Guest g WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND h.hotelNo = r.hotelNo AND h.hotelName = "Ritz" AND dateFrom >= "Jan 01, 2001" AND dateTo <= "Dec 31, 2001"; (A) state what...

  • **************PLEASE COMPLETE PART E) ONLY************** Consider the following relational database schema (primary keys are underlined) and...

    **************PLEASE COMPLETE PART E) ONLY************** Consider the following relational database schema (primary keys are underlined) and SQL query: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) SELECT g.guestNo, g.guestName FROM Room r, Booking b, Hotel h, Guest g WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND h.hotelNo = r.hotelNo AND h.hotelName = "Ritz" AND dateFrom >= "Jan 01, 2001" AND dateTo <= "Dec 31, 2001"; (A) state what...

  • consider the following relational database that records details of parts and suppliers. Primary keys are underlined...

    consider the following relational database that records details of parts and suppliers. Primary keys are underlined and the Foreign Keys are identified with (FK). Suppliers (sid, sname, address, credit) Parts (pid, pname, color) Catalog (sid (FK), pid (FK), cost) The credit attribute denotes the size of the supplier’s credit account. The Catalog relation lists the prices charged for parts by Suppliers. Which of the following queries returns the snames of suppliers who supply every part? Select one or more: a....

  • Consider the below schema of the university database (keys are in bold and underline): Students(stuID: Integer,...

    Consider the below schema of the university database (keys are in bold and underline): Students(stuID: Integer, stuName: String, gender: String, age: Integer, gpa: Float) Departments(deptName: String, numPhDs: Integer) ProfessorWorks(profID: Integer, profName: String, deptName: String) CoursesOffer(cNo: String, cTitle: String, deptName: String) Majors(deptName:  String, stuID: Integer, degreeProgram: String; attendYear: String, attendSemester: String) Sections(cNo: String, academicYear: String, semester: String, sectNo: Integer, profID: Integer) Enrolls(stuID: Integer, cNo: String, academicYear: String, semester: String, sectNo: Integer, grade: String) Write the following queries in Relational algebra. Print...

  • Consider the database consisting of the following relations: Flights(Fl#: integer, From: string, To: string, Distance: integer,...

    Consider the database consisting of the following relations: Flights(Fl#: integer, From: string, To: string, Distance: integer, departs: Time, Arrives: time) Flight Instance(Fl#: integer, Day: date, Aid: Integer) Aircraft(Aid: integer, Make: string, Model: string, CrusingRange: string) Certified(Eid: integer, Make: string, Model: string) Employee(Eid: integer, Ename: string, Salary: integer) Fight Attendant(Fl#: integer, Day: date, Eid:integer, Role: string) The Flight table contains general information about the flights whereas the Flight Instance is about a flight number on a specific date. Aircraft list the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT