Professional Documents
Culture Documents
1
Introduction
• The World is competitive and dynamic where
good and timely decisions are vital
• Accurate, relevant, timely information is the key
to good decision making
• Good decisions require good information derived
from good managed data
• Data management: focuses on proper generation,
storage, and retrieval of data
• Data is managed most efficiently when stored in a
database
2
Definitions
Data: stored representations of meaningful objects and
events or
Referred to facts concerning objects and events that
could be recorded and stored on computer media
Structured: numbers, text, dates
3
Definitions of Database
Def 1: Database is an organized collection of
logically related data
Def 2: A database is a shared collection of logically
related data that is stored to meet the requirements of
different users of an organization
Def 3: A database is a self-describing collection of
integrated records
Def 4: A database models a particular real world
system in the computer in the form of data
• Examples of Databases
– Banking: all transactions
– Airlines: reservations, schedules
– Universities: registration, grades
– Sales: customers, products, purchases
– Manufacturing: production, inventory, orders,
supply chain
– Human resources: employee records, salaries, tax
deductions
Database Management System
(DBMS)
• Database Management System (DBMS)
– is a software that enables easy creation, access,
and modification of databases
– for efficient and effective database
management
• Examples:
– Oracle
– DB2 (IBM)
– MS SQL Server
– MS Access
– Ingres
– PostgreSQL
– MySQL 6
Database System
Hardware
Software
- OS
- DBMS
- Applications
People
Procedures
Data
11
Disadvantages of File system
• Data redundancy: Data redundancy refers to the duplication
of data, lets say we are managing the data of a college
where a student is enrolled for two courses, the same
student details in such case will be stored twice, which will
take more storage than needed. Data redundancy often
leads to higher storage costs and poor access time.
• Data inconsistency: Data redundancy leads to data
inconsistency, lets take the same example that we have
taken above, a student is enrolled for two courses and we
have student address stored twice, now lets say student
requests to change his address, if the address is changed at
one place and not on all the records then this can lead to
data inconsistency.
• Data Isolation: Because data are scattered in various files,
and files may be in different formats, writing new application
programs to retrieve the appropriate data is difficult.
Disadvantages of File system
• Dependency on application programs: Changing files would lead
to change in application programs.
• Atomicity issues: Atomicity of a transaction refers to “All or
nothing”, which means either all the operations in a transaction
executes or none. For example: Lets say Steve transfers 100$ to
Negan’s account. This transaction consists multiple operations
such as debit 100$ from Steve’s account, credit 100$ to Negan’s
account. Like any other device, a computer system can fail lets
say it fails after first operation then in that case Steve’s account
would have been debited by 100$ but the amount was not
credited to Negan’s account, in such case the rollback of
operation should occur to maintain the atomicity of transaction.
It is difficult to achieve atomicity in file processing systems.
• Data Security: Data should be secured from unauthorised access,
for example a student in a college should not be able to see the
payroll details of the teachers, such kind of security constraints
are difficult to apply in file processing systems.
Advantage of DBMS over file system
• There are several advantages of Database management
system over file system. Few of them are as follows:
• No redundant data: Redundancy removed by data
normalization. No data duplication saves storage and
improves access time.
• Data Consistency and Integrity: The root cause of data
inconsistency is data redundancy, since data normalization
takes care of the data redundancy, data inconsistency also
been taken care of as part of it
• Data Security: It is easier to apply access constraints in
database systems so that only authorized user is able to
access the data. Each user has a different set of access thus
data is secured from the issues such as identity theft, data
leaks and misuse of data.
Advantage of DBMS over file system
16
STAGES OF DBS DEVELOPMENT
LIFECYCLE
17
Database Planning
18
Database Planning
19
System Definition
20
Requirements Collection & Analysis
21
Requirements Collection & Analysis
• Business requirements. These include high-level
statements of goals, objectives, and needs.
• Nonfunctional requirements describe the
general characteristics of a system. They are also
known as quality attributes.
• Functional requirements describe how a
product must behave, what its features and
functions.
Database Design
Main aims:
To represent data and relationships required
by users and applications.
To specify a design that meets performance requirements.
23
Database Design
24
DBMS Selection
25
Application Design
transaction design;
26
Prototyping
Purpose:
27
Implementation
29
Testing
30
Operational Maintenance
31
Data models
– It is relatively simple representations, usually
graphical, of complex real-world data
structures
– Facilitate interaction among the designer, the
applications programmer, and the end user
32
Rationales for Data Modeling
• Data is the foundation of modern information
systems enabled by data base technologies.
• Data in an organization exist and can be described
independently of how these data are used.
• Data should be managed as a corporate-wide
resource.
• The types of data used in an organization do not
change very much.
• Data have certain inherent properties which lead to
correct structuring.
Data Model Basic Building Blocks
• Entity - anything about which data are to be
collected and stored
• Attribute - a characteristic of an entity
• Relationship - describes an association among
entities
– One-to-many (1:M) relationship
– Many-to-many (M:N or M:M) relationship
– One-to-one (1:1) relationship
• Constraint - a restriction placed on the data
34
Rules
• Brief, precise, and unambiguous
descriptions of a policies, procedures, or
principles within a specific organization
• Apply to any organization that stores and
uses data to generate information
• Description of operations that help to
create and enforce actions within that
organization’s environment
35
Rules (continued)
• Must be rendered in writing
• Must be kept up to date
• Must be easy to understand
• Describe characteristics of the data as
viewed by the company
36
The Evolution of Data Models
(continued)
• Hierarchical
• Network
• Relational
• Entity relationship
• Object oriented (OO)
37
The Hierarchical Model
• Developed in the 1960s to manage large
amounts of data for complex
manufacturing projects
• Basic logical structure is represented by
an upside-down “tree”
38
The Hierarchical Model
(continued)
39
The Hierarchical Model
(continued)
• The hierarchical structure contains levels,
or segments
• Depicts a set of one-to-many (1:M)
relationships between a parent and its
children segments
– Each parent can have many children
– each child has only one parent
40
The Hierarchical Model
(continued)
• Advantages
– Many of the hierarchical data model’s features
formed the foundation for current data models
41
The Hierarchical Model
(continued)
• Disadvantages
– Complex to implement
– Difficult to manage
42
The Network Model
• Created to
– Represent complex data relationships
more effectively
– Improve database performance
43
The Network Model (continued)
44
The Network Model
(continued)
• Disadvantages
– Too cumbersome
– Any structural change in the database
could produce havoc in all application
programs that drew data from the database
45
A Network Data Model
Questions:
1. Give examples of a child with many parents
2. List the children for each parents
Object Model
• Object:
– observable entity in the world being modeled
– similar to concept to entity in the E/R model
• An object consists of:
– attributes: properties built in from primitive types
– relationships: properties whose type is a reference to some other object
or a collection of references
– methods: functions that may be applied to the object.
Class
person
employee student
QSTN: LIST THE ATTRIBUTES OF PERSON, STUDENT AND UNDERGRADUATE AND SHOW THE
CONCEPTS OF INHERITANCE
The Entity Relationship Model
• Widely accepted and adapted graphical
tool for data modeling
• Introduced by Chen in 1976
• Graphical representation of entities and
their relationships in a database structure
50
The Entity Relationship Model
(continued)
• Entity relationship diagram (ERD)
– Uses graphic representations to model
database components
– Entity is mapped to a relational table
51
Entity Sets
• An entity is an object that exists and is
distinguishable from other objects.
– Example: specific person, company, event, plant
55
Composite Attributes
Relationship Sets
• A relationship is an association among
several entities
Example:
Hayes depositor A-102
customer entityrelationship set
account entity
Relationship Set borrower
Relationship Sets (Cont.)
• An attribute can also be property of a relationship set.
• For instance, the depositor relationship set between entity sets
customer and account may have the attribute access-date
Degree of a Relationship Set
• Refers to number of entity sets that participate in a relationship set.
• Relationship sets that involve two entity sets are binary (or degree two).
Generally, most relationship sets in a database system are binary.
• Relationship sets may involve more than two entity sets.
• Relationships between more than two entity sets are rare. Most relationships are
binary.
E.g. Suppose employees of a bank may have jobs
(responsibilities) at multiple branches, with different jobs at
different branches. Then there is a ternary relationship set
between entity sets employee, job and branch
Mapping Cardinalities
• Express the number of entities to which another
entity can be associated via a relationship set.
• Most useful in describing binary relationship sets.
• For a binary relationship set the mapping cardinality
must be one of the following types:
– One to one
– One to many
– Many to one
– Many to many
Mapping Cardinalities