Preview

wrk of database

Satisfactory Essays
Open Document
Open Document
416 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
wrk of database
1. Describe the relations that would be produced by the following relational algebra operations
a) ПhotelNo(σprice>100(Room))
It will produce a single attribute (hotelNo) giving the number of hotels room prices greater 100.
b) σHotel.hotelNo=Room.hotelNo(Hotel X Room)
A join produce of hotel and room containing all the attributes of both.
c) ПhotelName(Hotel Hotel.hotelNo=Room.hotelNo (σprice>100(Room)))
It is a join of hotel and room with the price greater than 100.
d) Guest(σdateTo>’1-June-12’(Booking)
It produces a join of guest and booking with an end date greater than June 12.

2. Provide the equivalent tuple relational calculus expressions for each of the relational algebra queries given in question 1
a) ПhotelNo(σprice>100(Room))

TRC: {R.hotelNo | Room(R) /\ R.price > 100}
b) σHotel.hotelNo=Room.hotelNo(Hotel X Room)
TRC: {H, R | Hotel(H) /\ (R) (Room(R) /\ (H.hotelNo = R.hotelNo))}
c) ПhotelName(Hotel Hotel.hotelNo=Room.hotelNo (σprice>100(Room)))
TRC: {H.hotelName | Hotel(H) /\ (R) (Room(R) /\ (H.hotelNo = R.hotelNo) /\ (R.price > 100))}
d) GuestσdateTo>’1-June-12’(Booking)
TRC: {G.guestNo, G.guestName, G.guestAddress, B.hotelNo, B.dateFrom, B.dateTo, B.roomNo | Guest(G)  (B) (Booking(B) /\ (G.guestNo = B.guestNo)/\(B.dateTo > ‘1-June-12’))}

3. Describe the relations that would be produced by the following tuple relational calculus expressions:
a) {H.hotelName | Hotel(H)  H.city = ‘London’} This will produce a relation containing the names of all hotels in London.
b) {H.hotelName | Hotel(H)  (R) (Room(R)  H.hotelNo  R.hotelNo R.price  80)} This will produce a relation containing the names of all hotels that have a room price above 80.
c) {H.hotelName | Hotel(H)  (B) (G) (Booking(B)  Guest(G)  H.hotelNo  B.hotelNo B.guestNo = G.guestNo  G.guestName = ‘Mike Brown)}
This will produce a relation containing the names of all hotels that have a booking for a guest called Mike Brown.

4. Generate the

You May Also Find These Documents Helpful

  • Good Essays

    2. What is the domain of the relation {(3, 4), (4, 3), (4, 4), (5, 2)}?…

    • 506 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    PT1420 Chapter 3 Review

    • 1062 Words
    • 8 Pages

    3. Write assignment statements that perform the following operations with the variables a, b, and c.…

    • 1062 Words
    • 8 Pages
    Satisfactory Essays
  • Powerful Essays

    Nt1330 Unit 5 Assignment

    • 2359 Words
    • 10 Pages

    | Hotel_rooms |Header node for hotel rooms | | room |Header node for individual room | | ref |Room ID | | type |Room type ID | | sleeps |Number of people the room sleeps | | breakfast |Is breakfast included in price | | description |Room Description | | Alternate_description |Alternate description of room | | Rack_rate |Default price of room…

    • 2359 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    4.) Write assignment statements that perform the following operations with the variables a, b, and c:…

    • 453 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1330 Unit 4

    • 1142 Words
    • 5 Pages

    4. Lynn is adding a billing table to a customer database. If she wants the database to retrieve…

    • 1142 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    The system would require that future guests make a reservation for a span of dates.…

    • 412 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    unit 3

    • 313 Words
    • 2 Pages

    3. Write assignment statements that perform the following operations with the variables a, b, and c.…

    • 313 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    UNIT 2

    • 470 Words
    • 3 Pages

    4.) Write assignment statements that perform the following operations with the variables a, b, and c:…

    • 470 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Using yourself as the subject, give an example of each of the following asymmetrical relationships:…

    • 832 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Assign1

    • 1387 Words
    • 16 Pages

    4. Show the result of a natural join that combines the Customer and OrderTbl tables.…

    • 1387 Words
    • 16 Pages
    Satisfactory Essays
  • Good Essays

    b. From the AH&LA Web site, describe the typical lodging customer for the most recent year that data are available…

    • 483 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Database

    • 317 Words
    • 2 Pages

    Describe the ways in which database technologies could be used by an office stationery supply company to achieve low-cost leadership.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    PT 1420 Assignment 3

    • 676 Words
    • 3 Pages

    3. Write assignment statements that perform the following operations with the variables a, b, and c.…

    • 676 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    CSC424 Exam 1

    • 856 Words
    • 5 Pages

    1) (30 points) Let R (A, B, C, D, E) be a relations with attributes A, B, C, D, E.…

    • 856 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Astoria Plaza

    • 276 Words
    • 2 Pages

    City Cove Resort and Hotel has a partnership business structure between ______________names of group mates________________________ who agreed to carry on a resort and hotel company in the spirit of cooperation. Each of them contributed equal shares by combining their financial assets, as well as their skills and knowledge in hotel, resort, and restaurant operations and management. Most of all, as partners, they have equally contributed for City Cove Resort and Hotel’s initial capital. All the decision-making will also involve all the partners and their votes on every matter that concerns City Cove Resort and Hotel will have equal value.…

    • 276 Words
    • 2 Pages
    Satisfactory Essays

Related Topics