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

  Appropriate for a sole proprietorship

What business concept would be appropriate for a sole proprietorship? A corporation? A limited liability company?

  Designing data communications network

How can a network designer determine if they are important, and how are they taken into account when designing a data communications network?

  Why is using specific nomenclature important

Why is using specific nomenclature important? Back up your reasoning with at least two references not including the textbook.

  Companies avoid faulty e-commerce strategies

How might value process frameworks help companies avoid faulty e-commerce strategies?

  Explain the phong lighting model in opengl

Explain the Phong lighting model in OpenGL. Submit a wire-frame model of your final project. Including the indices of the object.

  Number of instructor residents

List all cities that have 10 or more students and instructors combined. Show city, state, number of student residents, number of instructor residents

  Describe each of DNS zone types

Describe each of the DNS zone types that are available in Windows Server 2016. Explain why you would use each type of zone.

  Mobile systems are having major impact on business

Mobile systems are having a major impact on business and society today. Accordingly, mobile applications now form an important component of marketing

  Find the maximum possible profit

Construction a contractor builds two types of homes. The Carolina requires one lot, $160,000 capital, and 160 worker-days of labor.

  Understanding of hardware-software basics

How can an understanding of Hardware & Software Basics, Networking, and SCM, CRM, & ERP help you in your career?

  Information systems infrastructure-evolution and trends

Research at least two articles on the topic of Information systems infrastructure: evolution and trends.

  Write an animation program to demonstrate the new methods

write an animation program to demonstrate the new methods.

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