Database Systems: Design, Implementation, & Management
Database Systems: Design, Implementation, & Management
12th Edition
ISBN: 9781305627482
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
Question
Book Icon
Chapter 3, Problem 13P
Program Plan Intro

Primary Key:

A Primary Key in a database table is a field in the table that uniquely identifies every row or record present in the database table.

Example:

  • Students in Universities are assigned a unique registration number.
  • Therefore, in a STUDENT database table, the attribute “reg_no” acts as primary key.

Entity Integrity:

Entity Integrity is a mechanism that is used to protect primary keys in the database. Entity Integrity ensures the following properties for primary key:

  • The primary key of one database table row must not match the primary key of any other row present in the table.
  • No component of primary key must be null.

Blurred answer
Students have asked these similar questions
Consider the following table schemas (primary keys are underlined):  Company (cID, name, location)  Flight (cID, fnumber, departure, arrival, price:integer, numberOfSeats:integer)  Book (bID, cID, fnumber, customerID, seat, date)  Customer (customerID, name, address)    Draw Query-By-Example (QBE) tables for the following queries.    1.Find the names and addresses of customers who never booked a flight.  2. Find the names of customers who booked the flight to New York more than  once.  3.Find the names of the companies that have the biggest (in terms of the  number of seats) airplane.  4. Find the names of customers who booked flights to Boston and  Seattle.  5. Insert tuples into a new table CustomerCheck that stores the names and  addresses of customers along with their flight numbers who booked a flight from  New York to LA on 09/30/21. Note: Query by example table is needed not just any table
Create a Star Schema ERD for the Bob’s Fixit case study. Create the tables (create table DDL) from your Star Schema ERD.   Bob would like to know the following: The bid dollar amount by the customer zip code and customer state. The bid dollar amount by the bid month and bid year.
Implement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram:   The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply…

Chapter 3 Solutions

Database Systems: Design, Implementation, & Management

Ch. 3 - Prob. 11RQCh. 3 - Prob. 12RQCh. 3 - Use Figure Q3.13 to answer Questions 1317. FIGURE...Ch. 3 - Create the table that results from applying a...Ch. 3 - Write the relational algebra formula to apply an...Ch. 3 - Create the table that results from applying an...Ch. 3 - Using the tables in Figure Q3.13, create the table...Ch. 3 - Prob. 18RQCh. 3 - Prob. 19RQCh. 3 - Prob. 20RQCh. 3 - Identify and describe the components of the table...Ch. 3 - Identify the primary keys. FIGURE Q3.22 THE...Ch. 3 - Identify the foreign keys. FIGURE Q3.22 THE...Ch. 3 - Create the ERM. FIGURE Q3.22 THE CH03_THEATER...Ch. 3 - Create the relational diagram to show the...Ch. 3 - Prob. 26RQCh. 3 - What would be the conceptual view of the INDEX...Ch. 3 - Prob. 1PCh. 3 - Prob. 2PCh. 3 - Do the tables exhibit referential integrity?...Ch. 3 - Describe the type(s) of relationship(s) between...Ch. 3 - Prob. 5PCh. 3 - Prob. 6PCh. 3 - Prob. 7PCh. 3 - Prob. 8PCh. 3 - Create the relational diagram to show the...Ch. 3 - Prob. 10PCh. 3 - Prob. 11PCh. 3 - Create the relational diagram to show the...Ch. 3 - Prob. 13PCh. 3 - Do the tables exhibit referential integrity?...Ch. 3 - Prob. 15PCh. 3 - Prob. 16PCh. 3 - For each table, identify the primary key and the...Ch. 3 - Prob. 18PCh. 3 - Do the tables exhibit referential integrity?...Ch. 3 - Identify the TRUCK tables candidate key(s). FIGURE...Ch. 3 - For each table, identify a superkey and a...Ch. 3 - Prob. 22PCh. 3 - Prob. 23PCh. 3 - Prob. 24PCh. 3 - Create the ERD. (Hint: Look at the table contents....Ch. 3 - Prob. 26PCh. 3 - Prob. 27PCh. 3 - Prob. 28PCh. 3 - Create the table that would result from applying...Ch. 3 - Create the table that would result from applying...Ch. 3 - Create the table that would result from applying a...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781305627482
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    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
    Text book image
    Oracle 12c: SQL
    Computer Science
    ISBN:9781305251038
    Author:Joan Casteel
    Publisher:Cengage Learning
  • Text book image
    CMPTR
    Computer Science
    ISBN:9781337681872
    Author:PINARD
    Publisher:Cengage
    Text book image
    A Guide to SQL
    Computer Science
    ISBN:9781111527273
    Author:Philip J. Pratt
    Publisher:Course Technology Ptr
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
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
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr