Modern Database Management (12th Edition)
12th Edition
ISBN: 9780133544619
Author: Jeffrey A. Hoffer, Ramesh Venkataraman, Heikki Topi
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 5, Problem 5.35PAE
Program Plan Intro
The types of indexes recommended for a given
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Consider the following database schema for student game, where each team is led by a
student of the team and each game is between two teams (Host and Guest):
Students
Student Id
Student Name
Address
Teams
Team Id
Team Name
Rank
Team Leader
Membership
Student id
Team Id
Games
Game id
Score
Date
Host Team
Guest Team
Your task is to show all the primary and foreign keys in Schema.
Let the database has two relations P(a, b) and
Q(m, a, n) in which a is the primary key of the
relation P and m is the primary key of the
relation Q. Instance of P has 70 Tuples and
Instance of Q has 42. What is the maximum
number of rows in the new instance produced by
P Q? ( is natural join)
QUESTION 14
Consider the database schema below for cities in countries. A country have many cities, and the same city name can be found in different countries.
Country (ID: integer, Name: String (unique), SN: serialNumber (int)(unique))
City (serialNo: integer (unique, not null), CountryID: Integer, CityName: String, Population: integer)
The same country (ID , name) can be added twice in Country relation with different SN?
No, violates entity Integrity constraint
No, violates referential integrity constraint.
No, violates key constraint.
Yes.
No, violates domain constraints.
Chapter 5 Solutions
Modern Database Management (12th Edition)
Ch. 5 - Prob. 5.1RQCh. 5 - Prob. 5.2RQCh. 5 - Prob. 5.3RQCh. 5 - Prob. 5.4RQCh. 5 - Prob. 5.5RQCh. 5 - Prob. 5.6RQCh. 5 - Prob. 5.7RQCh. 5 - Prob. 5.8RQCh. 5 - Explain why you sometimes have to reserve much...Ch. 5 - Why are field values sometimes coded?
Ch. 5 - Prob. 5.11RQCh. 5 - Prob. 5.12RQCh. 5 - Explain why normalized relations may not comprise...Ch. 5 - Prob. 5.14RQCh. 5 - List three common situations that suggest that...Ch. 5 - Explain the reasons why some experts are against...Ch. 5 - Prob. 5.17RQCh. 5 - Prob. 5.18RQCh. 5 - Prob. 5.19RQCh. 5 - Prob. 5.20RQCh. 5 - Prob. 5.21RQCh. 5 - State nine rules of thumb for choosing indexes.Ch. 5 - One of the strongest recommendations regarding...Ch. 5 - Explain why an index is useful only if there is...Ch. 5 - Indexing can clearly be very beneficial. Why...Ch. 5 - Consider the following two relations for...Ch. 5 - Prob. 5.28PAECh. 5 - Prob. 5.29PAECh. 5 - Prob. 5.30PAECh. 5 - Prob. 5.31PAECh. 5 - Suppose you are designing a default value for the...Ch. 5 - When a student has not chosen a major at a...Ch. 5 - Prob. 5.34PAECh. 5 - Prob. 5.35PAECh. 5 - Consider the relations in Problem and Exercise...Ch. 5 - Prob. 5.37PAECh. 5 - Prob. 5.38PAECh. 5 - Prob. 5.39PAECh. 5 - Prob. 5.40PAECh. 5 - Prob. 5.41PAECh. 5 - Consider the relations specified in Problem and...Ch. 5 - Prob. 5.43PAECh. 5 - Prob. 5.44PAECh. 5 - Prob. 5.45PAECh. 5 - Prob. 5.46PAECh. 5 - Prob. 5.47PAECh. 5 - Problems and Exercises 8-65 through 8-68 refer to...Ch. 5 - Refer to the large Pine Valley Furniture Company...Ch. 5 - Problems and Exercises 8-65i5 through 8-68 refer...Ch. 5 - Refer to Figure 4-5 0. For each of the following...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In a database, there are three different kinds of relationships: identifying, non-identifying, and generic?arrow_forwardBased on the following database schemas: Homestay (homestayNo (PK), homestayName, address, telNo, city)Room (roomNo, homestayNo (PK), type, price)Booking (homestayNo, guestNo (PK), dateFrom, dateTo, roomNo) Guest (guestNo (PK), guestName, guestAddress, guestTelNo) Assume the following indexes exist:a) a hash index with no overflow on the roomNo and homestayNo as a composite primary key in Room;b) a clustering index on the foreign key attributes homestayNo in Room;c) a B⁺-tree index on the price attribute in Room;d) a secondary index on the attribute type in Room. nTuples(Room) = 20000 bFactor(Room) = 200nTuples(Homestay) = 100 bFactor(Homestay) = 40nTuples(Booking) = 100000 bFactor(Booking) = 60nDistincthomestayNo(Room) = 50 nDistinctroomNo(Booking) = 150nDistincttype(Room) = 10…arrow_forwardBased on the following database schemas:Homestay (homestayNo (PK), homestayName, address, telNo, city)Room (roomNo, homestayNo (PK), type, price)Booking (homestayNo, guestNo (PK), dateFrom, dateTo, roomNo)Guest (guestNo (PK), guestName, guestAddress, guestTelNo)Assume the following indexes exist:a) a hash index with no overflow on the roomNo and homestayNo as a composite primary key in Room;b) a clustering index on the foreign key attributes homestayNo in Room;c) a B+-tree index on the price attribute in Room;d) a secondary index on the attribute type in Room.nTuples(Room) = 20000 bFactor(Room) = 200nTuples(Homestay) = 100 bFactor(Homestay) = 40nTuples(Booking) = 100000 bFactor(Booking) = 60nDistincthomestayNo(Room) = 50 nDistinctroomNo(Booking) = 150nDistincttype(Room) = 10 nDistincthomestayName(Homestay) = 50nDistinctprice(Room) = 500 maxprice(Room) = 500minprice(Room) = 200 nLevelstype(I) = 2nLevelshomestayNo(I) = 2 nLfBlocksprice(I) = 50nLevelsprice(I) = 2 Log2100 = 6.64Log250 =…arrow_forward
- Based on the following database schemas: Homestay (homestayNo (PK), homestayName, address, telNo, city)Room (roomNo, homestayNo (PK), type, price)Booking (homestayNo, guestNo (PK), dateFrom, dateTo, roomNo) Guest (guestNo (PK), guestName, guestAddress, guestTelNo) Assume the following indexes exist:a) a hash index with no overflow on the roomNo and homestayNo as a composite primary key in Room;b) a clustering index on the foreign key attributes homestayNo in Room;c) a B⁺-tree index on the price attribute in Room;d) a secondary index on the attribute type in Room. nTuples(Room) = 20000 bFactor(Room) = 200nTuples(Homestay) = 100 bFactor(Homestay) = 40nTuples(Booking) = 100000 bFactor(Booking) = 60nDistincthomestayNo(Room) = 50 nDistinctroomNo(Booking) = 150nDistincttype(Room) = 10 nDistincthomestayName(Homestay) = 50nDistinctprice(Room)…arrow_forwardBased on the following database schemas: Homestay (homestayNo (PK), homestayName, address, telNo, city)Room (roomNo, homestayNo (PK), type, price)Booking (homestayNo, guestNo (PK), dateFrom, dateTo, roomNo) Guest (guestNo (PK), guestName, guestAddress, guestTelNo) Assume the following indexes exist:a) a hash index with no overflow on the roomNo and homestayNo as a composite primary key in Room;b) a clustering index on the foreign key attributes homestayNo in Room;c) a B⁺-tree index on the price attribute in Room;d) a secondary index on the attribute type in Room. nTuples(Room) = 20000 bFactor(Room) = 200nTuples(Homestay) = 100 bFactor(Homestay) = 40nTuples(Booking) = 100000 bFactor(Booking) = 60nDistincthomestayNo(Room) = 50 nDistinctroomNo(Booking) = 150nDistincttype(Room) = 10…arrow_forwardGiven the following relation R and its functional dependencies: R(workerNumber, repairNumber, workerName, machineNumber, spentTime, repairDate, machineName, workshopNumber, workshopName ) workerNumber à workerName repairNumber à repairDate, machineNumber machineNumber à machineName, workshopNumber workshopNumber à workshopName Explain the types of all the dependencies in the relation R. Create a database whose tables are at least in 3NF, showing the dependency diagrams for each table.arrow_forward
- Consider the following database schema for student game, where each team is led by a student of the team and each game is between two teams (Host and Guest): Students Student_Id Student_Name Address Team_Id Team_Name Rank Team_Leader Teams Student_id Team_Id Game_id Score Date Host_Team Guest_Team Membership Games Show all the primary and foreign keys in Schema.arrow_forwardMotor Vehicle Dealership Database: Consider Aaron's dealership, a multi-brand vehicle dealership whose database consists of four relations as described below. Using this database, answer questions Vehicle(make, model, manfYear, color, vinNum, type, purchaseld) Stock(stockNum, unitPrice, deliveryDate, vehiclesRemaining) Manufacturer(name, manfCode, plantLocation) Purchase(purchaseld, mCode, numVehicles, orderDate, deliveryStatus) • A vehicle can be one of the following types: Car, Truck, SUV • vinNum →Vehicle Identification Number • manfCode/mCode → a 4 character alphanumeric code for the manufacturer • manfYear → year of vehicle manufacture • purchaseld and stockNum refer to the same item • The delivery status is true if the order has been delivered to the dealership and false otherwise • Manufacturer name may not contain the same data as the make of the Vehicle. For example, • name of the manufacturer: Ford Motor Company • make of the vehicle: Ford Q1. Using SQL, list the names of all…arrow_forwardGiven the following relational schema of a database library (primary keys are underlined and foreign keys are preceded by #): Student(studentNumber, StudentName, studentAddress) Book(bookNumber, bookTitle, #authorNumber, #editorNumber, yearEdition) Author(authorNumber, authorName, authorAddress) Editor(editorNumber, editorName, editorAddress) Borrow(#studentNumber, #bookNumber, borrowDate, returnDate) Write the following queries in Relational Algebra: List the details (bookNumber, bookTitle) of books whose author’s name is ‘Ramakrishnan’arrow_forward
- Given the following relational schema of a database library (primary keys are underlined and foreign keys are preceded by #): Student(student Number, StudentName, studentAddress) Book(bookNumber, bookTitle, #authorNumber, #editorNumber, yearEdition) Author(authorNumber, authorName, authorAddress) Editor(editorNumber, editorName, editorAddress) Borrow(#studentNumber, #bookNumber, borrowDate, returnDate) 1) List the books (bookNumber) that have never been borrowed.arrow_forwardGiven the following relational schema of a database library (primary keys are underlined and foreign keys are preceded by #): Student(studentNumber, StudentName, studentAddress) Book(bookNumber, bookTitle, #authorNumber, #editorNumber, yearEdition) Author(authorNumber, authorName, authorAddress) Editor(editorNumber, editorName, editorAddress) Borrow(#studentNumber, #bookNumber, borrowDate, returnDate) Write the following queries in Relational Algebra: Find the details of students who borrowed the book titled ‘Database Management Systems’arrow_forwardConsider the following Books database which is used to keep track of books and their readers. Assume that the database is composed of the following three relations where the key attributes are underlined. BOOK Title PERSON READS PID 111 111 222 333 444 BID PID 111 Gender BookID StartDate 2/4/2015 PYear Price Name 2 Internet programming Database System Programmin g using C++ 1 2016 50 Sami M 3 2/6/2015 8/4/2017 Khawla Rawan Zainab Khamis 222 2 2013 45 4 333 444 2 2/6/2015 3 2011 25 555 M 2 2/4/1995 444 1 2/8/1995 Operating Systems Oracle DBMS 4 2009 35 5 2017 50 • Write a SQL query to display the information including title, name (person name), and PID of all the books which have been read (StartDate) in the year 2015, and the price of these books is less than 50. Convert the generated SQL query into a Relational algebra query. Then, draw the optimized query tree (fifth step of query optimization). Note: You can draw a tree on a paper, scan, and upload in the Moodle OR you can describe…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning