sql11g 01
sql11g 01
Chapter 1
Overview of Database Concepts
Objectives
Define database terms
Identify the purpose of a database
management system (DBMS)
Explain database design using entityrelationship models and normalization
Explain the purpose of a Structured Query
Language (SQL)
Understand how this textbooks topics are
sequenced and how the two sample databases
are used
Oracle 11g: SQL
Database Terminology
Database logical structure to store data
Database management system (DBMS)
software used to create and interact with
the database
Database Components
Character
Field
Record
File
Components Example
10
Database Example
11
12
Database Design
Systems Development Life Cycle (SDLC)
Entity-relationship model (E-R model)
Normalization
13
14
Entity-Relationship Model
(E-R Model)
Used to depict the relationship that exists
among entities
The following relationships can be included
in an E-R model:
One-to-one
One-to-many
Many-to-many
15
16
One-to-One Relationship
Each occurrence of data in one entity is
represented by only one occurrence of data in the
other entity
Example: Each individual has just one Social
Security number (SSN) and each SSN is assigned
to just one person
17
One-to-Many Relationship
Each occurrence of data in one entity can be
represented by many occurrences of the data in
the other entity
Example: A class has only one instructor, but each
instructor can teach many classes
18
Many-to-Many Relationship
Data can have multiple occurrences in both entities
Example: A student can take many classes, and
each class is composed of many students
Can not be included in the physical database
19
20
Database Normalization
Determines required tables and columns for each
table
Multistep process
Used to reduce or control data redundancy
21
22
Unnormalized Data
Contains repeating groups in the Author
column in the BOOKS table
23
24
25
26
27
28
29
30
31
32
Lookup Table
Common reference for descriptive data tables
referenced in a foreign key
33
34
35
Topic Sequence
The first half of the text will focus on creating a
database
The second half of the text will focus on querying or
retrieving data from a database
36
Summary
A DBMS is used to create and maintain a
database
A database is composed of a group of
interrelated tables
A file is a group of related records; a file is also
called a table in the physical database
A record is a group of related fields regarding one
specific entity; a record is also called a row
A record is considered unnormalized if it contains
repeating groups
Oracle 11g: SQL
37
Summary (continued)
A record is in first-normal form (1NF) if no
repeating groups exist and it has a primary key
Second-normal form (2NF) is achieved if the
record is in 1NF and has no partial
dependencies
After a record is in 2NF and all transitive
dependencies have been removed, then it is in
third-normal form (3NF), which is generally
sufficient for most databases
A primary key is used to uniquely identify each record
Oracle 11g: SQL
38
Summary (continued)
A common field is used to join data contained in
different tables
A foreign key is a common field that exists
between two tables but is also a primary key in
one of the tables
A lookup table is a common term for a table
referenced in a foreign key
A Structured Query Language (SQL) is a data
sublanguage that navigates the data stored
within a databases tables
Oracle 11g: SQL
39