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

Database Management Systems

An introduction

January 11, 2015

EED, NIT Calicut

Database System
A very large integrated collection of data of
the entities and relationships
Database system tries to model the real world
systems and the underlying hierarchies, data
(information)flows etc.
A Database Management System (DBMS) is a
software package designed to store and
manage databases.
January 11, 2015

EED, NIT Calicut

Why Study Databases?


Many computing applications deal with large
amounts of information
Database systems give a set of tools for storing,
searching and managing this information
Databases are a core topic in computer science
Basic concepts and skills with database systems
will help Engineers to deal with many computerized
information systems, CAD tools, GIS, etc
January 11, 2015

EED, NIT Calicut

Informatics
Study of database systems has graduated as a
major field of specialization namely
Informatics
Eg. Bioinformatics

January 11, 2015

EED, NIT Calicut

Data and Database


A database is a collection of related data
By data we mean known facts that can be
recorded and that have implicit meaning
Eg. The name of a person becomes data for
the Institute if he/she is a student or
employee or supplier or examiner or some of
that kind of relation exists

January 11, 2015

EED, NIT Calicut

Database
A database has many implicit properties
1. A database represents some aspects of the
real world sometimes called the mini world
or the Universe of Discourse(UoD)
Changes to the mini world are reflected in
the database

January 11, 2015

EED, NIT Calicut

Properties of database
2. A database is a logically coherent collection of
data with some inherent meaning. A random
assortment of data cannot correctly be
referred to as a database

January 11, 2015

EED, NIT Calicut

Properties of database
3. A database is designed, built and populated
with data for a specific purpose. It has an
intended group of users and some pre
conceived applications in which these users
are interested.

January 11, 2015

EED, NIT Calicut

Properties of database
4. A database can be of any size and of varying
complexity
5. A database may be generated and maintained
manually or it may be computerized
For small scale use, computerization is a waste
but for large scale application computerization
is very complex but highly effective in
management, reporting monitoring etc
January 11, 2015

EED, NIT Calicut

Properties of database
6. A computerized database may be created and
maintained either by a group of application
programs written specifically for that task or by a
database management system
Commercial DBMS
ORACLE
SAP
DB
FOXPRO
MS ACCESS
January 11, 2015

EED, NIT Calicut

10

Database Management System(DBMS)


A database management system(DBMS) is a
collection of programs that enables users to
create and maintain database. A DBMS helps
in
Defining
Constructing
Manipulating
For various applications
January 11, 2015

EED, NIT Calicut

11

Defining Database
Specifying the data types
Defining structures for the data
Specifying the constraints

January 11, 2015

EED, NIT Calicut

12

Constructing Database
Building the database on a suitable medium
MS ACESS works on PC environment
SAP works on large systems
ORACLE can be customized to PC or LAN or even
Distributed Systems

January 11, 2015

EED, NIT Calicut

13

Manipulating Database
Querying the database to retrieve specific
data
Updating the database to reflect changes in
the mini world
Generating reports from the data

January 11, 2015

EED, NIT Calicut

14

Database System
A database system consists of the DATABASE and
the DBMS Software
MIS- Management Information System
DSS-Decision Support System
ERP-Enterprise wide Resource Planning solution
DCS-Distributed Control System
SCADA-Supervisory Control & Data Acquisition system
End to End Solution(Total Solution for all functional
requirements)
Custom Solution(Partial solution for a particular purpose)
January 11, 2015

EED, NIT Calicut

15

Characteristics of DBMS
Program-Data independence
The structure of the data files is stored in the
DBMS catalog separately from the access
programs
Program-Operation independence

January 11, 2015

EED, NIT Calicut

16

Data Modeling
Data modeling is very essential to understand the
extent and variety of information that are to be
collected and stored to serve the intended
purpose
The more deeper the understanding of the system
functions, interdependence and the end user
requirements or the purposes, the better will be
the data models we develop

January 11, 2015

EED, NIT Calicut

17

Data Modeling
Data modeling begins with the use of high
level conceptual data models for database
design
Data modeling involves four steps\
Requirement collection and analysis
Conceptual Design
Implementation of database
Physical design phase
January 11, 2015

EED, NIT Calicut

18

Requirement collection and analysis


- Interview with prospective database users
- Understand and document their data
requirements
- Understand the functional requirements of
the applications
- Know the user defined
operations(transactions) that will be applied
to the database
- Know the retrievals and updates needed
January 11, 2015

EED, NIT Calicut

19

Conceptual Design
Create a conceptual schema for the database using
a conceptual high level data model
-it will give a concise description of the data
requirements of the users
-it do not contain the implementation details
-it can be used for communicating with the non
technical users
-it can also be used to analyze the extent to which
the users data requirements are met and that
the conflicts are resolved/avoided
January 11, 2015

EED, NIT Calicut

20

Implementation of database
3. The next step after data model/design is the
actual implementation of the database, using
a commercial DBMS
-for this we need data model mapping(logical
design)
-this converts the high level data model to the
implementation data model
-Fine-tuning the requirements considering the
data availability, capability of the DBMS etc
January 11, 2015

EED, NIT Calicut

21

Physical design phase


Internal storage structures
Access modes/paths
File organization for the database files

January 11, 2015

EED, NIT Calicut

22

Going to the Mini World!!

January 11, 2015

EED, NIT Calicut

23

Data Modeling using Entity &


Relationship Model
Entity Relationship(ER) Model is a popular
high level conceptual data model
The ER model describes data as entities,
relationships and attributes

January 11, 2015

EED, NIT Calicut

24

BRANCH
NAME

CREDIT

COURSE
STUDENT

ROLLNO

ADMYEAR
GRADE
January 11, 2015

EED, NIT Calicut

25

CODE

DEPT

TITLE

COURSE

TYPE
January 11, 2015

EED, NIT Calicut

CREDIT
SLOT

26

EMPCODE

DEPT

NAME

FACULTY

DESIG

COURSE
January 11, 2015

EED, NIT Calicut

27

COURSE

CREDIT

OFFER

STUDENT

FACULTY
ADVISE
January 11, 2015

EED, NIT Calicut

28

Entity, Attributes and Data


The ER model describes data as entities,
relationships and attributes
Entities and Attributes
The basic object that the ER model represent is an
entity, which is a thing in the real world with an
independent existence
Physical existence-person, car, grocery item,
Conceptual existence-company, job, university course,

January 11, 2015

EED, NIT Calicut

29

Entity & Attributes


Each entity has attributes
These are particular properties that describe it

A particular entity will have a value for each of


its attributes(may be at a given instant of
time)
The attribute value that describe each entity
become a major part of the data

January 11, 2015

EED, NIT Calicut

30

Types of Attributes
Several types of attributes occur to the ER
model
Simple vs composite
Single valued vs multivalued
Stored vs derived

January 11, 2015

EED, NIT Calicut

31

Composite vs Simple
Eg. Name can be a composite attribute if we
want to separate sirname, first name etc
Composite attributes can be divided into
smaller sub parts which represent more basic
attributes with independent meanings
The value of a composite attribute is the
concatenation of the values of the constituent
simple attributes
January 11, 2015

EED, NIT Calicut

32

Single vs multivalued
Most attributes have a single value for a
particular entity. Such attributes are called
single valued
Employee is an entity
Data of Birth single valued attribute
Qualification multivalued attribute

A multivalued attribute may have a lower and


upper bound on the number of values allowed
for each individual entity
January 11, 2015

EED, NIT Calicut

33

Stored vs Derived
Some attribute like Age can be derived from
another attribute DateofBirth
Some attributes can be derived from related
entities

January 11, 2015

EED, NIT Calicut

34

NULL Value
A particular entity may not have an applicable
value for an attribute
For such situations, a special value called NULL
is created
Situations
Missing data(data not entered)
Not known values
Not applicable attribute

January 11, 2015

EED, NIT Calicut

35

Entity type & Entity set


A database usually contains groups of entities
that are similar
An entity type defines a collection(or set) of
entities that have the same attribute
The collection of all entities of a particular
entity type in the database at any point in
time is called an entity set
Entity type and entity set can be given the
same name
January 11, 2015

EED, NIT Calicut

36

Key Attribute
An important constraint on the entities of an
entity type is the key or uniqueness constraint on
attributes
An entity type usually has an attribute whose
values are distinct for each individual entity in the
collection
Such an attribute is called a key attribute and its
value can be used to identify each entity uniquely
Several attributes could together form key
January 11, 2015

EED, NIT Calicut

37

Entity & Relationships


Between entities of different type, there exists
relations which makes the data composite and
interdependent for a given database

January 11, 2015

EED, NIT Calicut

38

Types of Relationships

One to One
One to Many
Many to One
Many to Many

January 11, 2015

EED, NIT Calicut

39

COURSE

CREDIT

OFFER

STUDENT

FACULTY
ADVISE
January 11, 2015

EED, NIT Calicut

40

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