BuyFindarrow_forward

Database Systems: Design, Implemen...

12th Edition
Carlos Coronel + 1 other
ISBN: 9781305627482

Solutions

Chapter
Section
BuyFindarrow_forward

Database Systems: Design, Implemen...

12th Edition
Carlos Coronel + 1 other
ISBN: 9781305627482
Textbook Problem

For each table, identify the primary key and the foreign key(s). If a table does not have a foreign key, write None.

FIGURE P3.17 THE CH03_TRANSCO DATABASE TABLES

images

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.

Program Explanation

Given database tables:

Table Name: TRUCK

TRUCK_NUM BASE_CODE TYPE_CODE TRUCK_MILES TRUCK_SERIAL_NUMBER
1001 501 1 32123.5 AA-332-12212-W11
1002 502 1 76984.3 AC-342-22134-Q23
1003 501 2 12346.6 AC-445-78656-Z99
1004   1 2894.3 WQ-112-23144-T34
1005 503 2 45673.1 FR-998-32245-W12
1006 501 2 193245.7 AD-456-00845-R45
1007 502 3 32013.2 AA-341-96573-Z84
1008 502 3 44213.6 DR-559-22189-D33
1009 503 2 10932.9 DE-887-98456-E94

Table Name: BASE

BASE_CODE BASE_CITY BASE_STATE BASE_AREA_CODE BASE_PHONE BASE_MANAGER
501 Murfreesboro TN 615 123-4567 Andrea D. Gallagher
502 Lexington KY 568 234-5678 George H. Delarosa
503 Cape Girardeau MO 456 345-6789 Maria J. Tallindo
504 Dalton GA 901 456-7890 Peter F. McAvee

Table Name: TYPE

TYPE_CODE TYPE_DESCRIPTION
1 Single box, double-axle
2 Single box, single-axle
3 Tandem trailer, single-axle

Primary Key and Foreign Key in the above Tables:

For Table Name: TRUCK:

Primary Key: TRUCK_NUM

“TRUCK_NUM” acts as primary key of the table because the attribute “TRUCK_NUM” is a unique ID that is assigned to every individual truck...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Additional Engineering Solutions

Find more solutions based on key concepts

Show solutions add

What are some basic database functions that a spreadsheet cannot perform?

Database Systems: Design, Implementation, & Management

Why must a band saw blade be annealed after welding?

Precision Machining Technology (MindTap Course List)

As explained in the chapter, the air resistance to motion of a vehicle is determined experimentally by placing ...

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

Describe the functions of the hydraulic system combination valve.

Automotive Technology: A Systems Approach (MindTap Course List)

What enterprise resource planning (ERP)? What is supply chain management (SCM)?

Systems Analysis and Design (Shelly Cashman Series) (MindTap Course List)