lecture1_dbms
lecture1_dbms
Systems
Lecture # 01
Grading Policy
• Final Exam: 50%
• Mid term Exam 25%
• Assignments 12%
• Quizzes 13%
Text Books
• Modern Database Management
By: Jeffrey A. Hoffer
Tenth edition
3
Course Objectives
❑ Introduction to very basics
❑ SDLC
4
Lecture Objectives
❑ Basics
❑ Typical functions of a DBMS.
❑ Major components of the DBMS environment.
❑ Personnel involved in the DBMS environment.
❑ History of the development of DBMSs.
❑ Advantages and disadvantages of DBMSs.
5
Introduction: What Is
Database?
• A very large, integrated collection of data.
6
Types of Databases and
Database Applications
◼ Numeric and Textual Databases
◼ Multimedia Databases
◼ Geographic Information Systems (GIS)
◼ Data Warehouses
7
Examples of Database
Applications
❑ Purchases from the supermarket
❑ Purchases using your credit card
❑ Studying at university
File Processing Systems
Library Examination Registration
10
Advantages of Database Approach
Library Examination Registration
Database
Management
System
Product
Planning Control Sales
Development
Corporate
Database
Accounting Manufacturing
12
Accounts Accounts
Scheduling Production
Receivable Payable
Types of Data
• Structured Data
• Unstructured Data
13
Definitions
• Data: Meaningful facts, text, graphics, images, sound, video
segments
• Information: Data processed to be useful in decision making
• Metadata: Data that describes data
14
Figure: Data in Context
15
Figure: Summarized data
Useful information that managers can use for
decision making and interpretation
16
Table: Metadata
Descriptions of the properties or characteristics of the
data, including data types, field sizes, allowable
values, and documentation
17
What is DBMS
18
Database Management System
Application
#1
Application
#2
DBMS Database
containing
centralized
shared data
Application
#3 DBMS manages data
resources like an operating
system manages hardware
resources
19
A simplified database system environment
20
Typical DBMS Functionality
◼ Define a database : in terms of data types,
structures and constraints
◼ Construct or Load the Database on a
secondary storage medium
◼ Manipulating the database : querying,
generating reports, insertions, deletions and
modifications to its content
◼ Concurrent Processing and Sharing by a set of
users and programs – yet, keeping all data valid
and consistent
21
Typical DBMS Functionality
Other features:
❑ Protection or Security measures to
prevent unauthorized access
❑ “Active” processing to take internal
actions on data
❑ Presentation and Visualization of data
22
Data Models
• Data model is collection of concepts for describing data.
• Graphical systems used to capture the nature and
relationships among data.
• Entity
• Relationships
23
Relational data Model
• Widely used model today
• Main concept: Relation, a table with rows and columns
24
Example
• Part of a UNIVERSITY environment.
• Some entities:
- STUDENTs
- COURSEs
- SECTIONs (of COURSEs)
- (academic) DEPARTMENTs
- INSTRUCTORs
• Some relationships:
- SECTIONs are of specific COURSEs
- COURSEs have prerequisite COURSEs
- INSTRUCTORs teach SECTIONs
- COURSEs are offered by DEPARTMENTs
- STUDENTs major in DEPARTMENTs
25
26
Define UNIVERSITY database
Constraints
The sections that students take must be taught by some instructors. 27
Construct UNIVERSITY database
Store data on storage medium
-store data for each student, course, section, grade repot, prerequisite
records in various files may be related to one another
Product
Planning Control Sales
Development
Corporate
Database
Accounting Manufacturing
29
Accounts Accounts
Scheduling Production
Receivable Payable
File Processing Systems
Library Examination Registration
31
The concept of a shared organizational
database
Management Marketing
Product
Planning Control Sales
Development
Corporate
Database
Accounting Manufacturing
32
Accounts Accounts
Scheduling Production
Receivable Payable
Disadvantages of File Processing
• Program-Data Dependence
All programs maintain metadata for each file they use
• Data Redundancy (Duplication of data)
Different systems/programs have separate copies of the same data
• Limited Data Sharing
No centralized control of data
• Lengthy Development Times
Programmers must design their own file formats
• Excessive Program Maintenance
80% of information systems budget 33
Figure: Three file processing systems at Pine Valley
Furniture
Duplicate
Data
34
Problems with Data Dependency
➢ Each application programmer must maintain their
own data
➢ Each application program needs to include code for
the metadata of each file
➢ Each application program must have its own
processing routines for reading, inserting, updating
and deleting data
➢ Lack of coordination and central control
➢ Non-standard file formats
35
Problems with Data
Redundancy
• Waste of space to have duplicate data
• Causes more maintenance headaches
• The biggest Problem:
• When data changes in one file, could cause
inconsistencies
• Compromises data integrity
36
SOLUTION:
The DATABASE Approach
• Central repository of shared data
• Data is managed by a controlling agent
• Stored in a standardized, convenient form
Database
Management
System
39
Advantages of Database Approach
• Improved Data Sharing
• Different users get different views of the data
• Enforcement of Standards
• All data access is done in the same way
• Improved Data Quality
• Constraints, data validation rules
• Better Data Accessibility/ Responsiveness
• Use of standard data query language (SQL)
• Security, Backup/Recovery, Concurrency
• Disaster recovery is easier
40
Costs and Risks of the
Database Approach
• Up-front costs:
• Installation Management Cost and Complexity
• Conversion Costs
• Ongoing Costs
• Requires New, Specialized Personnel
• Need for Explicit Backup and Recovery
• Organizational Conflict
• Old habits die hard
41
Components of database
environment
• CASE Tools – computer-aided software engineering
• Repository – centralized storehouse of metadata
• Database Management System (DBMS) – software for managing the
database
• Database – storehouse of the data
• Application Programs – software using the data
• User Interface – text and graphical displays to users
• Data Administrators – personnel responsible for maintaining the
database
• System Developers – personnel responsible for designing databases
and software
• End Users – people who use the applications and databases
42
Figure:
Components
of the
database
environment
43
Conversion to database
approach
• Step 1:
Enterprise Data model: Graphical model that shows high level
entities for organization and associations among these
entities.
▪ Step 2:
Relational Data Model: Defining tables for each entity.
▪ Step 3:
Implement
44
Continued..
• A data model is a collection of concepts for
describing data.
• A schema is a description of a particular collection of
data, using the given data model.
• The relational model of data is the most widely used
model today.
- Main concept: relation, basically a table with
rows and columns.
- Every relation has a schema, which describes
the columns, or fields
45
Segment from enterprise data
model
46
One customer may place many
orders, but each order is placed
by a single customer
→ One-to-many relationship
47
Therefore, one order involves
many products and one product
is involved in many orders
→ Many-to-many relationship
48
Database Users
Users may be divided into those who
actually use and control the content (called
“Actors on the Scene”) and those who
enable the database to be developed and
the DBMS software to be designed and
implemented (called “Workers Behind the
Scene”).
49
Database Users
Actors on the scene
❑ Database administrators: responsible for authorizing
access to the database, for co-ordinating and monitoring
its use, acquiring software, and hardware resources,
controlling its use and monitoring efficiency of
operations.
❑ Database Designers: responsible to define the content,
the structure, the constraints, and functions or
transactions against the database. They must
communicate with the end-users and understand their
needs.
❑ End-users: they use the data for queries, reports and
some of them actually update the database content. 50
Categories of End users
• Sophisticated Users: these include business analysts,
scientists, engineers, others thoroughly familiar with
the system capabilities. Many use tools in the form
of software packages that work closely with the
stored database.
• Naive Users: They don’t need to know any details of
structure. They access the database by writing
simple commands or by choosing operations from
menus.
51
Workers behind the scene
Persons whose job involves design, development,
operation,and maintenance of the DBMS software and
system environment.
• DBMS designers and implementers: Design and implement
the DBMS software package itself.
53
The Range of
Database Applications
• Personal Database – standalone desktop database
• Workgroup Database – local area network (<25 users)
• Department Database – local area network (25-100 users)
• Enterprise Database – wide-area network (hundreds or thousands
of users)
54
Figure: Typical
data from a
personal
computer
database
55
Figure: Workgroup database with local area network
56
Figure : An
enterprise
data
warehouse
57
Evolution of DB Systems
• Flat files - 1960s - 1980s
• Hierarchical – 1970s - 1990s
• Network – 1970s - 1990s
• Relational – 1980s - present
• Object-oriented – 1990s - present
• Object-relational – 1990s - present
• Data warehousing – 1980s - present
• Web-enabled – 1990s - present
58
When not to use DBMS
Main costs of using a DBMS:
- High initial investment in hardware, software,training
and possible need for additional hardware.
- Overhead for providing generality, security, recovery, integrity,
and concurrency control.
- Generality that a DBMS provides for defining and processing data.
60
Q&A