Вы находитесь на странице: 1из 74

Database

Management Systems

Md. Mahabub Alam


DO IT
D Define Problem
O Open mind & Apply Creative Techniques
I Identify best solution
T Transform
FEED BACK ? Feeding at the back
Contents
Definition of Data, Database, Database
Management system
Field, Record & File or table
Functions of DBMS
Data Types
Types of key
Data
Data are facts represented by values,
members of character string and which
carry meaning in a creation context.
In other words , Data is an encoded
representation of Information.
Information is a result of processed data
Database
A database is an organized collection of
information.
A database is a mechanized, shared,
formally defined and centrally controlled
collection of data used in an organization
Database Management System (DBMS)
A database Management System (DBMS)
consists of a collection of interrelated data
and a set of programs to access that data.
Database Software
dBase
Fox-pro
Ms-Access
SQL/SQL Server
SQL/MySQL
ORACLE
Functions of DBMS
Database definition
Database creation
Data Retrieval
Data Update
Database Integrity control
Performance monitoring
Advantage of DBMS
Data Redundancy and Inconsistency
(cqvRbvwZwi I AmvgmZv)
Multiple Users
Database Security
Database Integrity (mijZvI mZZv)
Dis-Advantage of DBMS
Cost of Software & Hardware migration
Complexity of backup and recovery
National Institute of Technical
Teachers Training & Research
Relationship of DBMS

Application A

Application A DBMS
O/S

Application A
Data Types

Text/Character
Number
Date/Time
Currency
Auto Number
Verchar
Data
Abstraction( mvimsc )

Physical level: How data are stored in the storage


Conceptual Level: What data are actually stored in
the database
View level: Many user view according to requirement
View level
(Many user view according to requirement)

Conceptual level
(Definitions)

Physical level
(How data are stored in the storage)
Data Models
A Data model is a collection of conceptual tools
for describing data, data relationships, data
semantics and data constraints.
There are three types of data models
* Object-Based Logical Models
* Record-Based Logical Models
* Physical data models
Object-Based Logical Models are used in
describing data at the conceptual and the view
levels
There are four types of OBLM
# The entity-relationship model
# The binary model
# The semantic data model
# The infological model
Record-Based Logical Models are used in
describing data at the conceptual and the view
levels. These models are used to specify both the
overall logical structure of the database and a
higher-level description of the implementation.
Three most widely accepted data models are:
- Relational Model
- Network Model
- Hierarchical Model
Physical data models are used to describe data at
the lowest level
Widely used are
- Unifying model
- Frame memory
Database Language

Data definition Language (DDL)


Data Manipulation Language (DML)
Data definition Language

The Data definition Language (DDL) is the portion of a


database management system where the length,
location, format of each data element as well as the
overall logical characteristics of the database is defined.
DDL subdivided into two components; they are
- Schema
- Subschema
The difference between a schema and a subschema
* schema
-The schema is the physical arrangement of the
data as it appears in the DBMS.
- Represents the complete description of the
database.
* subschema
-The subschema is the logical view of the data
as it appears to the application program.
-subset of schema, application view of the db.
Data Manipulation Language (DML)

The main function of DML is


- The retrieval of data stored in the database
- The insertion of new data into the database
- The deletion of data from the database
DML are two types
* Procedural DML (What data entry & how can get it)
* Nonprocedural DML (What data entry)
Data Dictionary
Difference between DDL & DML
Difference between Database Manager &
Database Administrator
Database Manager:
The database manager translates the various
DML statements into low-level file system
commands.
Database Administrator:
The person having must central control over
the system is called DBA.
Entity, Attributes, Relationship
Entity: An entity may be a physical object such
as a house or a car, an event such as a house
sale or a car service, or a concept such as a
customer transaction or order.
An entity may be defined as a thing which is
recognized as being capable of an
independent existence and which can be
uniquely identified.
Attributes: Entities and relationships can both have
attributes. Examples: an employee entity might
have a Social Security Number (SSN) attribute; the
proved relationship may have a date attribute.
Attributes are represented as ellipses connected to
their owning entity sets by a line.
Relationships:
A relationship captures how two or more entities
are related to one another. Relationships can be
thought of as verbs, linking two or more nouns.
Examples: an owns relationship between a
company and a computer, a supervises
relationship between an employee and a
department, a performs relationship between an
artist and a song,
There are four kinds of relationship;
- One : One
- One : Many
- Many : One
- Many : Many
A rectangle represents an entity

An ellipse represents an attribute

A Diamond represents a Relationship

A line links attributes to entity and


entity to Relationship
The Relational Data Model

The Relational Data Model has the relation at its


heart, but then a whole series of rules governing
keys, relationships, joins, etc.
A relation is subject to the following rules:
- Relation (file, table) is a two-dimensional table.
- Attribute (i.e. field or data item) is a column in the table.
- Each column in the table has a unique name within that table.
- Each column is homogeneous. Thus the entries in any column are
all of the same type (e.g. age, name, employee-number, etc).
- Each column has a domain, the set of possible values that can
appear in that column.
- A Tuple (i.e. record) is a row in the table.
- The order of the rows and columns is not important.
- Values of a row all relate to some thing or portion of a thing.
Keys
A simple key contains a single attribute.
A composite key is a key that contains more than one attribute.
A candidate key is an attribute (or set of attributes) that uniquely identifies a
row. A candidate key must possess the following properties:
- Unique identification - For every row the value of the key must
uniquely identify that row.
- Non redundancy - No attribute in the key can be discarded without
destroying the property of unique identification.
A primary key is the candidate key which is selected as the principal unique
identifier. Every relation must contain a primary key. The primary key is usually
the key selected to identify a row when the database is physically
implemented. For example, a part number is selected instead of a part
description.
A super key is any set of attributes that uniquely identifies a row. A superkey
differs from a candidate key in that it does not require the non redundancy
property.
A foreign key is an attribute (or set of attributes) that appears (usually) as a
non key attribute in one relation and as a primary key attribute in another
relation. I say usually because it is possible for a foreign key to also be the
whole or part of a primary key:
Entity Relationship Model
Rules of Relational Model
Each attributes is distinct
Each attributes must be named
Each tuple is unique
Navigation in the relational model is through the
value an attribute takes.
Tulpes are presented to the user independent of
sequence.
Attributes are presented in any order.
Normalization
Normalization is the process of efficiently
organizing data in a database. There are two
goals of the normalization process: eliminating
redundant data (for example, storing the same
data in more than one table) and ensuring data
dependencies make sense (only storing related
data in a table). Both of these are worthy goals as
they reduce the amount of space a database
consumes and ensure that data is logically stored.
The Normal Forms
The database community has developed a series of
guidelines for ensuring that databases are
normalized. These are referred to as normal
forms and are numbered from one (the lowest
form of normalization, referred to as first normal
form or 1NF) through five (fifth normal form or
5NF). In practical applications, you'll often see
1NF, 2NF, and 3NF along with the occasional 4NF.
Fifth normal form is very rarely seen and won't
be discussed in this article.
First Normal Form (1NF)
First normal form (1NF) sets the very basic rules for an
organized database:
- Eliminate duplicative columns from the same table.
- Create separate tables for each group of related data and
identify each row with a unique column or set of
columns (the primary key).
Second Normal Form (2NF)
Second normal form (2NF) further addresses the
concept of removing duplicative data:
- Meet all the requirements of the first normal form.
- Remove subsets of data that apply to multiple rows of a
table and place them in separate tables.
- Create relationships between these new tables and their
predecessors through the use of foreign keys.
Third Normal Form (3NF)
Third normal form (3NF) goes one large step further:
- Meet all the requirements of the second normal form.
- Remove columns that are not dependent upon the
primary key.
Fourth Normal Form (4NF)
Finally, fourth normal form (4NF) has one additional
requirement:
- Meet all the requirements of the third normal form.
- A relation is in 4NF if it has no multi-valued
dependencies.
Remember, these normalization guidelines are
cumulative. For a database to be in 2NF, it must first
fulfill all the criteria of a 1NF database.
Steps in the Normalization Process
Types of Relational Join
Inner Join
This is sometimes known as a simple join. It returns all
rows from both tables where there is a match. If there
are rows in R1 which do not have matches in R2, those
rows will not be listed. There are two possible ways of
specifying this type of join:
SELECT * FROM R1, R2 WHERE R1.r1_field =
R2.r2_field; SELECT * FROM R1 INNER JOIN R2 ON
R1.field = R2.r2_field
Full [Outer] Join
Returns all the rows from both tables even if there are
no matches in one of the tables. If there are no matches
in one of the tables then its values will be shown as null.
SELECT * FROM R1 FULL [OUTER] JOIN R2 ON R1.field =
R2.field.

Cross Join
This type of join is rarely used as it does not have a join
condition, so every row of R1 is joined to every row of
R2. For example, if both tables contain 100 rows the
result will be 10,000 rows. This is sometimes known as
a cartesian product and can be specified in either one
of the following ways:
SELECT * FROM R1 CROSS JOIN R2 SELECT * FROM R1,
R2
Network Model
The network model is a database model conceived
as a flexible way of representing objects and their
relationships. Its distinguishing feature is that the
schema, viewed as a graph in which object types
are nodes and relationship types are arcs, is not
restricted to being a hierarchy or lattice.
Where the hierarchical model structures data as a
tree of records, with each record having one
parent record and many children, the network
model allows each record to have multiple parent
and child records, forming a generalized graph
structure.
In 1969, the Conference on Data Systems Languages
(CODASYL) established the first specification of the
network database model. This was followed by a second
publication in 1971, which became the basis for most
implementations. Subsequent work continued into the
early 1980s, culminating in an ISO specification, but this
had little influence on products.
Data Structure Diagram
A data structure diagram is a scheme representing
the diagram of a network database. Such a
diagram consists of two basic components;
Boxes
Lines
- The boxes correspond to record types and the
lines correspond to links. A data structure
diagram serves the name purpose as an entity
relationship diagram. It specifies the overall
logical structure of the database.
Consider a database representing a customer-account
relationship in a banking system. There are two record
types, customer and account, customer has fields name,
street and city and account has two fields; number and
balance. The relationship between customer and account
is many to many relationship.

Data structure diagram of banking database


Data Base Task Group (DBTG) Model
Data Base Task Group (DBTG) approach to data
management is described and then evaluated in
terms of CASD.
DBTG sets:
Many to one links can be used in the DBTG
model, a data-structure diagram consisting of two
record type that are linked together has the
general form.
This structure is referred to in the
DBTG model as a DBTG-set. A
In each set, record type A is called as
the owner or parent of the set and B is
called the member or child of the set.
Each DBTG set can have any number B
of set occurrences, that is actual
instances of linked records.
No member records of a set can DBTG set
participate in pore than on occurrence
of the set at any point
Query Language
Formal Query Language: Provide Procedural or
Non-procedural Advantage
Ex: 1. Relational Algebra (Procedural)
2. Tuple Relational Calculus (Non-procedural)
Commercial Query Language: Provide
Procedural & Non-procedural Advantage
Most Popular Commercial Query Language

SQL(Structured Query Language )


QBE (Query By Example)
Quel (Query Language)
Datalog
Several Parts of SQL
DDL
DML
Embeded DML
View Definition
Authorization
Integrity
Transaction Control
Clause of SQL
Three Clause
- Select (field)
- From (table name
- Where (condition)
Example
Table: Personal
Id Name Dob P_address District
101 bari 10-1-98 Tejgaon Dhaka
102 alam 12-5-76 Mirpur Khulna

select *
from personal
where district=dhaka
Example
Table: Personal
Id Name Dob P_address District
101 bari 10-1-98 Tejgaon Dhaka
102 alam 12-5-76 Mirpur Khulna

Delete personal
where Id=102
Insert personal
Valus(103, kalam 10-6-90 Gazipur Rajshahi
BANGLADESH
B=Blood (i)
A=Achieve (AwRZ)
N=Noteworthy (wPi^ibxq)
G=Golden (mvbvjx)
L=Land (`k)
A=Admirable (cmswkZ)
D=Democratic (MYZvwK)
E=Evergreen (wPimeyR)
S=Sanctify (cwe)
H=Habitation (evmfwg)
259your age 39=?
Traditional file system of DBMS

File A PROG A

File B PROG B
O/S

File C PROG C
Library System
or
Library Management System
Preliminary list of transactions
1. Store details of new borrower
2. Store details of new Acquisition
3. Make loan
4. Record return of loan
5. Delete borrower
6. Delete Acquisition
7. Reserve book
8. Delete Reservation
9. Update current price
10.Send overdue loan reminder
Software details of library info
Thank You
MIS (Management Information System)

A management information system (MIS) is asystem that


provides information needed to manage organizations
effectively. Management information systems involve three
primary resources:
1. Technology
2. Information
3. People.
It's important to recognize that while all three resources are key
components when studying management information systems ...
the most important resource is people. Management
information systems are regarded to be a subset of the overall
internal controls procedures in a business, which cover the
application of people, documents, technologies, and procedures
used by management accountants to solve business problems
such as costing a product, service or a business-wide strategy.
Types of information management systems

There are many types of information


management systems in the market that provide
a wide range of benefits for companies.
- Strategic information management system,
- customer relation management systems and
- enterprise resource planning systems .
Advantages of information management systems

(1) The company is able to highlight their strength and


weaknesses due to the presence of revenue reports,
employee performance records etc. The identification of
these aspects can help the company to improve their
business processes and operations.
(2) The availability of the customer data and feedback can help
the company to align their business processes according to
the needs of the customers. The effective management of
customer data can help the company to perform direct
marketing and promotion activities.
(3) Information is considered to be an important asset for any
company in the modern competitive world. The consumer
buying trends and behaviors can be predicted by the analysis
of sales and revenue reports from each operating region of
the company.
Executive
Long term planning Management

Middle
Short term planning Management &
Professional Staff

Supervisory Staff

Clerical and
Service Staff

End-user, the different class of an organizations


Different types of management reports in MIS

Typically MIS produce four types of reports;


1. Detailed reports: Customer accounts reports, student transcript
2. Historical reports: Daily transaction reports, customer update reports
3. Summary reports: Daily sales reports, Balance reports
4. Exception reports: Defaulters list
Elements of Information system

Inputs and Outputs (Materials, resources & goods, services)


Processors (human, hardware, software)
Database (MIS)
Control
Feedback
Environment
Boundaries and interface
End-users
The key qualities of Manager in MIS service
1. Skill in planning, organizing and controlling the
works of the division
2. Ability to deal logically with difficult problems
and cope with new situations
3. Technical knowledge of hardware, software
packages and networking.
4. Ability to relate to others
5. Board knowledge of the functions of the
employing ogranization.
Thank You !
DRIVING FORCE
Building Asia & Pacific region
through Technical & Vocational
Education and Training for Peace,
Harmony and Sustainable
Development in Knowledge Era by
internalizing 3T

Teach Mind
Touch Heart
Transform Life

Вам также может понравиться