Lecture 15 19 10 2023

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

INFO 200:

FOUNDATIONS OF
INFORMATION SYSTEMS
Fall 2023
Chapter 5: Database Processing
Sirine Taleb
Slides: From Pearson Book
10/23/2023
Copyright © 2017 Pearson Education, Inc.
DATABASE PROCESSING
(DESIGN AND MANAGEMENT)
TOPIC OUTLINE
▪ This topic will allow you to understand what database design and management is about

▪ by describing the purpose of a database


▪ by presenting the steps of its design
▪ by describing the components of the software that allows to create, use and maintain a database – the
DBMS: Database Management Systems
STUDY QUESTIONS
Q1: What is the purpose of a database?
Q2: What is a database?
Q3: What is a database management system (DBMS)?
Q4: How do database applications make databases more useful?

Copyright © 2016 Pearson Education, Ltd.


DATA IN CONTEXT
▪ Data is the middle component of the five components IS framework
▪ Data are recorded facts about themes, topics, subjects, objects, or
transactions of interest to the organization.
▪ Some examples:
▪ Customers, employees, suppliers,
▪ Products, assets, equipment, classrooms,
▪ Sales transactions, purchase transactions, deliveries, course registration,
production batch, etc.
DATA ACCUMULATION DUE TO BUSINESS
ACTIVITIES
▪ Consequently organizations hold large amounts of data that they use:
▪ to run operations,
▪ to control performance,
▪ to make decisions,
▪ to predict behavior

▪ Organizations must be able to access data


▪ Data must be well organized to prevent duplication as it could lead to
inconsistency
WHEN IS A SPREADSHEET SUITABLE TO STORE
DATA?
▪ Only if the data contains a single theme – a theme is a subject, topic of interest to the organization
▪ Ex: A list of students and their grades can be stored in a spreadsheet
A LIST OF STUDENT GRADES PRESENTED IN
A SPREADSHEET – SINGLE THEME

Copyright © 2016 Pearson Education, Inc.


A LIST OF STUDENT GRADES PRESENTED IN
A SPREADSHEET – SINGLE THEME
Suppose, however, that the professor wants to track more than just grades. Say that the professor
wants to record email messages as well.
Or perhaps the professor wants to record both email messages and office visits.

There is no place in Figure 5-1 to record that additional data. Of course, the professor could set up a
separate spreadsheet for email messages and another one for office visits, but that awkward solution
would be difficult to use because it does not provide all of the data in one place.

Key distinction between this figure and next slide is


data, Student Grades, is about a single theme
Copyright © 2016 Pearson Education, Inc.
WHAT HAPPENS IF WE HAVE MULTIPLE
THEMES?

▪ What happens if we have more than 1 email for one student?


▪ What happens if Andrea drops the course and we want to delete her from the student list?
▪ How to keep track of the office visits of a student?
Q1: WHY DO YOU NEED TO KNOW ABOUT
DATABASES?
▪ This knowledge is important to you as a future business professional.
▪ For one, databases are everywhere.
▪ Although you may not realize it, you access dozens, if not hundreds, of databases every day.
▪ Every time you
▪ make a cell phone call,
▪ log on to the Internet, or
▪ buy something online using a credit card,

▪ applications behind the scenes are processing numerous databases.


▪ Use Snapchat, Facebook, Twitter, or LinkedIn, and again applications are processing databases on your
behalf.
▪ Google something, and yet again dozens of databases are processed to obtain the search results.

INFO 200 – AUB – Fall 2023 – Sirine Taleb 10/23/2023 11


REASONS FOR LEARNING DATABASE
TECHNOLOGY
▪ 1. When you participate in the development of any new business initiative, you need to know if database
technology can facilitate your project goals.
▪ 2. Because databases are ubiquitous in commerce, billions of bytes of data are stored every day. You need to
know how to turn that data into a format from which you can construct useful information.
▪ 3. Business is dynamic, and information systems must adapt. Often, such adaptation means that the structure
of the database needs to be changed.
▪ 4. Finally, you might someday find yourself or your department in a material mess. Maybe you don’t know
who has which equipment, or where certain tools are located, or what’s really in your supply closet.

INFO 200 – AUB – Fall 2023 – Sirine Taleb 10/23/2023 12


Q1: WHAT IS THE PURPOSE OF A DATABASE?
• Organize and keep track of things
• Keep track of multiple themes
• General rule:
➢ Single theme - store in a spreadsheet
➢ Multiple themes - use a database
▪ What's a theme?
▪ Ex: Student Grades

Copyright © 2016 Pearson Education, Ltd.


Q1: WHAT IS THE PURPOSE OF A DATABASE?
Student Data Form with Multiple Themes
A database with 3
tables, 1 for each
theme

A single data
form is created in
Access to input
data in these 3
tables

Copyright © 2016 Pearson Education, Inc.


EXAMPLE

INFO 200 – AUB – Fall 2023 – Dr. Sirine Taleb 10/23/2023 15


EXAMPLE

INFO 200 – AUB – Fall 2023 – Dr. Sirine Taleb 10/23/2023 16


Q2: WHAT IS A DATABASE?
A database is a self-describing collection of integrated records.
To understand the terms in this definition, you first need to
understand the terms illustrated in Figure:

Copyright © 2016 Pearson Education, Inc.


a group of similar rows or
Q2: WHAT IS A DATABASE? records is called a table or
a file.

the collection of data for


all columns (Student
Number, Student Name,
HW1, HW2, and
MidTerm) is called a row
or a record.

a byte is a character of data.


In databases, bytes are grouped into columns,
such as Student Number and Student Name.
Copyright © 2016 Pearson Education, Inc.
HIERARCHY OF DATA ELEMENTS
From these definitions, you can see that there is a hierarchy of data elements, as shown in Figure

It is tempting to continue this grouping process by saying that a database is a group of tables or files. This statement,
although true, does not go far enough.
Copyright © 2016 Pearson Education, Inc.
COMPONENTS OF A DATABASE

By the way, the cylindrical


symbol labeled “database” in
Figure represents a
computer disk drive. It
represents databases
because databases are most
frequently stored on disks.

a database is a collection of tables plus relationships


among the rows in those tables, plus special data, called
metadata, that describes the structure of the database.

Copyright © 2016 Pearson Education, Inc.


SOLUTION FOR THE
STUDENT CASE -
EXAMPLE OF
RELATIONSHIPS AMONG
ROWS

Notice the column named


Student Number in the Email
table. That column indicates
the row in Student to which a
row of Email is connected.

Example: In the first row of Email, the Student Number value is 1325. This indicates that this
particular email was received from the student whose Student Number is 1325. If you examine the
Student table, you will see that the row for Andrea Baker has this value. Thus, the first row of the
Email table is related to Andrea Baker.
Copyright © 2016 Pearson Education, Inc.
SOLUTION FOR THE
STUDENT CASE -
EXAMPLE OF
RELATIONSHIPS AMONG
ROWS
Now consider the last row of
the Office_Visit table at the
bottom of Figure. The value
of Student Number in that
row is 4867. This value
indicates that the last row in
Office_Visit belongs to
Adam Verberra.

From these examples, you can see that values in one table relate rows of that table to rows in
a second table. Several special terms are used to express these ideas.

Copyright © 2016 Pearson Education, Inc.


Several special terms are used to express these ideas.

SPECIAL TERMS

• A column or group of columns that identifies a


Given a value of Student Number, you
unique row in a table can determine one and only one row in
• Student Number is key of Student table Student. Only one student has the
• Every table must have a key number 1325, for example.

Key • Sometimes more than one column is needed to form


a unique identifier Example: key of City table, would
be a combination of City and State columns. Why? because a given city name
• Email_Num is key of Email Table can appear in more than
• VisitID is key of Office_Visit Table one state.

Every table must have a key.


Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
SPECIAL TERMS
▪ Student Number is not the key of the Email or the
Office_Visit tables. Why?

▪ We know that about Email because there are two rows


in Email that have the Student Number value 1325. The
value 1325 does not identify a unique row, therefore
Student Number cannot be the key of Email.

▪ What about Student Number in Office_Visits? Is it key?

▪ No! there is nothing to prevent a student from visiting a


professor more than once.

INFO 200 – AUB – Fall 2023 – Sirine Taleb 10/23/2023 24


SPECIAL TERMS
▪ In both Email and Office_Visit, Student Number is
a key, but it is a key of a different table, namely
Student.
▪ Hence, the columns that fulfill a role like that of
Student Number in the Email and Office_Visit
tables are called foreign keys.
▪ This term is used because such columns are keys,
but they are keys of a different (foreign) table than
the one in which they reside.

Databases that carry their data in the form of tables and that
represent relationships using foreign keys are called relational
databases.

INFO 200 – AUB – Fall 2023 – Sirine Taleb 10/23/2023 25

You might also like