0% found this document useful (0 votes)
49 views54 pages

Chapter 1

Uploaded by

Osama Rousan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views54 pages

Chapter 1

Uploaded by

Osama Rousan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Database Processing: Fundamentals,

Design, and Implementation


Sixteenth Edition

Chapter 1
Introduction

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Learning Objectives (1 of 2)
1.1 To understand the importance of databases in Internet Web applications and
smartphone apps

1.2 To understand the nature and characteristics of databases

1.3 To survey some important and interesting database applications

1.4 To gain a general understanding of tables and relationships

1.5 To describe the components of a Microsoft Access database system and explain the
functions they perform

1.6 To describe the components of an enterprise-class database system and explain the
functions they perform

1.7 To define the term database management system (DBMS) and describe the
functions of a DBMS

1.8 To define the term database and describe what is contained within the database

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Learning Objectives (2 of 2)
1.9 To define the term metadata and provide examples of metadata

1.10 To define and understand database design from existing data

1.11 To define and understand database design as new systems development

1.12 To define and understand database redesign of an existing database

1.13 To understand the history and development of database processing

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
How Did We Get Here? The Internet World One

• Personal Computers became widely available


– 1977: Apple
– 1981: IBM PC

• Local Area Networks


– PCs were networked using Ethernet network
technology
▪ Developed at Xerox Palo Alto Research Center
(1970s)
▪ Adopted as a national standard in 1983

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
How Did We Get Here? The Internet World Two

• The Internet
– 1969: Created by DoD as ARPANET
• World Wide Web (also known as the Web or WWW)
– 1993: First Web browser available
– Mid 1990s: Online retail sites (shopping online)
▪ 1995: Amazon
▪ Followed by Best Buy
• Early 2000s: Web 2.0 allowed users to add content to
Web sites

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
How Did We Get Here? Mobile and Cell
Phones
• Mid 1970s: Mobile Phone (Cell Phone)
• Smartphone
– 2007: Apple iPhone
– 2008: Google Android Operating System
• 2020 – Thousands of application programs (apps)
written and in wide use today
• The Internet of Things (IoT) enables devices to be
connected and controlled by smart phones
• All of the above examples depend on databases!

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-1: Searching a Database in a Web
Browser (1 of 2)

The Pearson Higher Education Web Site Home Page and Entering Author Name
(Kroenke) as the Search Keyword

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-1: Searching a Database in a Web
Browser (2 of 2)

Books by Author Kroenke Found in the Database

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-2: The Internet and Mobile Device
World

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
The Characteristics of Relational
Databases
• The purpose of a database is to help people track things of interest to them.

• Databases can be sorted into two categories:


– 1) Relational
– 2) Non-Relational

• Enormous datasets are referred to as Big Data.

• Data is stored in tables, which have rows (also known as records) and
columns (also known as fields) like a spreadsheet.

• A database may have multiple tables, where each table stores data about a
different thing.

• Each row in a table stores data about an occurrence or instance of the thing
of interest.

• A database stores data and relationships.


Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Naming Conventions in This Textbook
• Table names are written with all capital letters:
– STUDENT, CLASS, GRADE, COURSE_INFO
• Column names are written with an initial capital letter,
and compound names are written with a capital letter on
each word:
– Term, Section, ClassNumber, StudentName

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
A Database Has Data and Relationships
• Relational databases are structured to store data and
have relationships among rows of data
• Each row of a table is identified by a primary key
• A surrogate key is automatically assigned by the
database and is used as a primary key
• A composite key is when more than one column is used
for a primary key (when needed as a primary key)
• A foreign key provides the link between two tables
which provides the link to a relationship

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-3: The STUDENT and CLASS
Tables

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-4: The STUDENT, CLASS, and
GRADE Tables

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-5: The Key Database
Characteristic: Related Tables

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-6: Microsoft Access 2019 View of
Tables and Relationships

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Databases Create Information
• Data = recorded facts and figures
• Information can be defined as:
– Knowledge derived from data
– Data presented in a meaningful context
– Data processed by summing, ordering, averaging,
computing, or other similar operations
• Databases record data, but they do so in such a way that
we can produce information from the data
– The data on STUDENTs, CLASSes, and GRADEs
could produce information about each student’s GPA

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-7: Example Database
Applications
Application Example Users Number of Users Typical Size Remarks

Sales Contact Salesperson 1 2,000 rows Products such as GioldMine and


Manager Act! are database centric.

Patient Medical office 15 to 50 100,000 rows Vertical market software vendors


appointment incorporate databases into their
(doctor, dentist) software products.

Customer Sales, marketing, or 500 10 million rows Major vendors such as Microsoft
relationship customer service and Oracle PeopleSoft Enterprise
management departments build applications around the
(CRM) database.

Enterprise An entire organization 5,000 10 million+ rows SAP uses a database as a central
resource repository for ERP data.
planning (ERP)

E-commerce Internet users Possibly millions 1 billion+ rows Drugstore.com has a database
site that grows at the rate of 20 million
rows per day!

Digital Senior managers 500 100,000 rows Displays extractions, summaries,


dashboard and consolidations of operational
database data.

Data mining Business analysts 25 100,000 to Data are extracted, reformatted,


millions+ cleaned, and filtered for use by
statisticalInc.
Copyright © 2021, 2018, 2015 Pearson Education, dataAll
mining tools.
Rights Reserved
Database Applications
• Multiuser Database Applications include:
– Customer Relationship Management (CRM) systems
manages all customer contacts.
– Enterprise Resource Planning (ERP) systems can
include all departments within an organization.
• E-commerce companies use Web activity databases for
marketing purposes.
• Reporting and data mining database applications do not
generate new data but summarize existing data to provide
insights to management.
– Also used for predicting future performance

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Components of a Database System
• Database System consists of four components:

1) Users
2) Database application
3) Database management system (DBMS)
4) Database

• Structured query language (SQL) is an internationally recognized


standard language used by all relational databases.

• Database management system (DBMS) is a computer program


used to create, process, and administer a database.

• A database application is a set of one or more computer programs


that serves as an intermediary between the user and the DBMS.
Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-8: The Components of a
Database System

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-9: The Components of a
Database System With SQL

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-10: Basic Functions of
Application Programs
Basic Functions of Application Programs

Create and process forms


Process user queries
Create and process reports
Execute application logic
Control the application itself

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-11: An Example Data Entry Form

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-12: Example SQL Query Results

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-13 Example Report

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-14: Functions of a DBMS
Functions of a DBMS

Create database
Create tables
Create supporting structures (e.g., Indexes)
Modify (insert, update, or delete) database data
Read database data
Maintain database structures
Enforce rules
Control concurrency
Perform backup and recovery

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
The Database
• A database is a self-describing collection of integrated
tables.
• The tables are called integrated because they store data
about the relationships between rows of data.
• A database is called self-describing because it stores a
description of itself.
• The self-describing data is called metadata, which is data
about data.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-15: Typical Metadata Tables (1 of 2)
USER_TABLES Table

TableName NumberColumns PrimaryKey


STUDENT 4 StudentNumber
CLASS 4 ClassNumber
GRADE 3 (StudentNumber, ClassNumber)

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-15: Typical Metadata Tables (2 of 2)
USER_COLUMNS Table

ColumnName TableName DataType Length (bytes)


StudentNumber STUDENT Integer 4
LastName STUDENT Text 25
FirstName STUDENT Text 25
EmailAddress STUDENT Text 100
ClassNumber CLASS Integer 4
Name CLASS Text 25
Term CLASS Text 12
Section CLASS Integer 4
StudentNumber GRADE Integer 4
ClassNumber GRADE Integer 4
Grade GRADE Decimal (2,1)

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-16: Database Contents

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Microsoft Access
• Microsoft Access is a personal database system
consisting of a DBMS plus an application generator.
• MS Access is a low-end product intended for individual
users and small workgroups.
• MS Access tries to hide much of the underlying database
technology from the user.
– This is a good strategy for beginners, but not for
database professionals.
• Note: Microsoft Access 2019 is discussed in detail in
Appendix A.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-17: Components of a Microsoft
Access Database System

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-18: Microsoft Access 2019

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-19: Components of an Enterprise-
Class Database System

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-20: Microsoft SQL Server 2019

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-21: Oracle Database XE

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-22: MySQL 8.0

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-23: Three Types of Database
Design
Types of Database Design Process

• From existing data (Chapters 3 and 4)


– Analyze spreadsheets and other data tables
– Extract data from other databases
– Design using normalization principles
• New systems development (Chapters 5 and 6)
– Create data model from application requirements
– Transform data model into database design
• Database redesign (Chapter 8)
– Migrate databases to newer databases
– Integrate two or more databases
– Reverse-engineer and design new databases using normalization
principles and data model transformation
Note: Chapter 7 discusses database implementation using SQL. You need that knowledge before you
can understand database redesign.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-24: Databases Originating From
Existing Data

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-25: Data Import: One or Two
Tables?

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-26: Databases Originating From
New Systems Development

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-27: Databases Originating From
Database Redesign

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-28: Working Domains of Knowledge Workers,
Programmers, and Database Administrators

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-29: Priorities of What You Need
to Know
Topic Chapter Importance to Importance to
Database Knowledge Worker
Administrator and Programmer

Basic SQL Chapter 2 1 2

The relational database model Chapter 3 2 2

Design via normalization Chapter 4 2 1

Data models Chapter 5 2 1

Data model transformation Chapter 6 2 1

SQL DDL and constraint enforcement Chapter 7 3 1

Database redesign Chapter 8 3 1

Database administration Chapter 9 3 1

SQL Server, Oracle Database, MySQL, Chapters 10, 10A, 10B, 3 1


and ArangoDB specifics 10C, and 10D

Database application technology Chapters 11, 12, 13 1 3

1 = Very important; 2 = Important; 3 = Less important


Warning: Opinions vary, ask your instructor for his or hers.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-30: Database History (1 of 2)
Era Years Important Products Remarks

Predatabase Before 1970 File Managers All data were stored in separate files. Data
integration was very difficult. File storage space
was expensive and limited.

Early Database 1970-1980 ADABAS, System2000, First products to provide related tables. CODASYL
Total, IDMS, IMS DBTG and hierarchical data models (D L/One) were
prevalent.

Emergence of 1978-1985 DB2, Oracle Database, Early relational DBMS products had substantial
relational model Ingres inertia to overcome. In time, the advantages
weighed out.
Microcomputer 1982-1992+ dBase- , R:base,
Two Amazing! A database on a micro. All micro DBMS
DBMS products Paradox, Microsoft products were eliminated by Microsoft Access in
Access the early 1990s.

Object-oriented 1985-2000 Oracle ODBMS, Never caught on. Required relational database to
DBMS Gemstone, O2, Versant be converted. Too much work for perceived
benefit.

Data 1998–present Red Brick Warehouse, Created to allow data analysis and the use of
Warehouses Prism Warehouse business intelligence (BI) systems as discussed in
Manager, others built with Chapter 12.
existing relational DBMS
products

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-30: Database History (2 of 2)
Era Years Important Products Remarks

Web 1995-Present IIS, Apache, PHP, ASP.NET, Stateless characteristic of HTTP was a problem at
Databases and Java first. Early applications were simple one-stage
transactions. Later, more complex logic developed.

Open source 1995-Present MySQL, PostgresQL, and Open source DBMS products provide much of the
DBMS other products functionality and features of commercial DBMS
products products at reduced cost.

XML and 1998-Present XML, SOAP, WSDL, UDDI, XML provides tremendous benefits to Web-based
Web services and other standards database applications. Very important today. May
replace relational databases during your career.
See Chapter 11 and Appendix H.

Big Data, the 2009-present Hadoop, Cassandra, Hbase, Web applications such as Facebook and Twitter
NoSQL CouchDB, Arango DB, Mongo use Big Data technologies. The NoSQL movement
movement, DB, JSON, Microsoft Azure, is geared toward processing large datasets using
and cloud Amazon Web Services (AWS), NoSQL data models which replace relational
computing Google Cloud, and other databases with nonrelational data structures such
product as XML and JSON and which may supplant
relational databases during your career. Many
companies now rely on cloud computing services
to host their servers, applications, and data. See
Chapters 12 and 13.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
The Relational Model
• The dominant database model is the relational database
model which all current major DBMS products are based
on it.
• It was created by IBM engineer E. F. Codd in 1970.
• It was based on mathematics called relational algebra.
• This text examines and explains the relational database
mode.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Post-Relational Developments (1 of 2)
• Object-Oriented Programming (OOP) emerged, and many
products were developed based on it.
– Designed to easily store data encapsulated in OOP objects.
– It had no real advantage vs. relational models and never
caught on due to business requirements.
– Continues today on product type databases.
• Data warehouses store massive amounts of information.
– Used for online analytical processing (OLAP)
▪ A type of business intelligence (BI) system
• Hypertext Transfer Protocol (HTTP) is used to connect Web
pages over the Internet.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Post-Relational Developments (2 of 2)
• Application Programming Interface (API) is used by Web
pages in programming languages to connect to a DBMS
• Web Database Application is an application with a web-
based interface that allows shopping using an API
• eXtensible Markup Language (XML) was designed to
overcome problems that occur when HTML is used in
business transactions
• NoSQL (“Not only SQL”) refers to databases not using the
relational model
– Used by databases that require massive amount of data
(Facebook, Twitter)

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-31: The Wedgewood Pacific
Web Page

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-32: ArangoDB Non-Relational D
BMS

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 1-33: Microsoft Azure Cloud
Services

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Copyright

This work is protected by United States copyright laws and is


provided solely for the use of instructors in teaching their courses
and assessing student learning. Dissemination or sale of any part of
this work (including on the World Wide Web) will destroy the integrity
of the work and is not permitted. The work and materials from it
should never be made available to students except by instructors
using the accompanying text in their classes. All recipients of this
work are expected to abide by these restrictions and to honor the
intended pedagogical purposes and the needs of other instructors
who rely on these materials.

Copyright © 2021, 2018, 2015 Pearson Education, Inc. All Rights Reserved

You might also like