0% found this document useful (0 votes)
141 views53 pages

IFS 131 - 132 Chapter 5 - 2022

This document discusses organizing and storing data in databases. It provides an overview of database systems and how they can help businesses manage large amounts of data entered every day. The key points covered include defining data management concepts, describing the relational database model, identifying common database functions, applications, and how data can be organized, stored in tables with fields, records, and related through primary and foreign keys. Databases allow structured, consistent storage and retrieval of data that can be used for business intelligence and competitive advantages.

Uploaded by

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

IFS 131 - 132 Chapter 5 - 2022

This document discusses organizing and storing data in databases. It provides an overview of database systems and how they can help businesses manage large amounts of data entered every day. The key points covered include defining data management concepts, describing the relational database model, identifying common database functions, applications, and how data can be organized, stored in tables with fields, records, and related through primary and foreign keys. Databases allow structured, consistent storage and retrieval of data that can be used for business intelligence and competitive advantages.

Uploaded by

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

IFS 131/132

Introduction to Information Systems

CHAPTER 5
Organizing and storing data

Stair, R., Reynolds, G & Chesney, T. (2021).


Principles of Business Information Systems, (4 th Ed), Cengage Learning.
Print ISBN: 9781473774629, 1473774624
eText ISBN: 9781473774629, 1473774624 1
CHAPTER 5
Organizing and storing data

A huge amount of data is entered into computer systems every day. Where does all this data go, and how is it used?
How can it help you in a job? This chapter examines database systems and how they can help businesses. The
chapter includes a brief overview of how to organize data in a database looks at database administration and discusses
how data can be used competitively by studying both data mining and business intelligence.

1. Define general data management concepts and terms, highlighting the advantages of the database approach to
data management.
2. Describe the relational database model and outline its basic features.
3. Identify the common functions performed by all database management systems, and identify popular database
management systems.
4. Identify and briefly discuss current database applications.

Presented over 2 weeks (6 sessions)


2
Database Data Information

• Is a well- • Collection of • Processed data


designed, unprocessed • Documents
organised, and items • Audio
carefully • Text • Images
managed • Numbers • Video
collection of • Images
data • Audio
• Video

An organization could not successfully complete most business activities


without data and the ability to process it 3
Data management & Data Modelling

Relational DB
• A series of
- related tables, stored together
- with a minimum of duplication
- to achieve a consistent and
controlled pool of data

An entity is a person, place or


thing about whom or about which an
organization wants to store data

4
Data management & Data Modelling
Hierarchy of Data

bit (binary digit) byte Field


• represents a circuit that is • is made up of eight bits • a characteristic or attribute of
either on (1) or off (0) (10110101) an entity that is stored in the
database
• Each byte represents a
character (A, B, C ,…)

Record Table Database


• A row in a table; all the data • a collection of related records • a collection of integrated and
pertaining to one instance of related tables
an entity

5
Data management & Data Modelling
Primary Key

Customer_Number First_Name Surname Address 1 Address 2

10 Jane Wilson London Road Oxford One


Record
11 John Smith Quai d’Orsay Paris
TABLE

12 Jane Wilson London Road Oxford

13 Desmond Paton Marshall Street Johannesburg Many


Records
14 Susan Haynes Baker Street London

Field Data Item

• An attribute is a characteristic of an entity (For example; employee number, last


name, first name, etc.)  typically becomes a field
• A data item is the specific value of an attribute
• An primary key is a field or set of fields that uniquely identifies the record. No
other record can have the same primary key.
• An foreign key is a primary key that is used in another record. 6
Data management & Data Modelling
Data entities, Attributes & Keys
• An foreign key is a primary key that is used in another table to create a
relationship between the two tables.

Customer_Number First_Name Surname Address 1 Address 2


Customer table

10 Jane Wilson London Road Oxford


11 John Smith Quai d’Orsay Paris
12 Jane Wilson London Road Oxford
13 Desmond Paton Marshall Street Johannesburg

Order_Number Description Price Colour Customer_Number


100 Swivel chair £89 Black 10
Order table

101 Coat rack £15 Silver 11


102 White board £23 White 12
103 Computer desk £150 Brown 13

Foreign Key
7
Data management & Data Modelling
• The primary key is used to join tables in this example is the Customer_Number.
When Customer_Number is posted in another table it becomes a foreign key.
Primary key
Customer_Number First_Name Surname Address 1 Address 2

Customer table
10 Jane Wilson London Road Oxford
11 John Smith Quai d’Orsay Paris
12 Jane Wilson London Road Oxford Customer
13 Desmond Paton Marshall Street Johannesburg
14 Susan Haynes Baker Street London

Foreign key places


Order_Number Description Price Colour Customer_Number
100 Swivel chair £89 Black 10
Order

Order table
101 Coat rack £15 Silver 11
102 White board £23 White 12
103 Computer desk £150 Brown 10
104 Filing cabinet £50 Gray 15
8
Data management & Data Modelling
Data management & Data Modelling
Data management & Data Modelling
Designing relational databases
• One approach to design a database involves 4 stages:

1. Identify all entities

2. Identify all relationships between entities

3. Identify all attributes

4. Resolve all relationships

11
Data management & Data Modelling
Designing relational databases

1. Identify all entities

• Identify all entities you want to store data about.


• For example, interviewing staff (managers and users), observing staff at
work and reviewing existing documentation.

2. Identify all relationships between entities


• Relationships between entities are governed by enterprise (or ‘business’)
rules.
• Examples of the enterprise rules describing the customer-order relationship
include:
o A manager can supervise many departments. However a department is
supervised by only one manager.
o A department can perform many projects. A project can only be performed by
one department
12
Data management & Data Modelling
Designing relational databases

2. Identify all relationships between entities


• After identifying the relationship, the following should be documented:

Degree Cardinality Optionality


• The number of entities • In a relationship,
cardinality is the • If a binary relationship is
involved in a
relationship number of one entity optional for an entity,
• When the degree is that can be related to that entity doesn’t have
two, it is known as a another entity. to be related to the
“binary relationship” • Cardinality for a other.
binary relationship • Optionality documents
can be: whether the relationship
 One to one (1:1) must exist for each
 One to many entity or whether it is
(1:M) optional.
 Many to many
(M:M)
13
Data management & Data Modelling
Designing relational databases
2. Identify all relationships between entities
• The entities, relationships that exist between entities (degree, cardinality and
optionality) are documented in an entity-relationship diagram (ERD)
• ERD = data models that use basic graphical symbols to show the organization of and
relationships between data)

places Entity: is represented by a box or a


rectangle
Customer Order Relationships: are represented by an
active or passive verb that connects the
related entities and lines.
composed Many symbol: “crow’s foot” notation for
M is represented by pronged lines
supplies
supplier Product

The crow’s foot notation means “many,” so a supplier supplies many products, but each products is supplied by
only one supplier.
The O and I represent optionality – a O means the relationship is optional so a customer doesn’t have to have
an order.
A I means not-optional (or “obligatory”) so an order has to have one (and only one) customer. 14
Data management & Data Modelling
Designing relational databases

3. Identify all attributes


• Identify all entities you want to store data about.
• Attribute should be the smallest sensible piece of data that is to be stored
e.g. customer first name and surname.
• For example, interviewing staff (managers and users), observing staff at
work and reviewing existing documentation

4. Resolve all relationships


• Resolving a relationship means deciding how to implement it – which
primary key will be used as a foreign key, or whether to use a linking table
(see next slide)

15
Data management & Data Modelling
Designing relational databases
4. Resolve all relationships (cont’d)
• The primary key used to join tables in this example is the Customer_Number.
When Customer_Number is posted in another table it becomes a foreign key.
Primary Customer_Number First_Name Surname Address 1 Address 2

Customer table
key 10 Jane Wilson London Road Oxford
11 John Smith Quai d’Orsay Paris
12 Jane Wilson London Road Oxford
13 Desmond Paton Marshall Street Johannesburg

Foreign key
Order_Number Description Price Colour Customer_Number
100 Swivel chair £89 Black 10

Order table
101 Coat rack £15 Silver 11
102 White board £23 White 12
103 Computer desk £150 Brown 13 16
Data management & Data Modelling
Designing relational databases
4. Resolve all relationships (cont’d)
• How to identify whether a table has a foreign key…

Customer Order
RULE!!!

PK (1)  FK (M)

Primary Key in to one becomes a foreign key in to many

Customer (PK = Customer Number)

Order (PK = Order Number + FK = Customer Number)


17
Data management & Data Modelling
• There is only six types of binary relationships

18
Data management & Data Modelling

19
Data management & Data Modelling
Designing relational databases

• A database design is also known as a database schema


• It is a list of all the tables in the database, along with all the fields,
with any primary and foreign keys identified
Project {ProjectID#, Description, Dept_Number}
Department {Dept_Number#, Dept_Name, Manager_SNN}

Manager {Manager_SNN#, Last_Name, First_Name, Hire_Date, Dept_Number}

Primary Key #

NB!!! Foreign Key

20
Database management Systems
Database Management System (DBMS)

is a group of programs used as an interface


between the database and its application
programs or between a database and the users

21
Database Management Systems (DBMS)
SQL Databases

Structured Query Language (SQL):


• Is a special-purpose programming language for accessing and
manipulating data stored in a relational database
Database Management Systems (DBMS)
Database activities

Providing a user view of the database

Adding and modifying data

Storing and retrieving data

Manipulating the data and generating reports

23
Database Management Systems (DBMS)
Database activities

Providing a user view of the database

• Schema: a description of the entire database (see slide 20)


• A schema can be part of the database or a separate
schema file
• The DBMS can reference a
schema to find where to access
the requested data in relation to
another piece of data

24
Database Management Systems (DBMS)
Creating and modifying the DB

Adding and modifying data


Data definition language (DDL):
• is collection of instructions and
commands used to define and
describe data and relationships in a
specific database
• Allows the database’s creator to
describe the data and relationships
that are to be contained in the
schema
• Structured Query Language (SQL) is
a DDL
Database Management Systems (DBMS)
Database activities

Adding and modifying data


Data dictionary
• a detailed description of all the
data used in the database
• Advantages of using data
dictionary
• Reduced data redundancy
• Increased data reliability Contains:
• Assists program development • Name of data item
• Aliases/other names that may be used to
• Easier modification of data describe item
and information • Range of values
• Type of data (A,… 0)
• Amount of storage needed
• Responsible person
• List of reports
Database Management Systems (DBMS)
Database activities

Adding and modifying data

27
Database Management Systems (DBMS)
• Database activities

Storing and retrieving data

• When an application
program needs data, it
requests the data through
the DBMS
• Concurrency control deals
with the situation in which
two or more users or
applications need to access
the same record at the
same time
Database Management Systems (DBMS)
Rely on concurrency control to lock database records

Concurrency control
a method dealing with a
situation where 2 or more
people are trying to access
the same record at the same
time 29

DB
200 tablets

Buy 150 Buy 100


Database Management Systems (DBMS)
Database activities

Manipulating the data and generating reports


Query by Example (QBE) Data Manipulation Language (DML)
is a visual approach to
The commands that are used to
developing database queries
manipulate the data in a database
or requests

30
Database Management Systems (DBMS)
Database activities

Manipulating the data and generating reports

What does a simple SQL query look like? How SQL specifies the action that the
• A SQL query is a sequence of words, much like a user want carried out in the database
sentence. Command Description
CREATE Create a database or table
• The SQL query language provides a collection of
DELETE Remove a record from a table
special command words called SQL keywords,
such as CREATE, USE, INSERT, FROM, WHERE, INSERT Add a record
among others which issue instructions to the JOIN Use the data from two tables
database.
SELECT Search for records

• Built in functions (avg, max, min) UPDATE Change data in a field

A DBMS can produce a wide variety of documents, reports, and other output that can help
organizations achieve their goals
Database Management Systems (DBMS)
Manipulating Data

Selecting: eliminating rows according to certain criteria

Projecting: eliminating columns in a table

Joining: combining two or more tables

Linking: combining two or more tables


through common data attributes to form
a new table with only the unique data
attributes

32
Database Management Systems (DBMS)
Database administration

• Database Administrator (DBA): a skilled and trained IS


professional
– Works with users to define their
data needs
– Applies database programming
languages to craft a set of
databases to meet those needs
– Tests and evaluates databases
– Implements changes to improve
their databases’ performance
– Assures that data is secure from
unauthorized access
33
Database Management Systems (DBMS)
Database administration
• Data administrator: a nontechnical position responsible for
defining and implementing consistent principles for a variety
of data issues

• The data administrator can be a high-level position reporting


to top-level managers
Database Management Systems (DBMS)
Important Characteristics of databases

Database size: the number of records in the database

Database cost: the purchase or lease costs of the database

Concurrent users: the number of people who need to used the database at
the same time

Performance: how fast the database is able to update records

Integration: the ability to be integrated with other applications and databases

Vendor: the reputation and financial stability of the database vendor

For many organizations, database size doubles every year or two 35


Database Management Systems (DBMS)
Using databases with other software

• DBMSs can act as front-end


or back-end applications
– Front-end applications
interact directly with
people
– Back-end applications
interact with other
programs or applications

• Spin-off database applications include:


• Big data, data warehouses and data marts, and business
intelligence
36
Database Applications
Linking databases to the Internet
• Extremely useful application for organizations & individuals
• E-commerce sites uses database technology to dynamically create it web
pages

Semantic Web
The seamless integration of traditional
databases with the Internet

37
Database Applications
Big data

Big data
• Three characteristics
Large amounts of unstructured data that are of big data
difficult or impossible to analyze using – Volume (size)
traditional DBMS – Velocity (speed)
– Variety (formats)
(Photos, videos, data from blog posts, social
networking sites, etc.)

Data can be structured (well-defined business transactions) or


unstructured (word processing docs, emails, social media, etc.) 38
Database Applications
Dataware houses

Data warehouse • ETL process


a database or collection of databases that • Extract
collects business information from many sources (comes from variety
in the enterprise, covering all aspects of the sources in various
forms)
company’s processes, products and customers • Transform
(applies rules or
algorithms – to
determine what to
store)
• Load
(loaded into
warehouse)

39
Database Applications
Dataware houses

Data mart • A specific area in the


a subset of a data warehouse that is used by data mart might
small- and medium-sized businesses and contain greater
detailed data than the
departments within large companies to support
data warehouse
decision making

40
Database Applications
Business Intelligence

• There are a number of data


Data mining mining tools and techniques
• Association rules algorithms are
used to find associations
• The process of analyzing data to try between items in the data
to discover patterns and • Help users find answers to
relationships within data questions they haven’t thought to
ask

41
Database Applications
Business Intelligence

Business Intelligence

• The process of gathering enough of


the right information in a timely
manner and useable form, and
analyzing it to have a positive
impact on business strategy, tactics
and operations

• Turns data into useful information that is • A broad range of technologies and
distributed throughout the organization applications that enable an organization to
transform mostly structured data obtained
from information systems to perform
analysis, generate information, and
improve the decision making of the
organization 42
Database Applications
Business Intelligence

43
Database Applications
Business Intelligence

Competitive intelligence Counterintelligence


• information about • Describes the steps an
competitors and the ways organization takes to protect
that knowledge affects information sought by
strategy, tactics, and “hostile” intelligence
operations gatherers

44
Database Applications
Distributed Databases

Distributed Database Replicated Database

• A database in which the data • A database that holds a


is spread across several duplicate set of frequently
smaller databases connected used data
via telecommunications
media (across different
locations)

+ more flexibility how db organized and used


• Copy of important information sent to
+ more users can access data
different locations
-Difficulty integrating different DB’s
• Uses data synchronization
-Maintaining data security, accuracy,
timeliness and conformance to standards
- Due to telecoms access to data can be slow
45
Database Applications
Business Intelligence

Online analytical processing (OLAP)


• Software that allows users to explore data from a number of
perspectives
• a style of analysis known as “slicing and dicing”
• Provides top-down, query-driven data analysis
• Must be very knowledgeable of the data and its business context

46
Database Applications
Visual, Audio & Other DB systems

• Visual/Audio databases store images or sound


files of charge slips, X-rays, and vital records
– Images can be stored in some object-
relational databases or special-purpose
database systems

• Spatial databases provide location-based


services
– Maps are embedded into a Web site’s Web
applications and operational systems
47
Class Activity
1. A doctor can be scheduled for many appointments,
but may not have any scheduled at all. Doctor Appointment Bill
2. Each appointment is scheduled with exactly 1
doctor.
3. A patient can schedule 1 or more appointments.
4. One appointment is scheduled with exactly 1
Patient Payment
patient.
5. An appointment must generate exactly 1 bill, a bill is
generated by only 1 appointment.
6. One payment is applied to exactly 1 bill, and 1 bill
can be paid off over time by several payments. Insurance
7. A bill can be outstanding, having nothing yet paid on
it at all.
8. One patient can make many payments, but a single
payment is made by only 1 patient.
9. Some patients are insured by an insurance company.
If they are insured, they can only carry insurance
with one company.
10. An insurance company can have many patients carry
their policies. For patients that carry insurance, the
insurance company will make payments, each single
payment is made by exactly 1 insurance company.

48

48
For reflection (questions)
1. What is an attribute? How does it relate to an entity?
2. Define the term “database”. How is it different from a database management
system?
3. What is a database schema, and what is its purpose?
4. What is the difference between DDL & DML?
5. Create an ERD and corresponding database schema to explain the information
saved in the contacts section of your cell phone as well as the relationship
between entities that you identified.
6. Work through the following class activity with a friend (see chapter slide for
actual content)

Ensure that you can:


•Identify the entities
•Determine the cardinality/optionality
of the relationships
•Which relationships will have both a primary and foreign key?
Required for the next chapter
Pre-reading
Chapter 6 – Computer Networks (p185 -229)

Internet Sources
The Internet
http://www.explainthatstuff.com/internet.html

Internet world stats


http://www.internetworldstats.com/

Videos
Basics of communication systems
https://www.youtube.com/watch?t=114&v=QnCBCQa-2XU
Life simplified with connected devices
https://www.youtube.com/watch?v=NjYTzvAVozo
How does the Internet work
https://www.youtube.com/watch?v=i5oe63pOhLI
Supportive audio/video
What is a database
https://www.youtube.com/watch?v=t8jgX1f8kc4

Relational database concepts


https://www.youtube.com/watch?v=NvrpuBAMddw
SUMMARY
• Data is one of the most valuable resources that a firm possesses
• An entity is an object for which data is collected, stored, and
maintained
• The relational model places data in two-dimensional tables
• A DBMS is a group of programs used as an interface between a
database and its users and other application programs
• DBMS basic functions include:
– Providing user views
– Creating and modifying the database
– Storing and retrieving data
– Manipulating data and generating reports

52
SUMMARY
• After a DBMS has been installed, the database can be accessed,
modified, and queried via a data manipulation language
• A database administrator (DBA) plans, designs, creates, operates,
secures, monitors, and maintains databases
• “Big data” is the term used to describe enormous and complex
data collections
• Data warehouses are relational DBMSs specifically designed to
support management decision making
• Data mining allows the automated discovery of patterns and
relationships in a data warehouse
• Counterintelligence describes the steps an organization takes to
protect information sought by “hostile” intelligence gatherers

53

You might also like