Documente Academic
Documente Profesional
Documente Cultură
RELATIONAL DATABASES
Instructors Manual
Learning Objectives:
1. Explain the importance and advantages of databases, as well as the
difference between database and file-based legacy systems.
2. Explain the difference between logical and physical views of a
database
3. Explain fundamental concepts of database systems such as DBMS,
schemas, the data dictionary, and DBMS languages
4. Describe what a relational database is and how it organizes data
5. Create a set of well-structured tables to properly store data in a
relational database
6. Perform simple queries using the Microsoft Access database
Note to Instructor: Objective 6 will require students to use the
following publishers website: http://www.prenhall.com/romney which will
be explained in more detail.
Questions to be addressed in this chapter:
Introduction
The emphasis in this chapter will be on understanding the structure of a
relational database system.
Files versus Databases
A file as described in the back of our book in the glossary is a
set of logically related records, such as the payroll records of
all employees.
Figure 4-1 on Page 104 shows the basic elements of data hierarchy.
Fields contain data about one customer such as the customers
address, customer name, etc.
Page 1 of 13
Database
File
Field
Record
Multiple Choice 2
Page 2 of 13
A customers name
Data about one customer
All inventory records
Data about one inventory item
Page 3 of 13
Cross-functional analysis:
relationships, such as the
and promotional campaigns,
used in the preparation of
In a database system,
association between selling costs
can be explicitly defined and
management reports.
Data sharing
Data independence
Central management of data
Data integration
Database Systems
Logical and Physical Views of Data
Figure 4-3 at the bottom of Page 107 provides an example of a
record layout of an accounts receivable file.
The logical view is how the user or programmer conceptually
organizes and understands the data.
The physical view refers to how and where the data are physically
arranged and stored in the computer system.
Figure 4-4 on Page 109 provides multiple logical views of data
As shown in Figure 4-4, database management system (DBMS)software
handles the link between the way data are physically stored and
each users logical view of the data.
Multiple Choice 4
Page 4 of 13
Schemas
A schema describes the logical structure of a database.
Three levels of schemas: the conceptual, the external and
the internal.
Figure 4-5 on Page 108 provides the three levels of schemas
The conceptual-level schema is the organization-wide view of
the entire data-base.
The external-level schema consists of a set of individual
user views of portions of the database, each of which is
also referred to as a subschema.
The internal-level schema provides a low-level view of the
database. It describes how the data are actually stored and
accessed, including information about record layouts,
definitions, addresses and indexes.
The Data Dictionary
The data dictionary contains information about the structure
of the database. The data elements composing the data base
are fully described in a data dictionary, which serves as a
repository containing facts about the structure of the data
elements employed in applications.
Table 4-1 on Page 110 provides an example of a data
dictionary.
Page 5 of 13
Multiple Choice 5
Page 6 of 13
DML
DQL
DDL
A and C
All of the above
Relational Databases
A data model is an abstract representation of the contents
of a database.
The relational data model represents everything in the
database as being stored in the form of tables like the one
shown in Table 4-2 on Page 111.
Technically, these tables are called relations (hence the
name relational data model), but we will use the two words
interchangeably.
Each row in a relation, called a tuple (which rhymes with
couple), contains data about a specific occurrence of the
type of entity represented by that table. For example, each
row in the inventory table in Table 4-2 contains data about
a particularly inventory item that S&S carries.
Types of Attributes
Page 7 of 13
Multiple Choice 8
In an inventory table, the most likely nonkey would be
a.
b.
c.
d.
e.
Item number
Color
Price
B and C
A and C
Page 8 of 13
Item
Quantity
Description
Unit Price
Extended Amount
Sales Table
Sales-Inventory Table
Inventory Table
Customer Table
Page 9 of 13
Page 10 of 13
Multiple Choice 9
Which of the following is not a basic requirement of a
relational database?
a. Every column in a row must be single valued
b. Primary keys cannot be null
c. Foreign keys must have values that correspond to
the value of another foreign key in another table
d. All nonkey attributes in a table should describe a
characteristic about the object identified by the
primary key.
e. All of the above are basic requirements of a
relational database.
Page 11 of 13
The Sales and Customer Tables, and the Results of the Query are
shown in Table 4-8 on Page 119
Note to Instructor: Attachment 1 to this Instructor Manual
provides a step-by-step picture screen explanation of how to
complete and run query 1.
Query 2. This query involves the Sales, Sales-Inventory and
Inventory tables. Students should be able now to determine the
Primary Keys and the Foreign Keys involved.
The Completed Query 2 and Query 2 Answer are provided in Table 4-9
on Page 120.
Query 3. Now we are using four tables; Customer, Sales, SalesInventory and Inventory tables.
The Completed Inquiry 3 and Query 3 Answer is provided in Table 410 on Page 123.
Query 4. We will be using the Sales, Sales-Inventory and Inventory
tables.
The Completed Inquiry 4 and Query 4 Answer is provided in Table 411 on Page 122.
Query 5. We will be using the same three tables that were used in
Query 4.
The Completed Inquiry 5 and Query 5 Answer is provided in Table 412 on Page 123.
Multiple Choice 10
What tables were needed in the query that answered the
question: How many televisions were sold in October?
a.
b.
c.
d.
e.
Sales table
Inventory table
Sales-Inventory table
All of the above
A and C
Page 12 of 13
Page 13 of 13