Identify primary key and foreign key

Assignment Help Basic Computer Science
Reference no: EM133051708

Radisson Blue Hotels stores information about their hotels in different countries. Every hotel is identified by hotel id, hotel name, hotel address, city and URL. Every country is identified by country code, country name and country currency. Guests staying in the hotel is identified by guest number, guest name, guest address and guest city. Every room in the hotel is identified by room number, and room floor. Every room booking is identified by booking id, starting date, and ending date. There are different types of rooms in the hotel. Each room type is identified by room type code, room standard rate, and description. In each country, there may be no hotels or more than one hotel. A hotel may have one or more rooms. A guest can book one or more rooms and a room may be booked by one or more guests. A hotel may have one or more bookings and each booking is associated with exactly one hotel. Each room type may have one or more rooms and a room belongs to one room type.

1. Write the schema of the appropriate relations for the above scenario. Identify the primary key and the foreign key in each of the relations.

How did you identify the primary key and foreign key? Explain.

2) Use the designed relations to write SQL statements for the following questions:

 Explain the working of each query in detail.

a. Display all the rooms having the same rate in the ascending order of room rate.

b. List the number of hotels in each country. Only include countries with more than 4 hotels.

c. Display the details of hotels that is not yet included in any booking.

d. Display all the details of guests who booked hotels on ‘2021-05-01'.

e. Display the room number, room standard rate and the hotel id.

f. Display the details of countries with country name starting with letters other than any letter within 'A' and 'P'.

Reference no: EM133051708

Questions Cloud

Security of cloud computing : Cloud technology and specifically cloud storage have a major impact on external data storage and security controls with companies
Creating good password security : An IT Security consultant has made three primary recommendations regarding passwords: Prohibit guessable passwords. Make authenticators unforgeable
Strengths and weaknesses of using project management : What are the strengths and weaknesses of using project management in any of the following contexts: technology, construction or education.
Focuses on attribution theory : Journal article focuses on attribution theory and how it influences the implementation of innovation technologies.
Identify primary key and foreign key : How did you identify the primary key and foreign key? Explain. Explain the working of each query in detail.
Growth in telecommuting and mobile work arrangements : Given the growth in telecommuting and other mobile work arrangements, how might offices physically change in the coming years?
Columbus instruments-talented fast-trackers : What are the implications of CIC's approach to staffing project teams? Is the company using project teams as training grounds for talented fast-trackers,
Definition of network access control : Provide a brief definition of network access control. What is the cloud computing reference architecture?
Discuss the importance of slave narratives : Discuss the importance of slave narratives for understanding the experiences of the enslaved. identify specific narratives and explain the circumstances under w

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd