Database Systems: Design  Implementation  & Management
Database Systems: Design Implementation & Management
11th Edition
ISBN: 9781305850378
Author: Coronel
Publisher: Cengage
bartleby

Concept explainers

Question
100%
Book Icon
Chapter 3, Problem 1P
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.

Foreign Key:

Foreign Key is a column in a relational database table which provides a relation between two tables. It provides a cross reference between tables by pointing to primary key of another table.

Example:

In STUDENT database table, the attribute “reg_no” acts as primary key and in COURSE database table in which the student selects his or her course, the same “reg_no” acts as foreign key for the STUDENT table.

Given database tables:

Table Name: EMPLOYEE

EMP_CODE EMP_TITLE EMP_LNAME EMP_FNAME EMP_INITIAL EMP_DOB STORE_CODE
1 Mr. Williamson John W 21-May-84 3
2 Ms. Ratula Nancy   09-Feb-89 2
3 Ms. Greenboro Lottie R 02-Oct-81 4
4 Mrs. Rumpersfro Jennie S 01-Jun-71 5
5 Mr. Smith Robert L 23-Nov-59 3
6 Mr. Renselear Cary A 25-Dec-85 1
7 Mr. Ogallo Roberto S 31-Jul-82 3
8 Ms. Johnson Elizabeth I 10-Sep-88 1
9 Mr. Eindsmar Jack W 19-Apr-55 2
10 Mrs. Jones Rose R 06-Mar-66 4
11 Mr. Broderick Tom   21-Oct-72 3
12 Mr. Washington Alan Y 08-Sept-74 2
13 Mr. Smith Peter N 25-Aug-64 3
14 Ms. Smith Sherry H 25-May-66 4
15 Mr. Olenko Howard U 24-May-64 5
16 Mr. Archialo Barry V 03-Sep-60 5
17 Ms. Grimaldo Jeanine K 12-Nov-70 4
18 Mr. Rosenburg Andrew D 24-Jan-71 4
19 Mr. Rosten Peter F 03-Oct-68 4
20 Mr. Mckee Robert S 06-Mar-70 1
21 Ms. Baumann Jennifer A 11-Dec-74 3

Table Name: STORE

STORE_CODE STORE_NAME STORE_YTD_SALES REGION_CODE EMP_CODE
1 Access Junction 1003455.76 2 8
2 Database Corner 1421987.39 2 12
3 Tuple Charge 986783.22 1 7
4 Attribute Alley 944568.56 2 3
5 Primary Key Point 2930098.45 1 15

Table Name: REGION

REGION_CODE REGION_DESCRIPT
1 EAST
2 WEST

Blurred answer
Students have asked these similar questions
You have the following tables:   APARTMENTS (ADDRESS, CITY, STATE, RENTER_ID, RENTER_LAST_NAME) RENTERS (RENTER_ID, FIRST_NAME, LAST_NAME)   What is the primary key for the APARTMENTS table? (It may be a composite key involving 2 or more fields) What are the foreign keys, if any?   What is the primary key for the RENTERS table? What are the foreign keys, if any? What field in RENTERS can be eliminated so that the RENTERS table is normalized?
Q1- List all employees whose job_id is IT_PROG and hired after 01-JAN-95 and earning more than5000.Q2- List all employee except those with employee_id 101, 102, 103, 104 and 105Q3- Display the city attribute from locations table. Show the ones that contain “South” in the city.Sort the list in descending order.Q4- Display the first name, last name, salary, manager id and job id of all employees whose last fourcharacters of job id ends with “LERK”.Q5- Display the first name, last name and salary of all employees. Round the salary to the nearestunit of 1000 (ex. Salary=4500 New Salary=5000). Label the column as "New Salary".
CUSTOMER Customer table is composed of customer number, name and phone number. Give and fill-in the appropriate attribute name for each of the column. custID 123 124 125 126 reservelD 5001 5002 5003 5004 5005 5006 5007 RESERVATION Each reservation is for one taxi. Reservation table is composed of reservation identification number, start reservation date, end reservation date, reservation days requested by customers starting from reservation date until end of reservation date, customer number that make the reservation and taxi number assigned to the reservation. Give and fill-in the appropriate attribute name for each of the column. taxill custName Ahmad Bin Abdullah Fatimah Binti Adam LAI LA2 Ruqayya Binti Idris Sulaiman Bin Daud LA3 LA4 startDate 01/10/2019 05/10/2019 05/10/2019 15/10/2019 20/10/2019 27/10/2019 02/11/2019 taxiType endDate 03/10/2019 12/10/2019 08/10/2019 17/10/2019 25/10/2019 Sedan Sedan Van Van 30/10/2019 04/11/2019 cust Phoneno TAXI Taxi table is composed of taxi…

Chapter 3 Solutions

Database Systems: Design Implementation & Management

Ch. 3 - Create the table that results from applying a...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. 14RQCh. 3 - Prob. 15RQCh. 3 - Prob. 16RQCh. 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. 22RQCh. 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
Computer Science
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
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
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
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: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