CHAPTER 3 - Relational Database
CHAPTER 3 - Relational Database
INFORMATION SYSTEMS II
Chapter 3: Relational Databases
Learning Objectives
• Explain the importance and advantages of databases,
as well as the difference between database and file-
based legacy systems.
• Explain database systems, including logical and
physical views, schemas, the data dictionary, and
DBMS languages.
• Describe what a relational database is, how it
organizes data, and how to create a set of well-
structured relational database tables.
What Is a Database?
• Efficiently and centrally coordinates information for
a related group of files
• A file is a related group of records
• A record is a related group of fields
• A field is a specific attribute of
interest for the entity (record)
Advantages of Databases
• Data is integrated
• Data sharing
• Minimize data redundancy and inconsistencies
• Data is independent of the programs that use the
data
• Data is easily accessed for reporting and cross-
functional analysis
Database Users and Designers
• Different users of the database information are at
an external level of the database. These users have
logical views of the data.
• At an internal level of the database is the physical
view of the data which is how the data is actually
physically stored in the system.
• Designers of a database need to understand user’s
needs and the conceptual level of the entire
database as well as the physical view.
Schemas
• Conceptual-level—organization wide view
• External-level—individual user’s view
• Internal-level—low level view
Database Design
• To design a database, you need to have a
conceptual view of the entire database. The
conceptual view illustrates the different files and
relationships between the files.
• The data dictionary is a “blueprint” of the
structure of the database and includes data
elements, field types, programs that use the data
element, outputs, and so on.
DBMS Languages
• Data Definition Language (DDL)
• Builds the data dictionary
• Creates the database
• Describes logical views for each user
• Specifies record or field security constraints
• Data Manipulation Language (DML)
• Changes the content in the database
• Creates, updates, insertions, and deletions
• Data Query Language (DQL)
• Enables users to retrieve, sort, and display specific data
from the database
Relational Database
• Represents the conceptual and external schema as
if that “data view” were truly stored in one table.
• Although the conceptual view appears to the user
that this information is in one big table, it really is a
set of tables that relate to one another.
Conceptual View Example
Customer Name Sales Invoice # Invoice Total
Primary Keys
Foreign Key (Customer # is a Foreign key in
the Sales table because it is a Primary key
that uniquely identifies Customers in the
Customer table). Because of this, the Sales
table can relate to the Customer table (see
red arrow above).