Sie sind auf Seite 1von 33

DATA BASE MANAGEMENT

INTRODUCTION

Key components of computer system are: Input The processor Storage Output Data communication

There are two items that add life to the computer system allow it to become a management information system. YesData and Information !!

INTRODUCTION

Before writing was invented, databases were completely within brains of the people, then in form of books/scrolls, Kings used to keep huge databases of who paid the taxes, and so forth. As time passed, business grew more complex and data associated with them, and today..bombarded with data and information!

DATA and INFORMATION

Just Data

..40,50,45,70,90,130,120,35.

Weights (in kgs) of the faculties and staffs of XISS, Ranchi. We are now somewhere between just data and information.

Now, let us process the data What is the average weight of the people who will use the lift? What is the weight of the heaviest faculty/staff who will use the lift? We can now, process the original data to give meaningful and valuable data information. Management can now able to find out the capacity and what kind of lift they require to install.

DATA BASE

DATABASE CONTAINS DATA, NOT INFORMATION.

With some assertions about the meaning of the data and some rules for processing the data, we are able to produce information from the database.
Thus, through proper design and use of the database, it can be an essential tool for producing information for making management decisions.

When a organization has a centrally, integrated collection of logically organized data, it has a database!!

DATABASE MANAGEMENT SYSTEM

DBMS is a system or set of rules and methods that allows for the definition, creation, updating, reading, maintenance, and protection of the database.
Features important in Database management:
Speed, process many transaction in a short time Accuracy, firms require the data they store and use to be correct Good at repetitive work

Hence, the computer has radical impact on database management systems because computer has all these characteristics.

OBJECTIVES OF DBMS

Provide the mass storage of relevant data


Make access to the data easy for the user Provide prompt response to user requests for data.

Make the latest modifications to the database available immediately.

OBJECTIVES OF DBMS

Eliminate redundant data.


Allow multiple users to be active at one time.

Allow for growth in the database system.


Protect the data from physical harm and unauthorized access.

These are the goals that a DBMS strive to fulfill.

STEPS IN DESIGNING A DATABASE


Determine the purpose of the database Determine the tables needed Determine the fields needed Identify the Primary keys Determine the relationship between tables

DATABASE DESIGN

Conceptual Model of database design provides a framework which specifies, in a systematic manner. It uses two frameworks:
Entity-relationship model Normalisation

Entity-Relationship Model (E-R Model)

Based on a perception of real world that consists of a set of basic objects, called entities, and a set of relationships among these objects. E-R Model specifies following elements:
Entity Relationship Mapping constraints E-R Diagram Reduction of E-R diagram to tables

Entity: An entity is an object that exists and is distinguishable from other objects. It may be physical, such as a person or a book, or it may be a concept, such as holiday or a job.
An entity is represented by a set of attributes. It is the properties possessed by each member of the entity set.

Entity
Name

entity CUSTOMER

attributes Cust_id Address

RELATIONSHIP: An association among several entities. MAPPING CONSTRAINTS: E-R Model defines certain constraints to which the contents of a database must conform. It may be of three types:

Cardinalities: it express the number of entities to which another entity set can be associated via a relationship. It can be of four types: one to one, one to many, many to one, many to many.

Existence dependencies: If the existence of entity A depends on the existence of entity B, A is said to be existence-dependent on B. Ex: Account and Transaction have existence dependencies. If account (B) is closed, transaction (A) has to be closed. Keys: It specifies how entity and relationships are distinguished. Ex. PAN is the super-key for income tax purpose. Roll Number is the super-key for identifying different students of a institution.

ENTITY - RELATIONSHIP DIAGRAM: After identifying the various entities, their attributes, relationships and constraints, the database designers document these into an entity-relationship diagram. Rectangle represents entity Ellipses-attributes Diamonds- Relationship Line- represents link
Acc Number

Name

CUSTOMER

Depositor

Account

Cust_id

Address

balance

REDUCTION OF E-R DIAGRAM TO TABLES

On the basis of E-R diagram, tables are prepared. For each entity set, a table is prepared with the corresponding name assigned and attributes shown in column. A similar table is prepared for relationship set.
CUSTOMER

Cust_id
A101

Cust Name
AMIT

Address
CLUB RD,RANCHI

A102
A104

MOHIT
PRINCE

HARMU, RANCHI
PURULIA ROAD, RANCHI ACCOUNT Acc Number Balance 291300000156 291300000278 10,000 23,000

291300000822

16,000

DEPOSITOR

Cust_id
A101

Account Number
291300000156

A102
A104

291300000278
291300000822

NORMALISATION

Normalization is a process of simplifying the relationships among data elements in a record. During this process, the complex and redundant attributes are simplified and removed. It helps to:
Structure the data Permit simple retrieval of data in response to query Simplify the maintenance of data Reduce the need to restructure or re-organise the data when new application requirements arise.

Normalization Process

The tests (conditions) for normalisation are: 1NF : First Normal Form: Now considered to be part of the formal definition of a relational model. It states that domain of an attribute must include only atomic values.

Normalization Process

2NF (Second Normalisation Form):


It is based on the concept of full functional dependency. A functional dependency X Y is a full functional dependency if removal of any attribute A from X means that the dependency does not hold any more, that is for any attribute A belongs to X, (X-{A}) does not functionally determine Y. An entity is said to be in 2NF if all its columns depend on the primary key only.

3NF (Third Normalization Form):


Based on transitive dependency. A table qualifies for 2NF and do not have transitive dependencies. Each column in a table must be dependent on the entire primary key, not just part of it.

First Normal Form Example DNAME DNUMBER DMGRIDN DLOCATIONS

DNAME

DNUMBER DMGRIDN

DLOCATIONS

Sales Plant

5 2

10051
20061

(Delhi,Mumbai,Banglore)
Delhi

Administration 1

30088

Gurgaon

DNAME

DNUMBER DMGRIDN

DLOCATIONS

Sales
Sales

5
5

10051
10051

Delhi,
Mumbai

Sales Plant

5 2

10051
20061

Banglore
Delhi

Administration 1

30088

Gurgaon

Example: Project Management


Project No.
1055 1088

Project Name

Employee Employee No. Name


Paul,Rahul, Binay

Rate Category
A,B,C

Hourly Rate (Rs.)


300,250, 200 300,250

CIL Survey 11,12,16 Education Project 11,17

Paul, Kartik A,B

1NF: No keys defined and repeating groups. When we remove groups and define the primary key (PK), we are left with

Project Project No. Name (PK) 1055 1055 CIL Survey CIL Survey

Employee No. (PK) 11 12

Employee Rate Name Category Paul Rahul A B

Hourly Rate (Rs.) 300 250

1055
1088

CIL Survey
Education Project

16
11

Binay
Paul

C
A

200
300

1088

Education Project

17

Kartik

250

2NF: The project name is only dependent on project number. The employee name, category, rate are dependent on employee number. So we remove them and place these fields in a separate table. So we are left with

Employee Table

Employee No. 11 12 16 11

Employee Rate Name Category Paul Rahul Binay Paul A B C A

Hourly Rate (Rs.) 300 250 200 300

17

Kartik

250

Project Table
Project Project No. Name
1055 CIL Survey

EmployeeProject Table

Project No. 1055


1055 1055 1088 1088

Employee No. 11
12 16 11 17

1088

Education Project

3NF: Now, only the employee table has more than one-key attributes. Employee name is not dependent on either rate category or hourly rate and same applies to rate category. Only Hourly rate is dependent on rate category, so we have to remove this
Employee Table
Employee Employee No. Name 11 12 16 17 Paul Rahul Binay Kartik Rate Category A B C B

Rate Table
Rate Category Hourly Rate (Rs.)

A B
C

300 250
200

DrvLicNo
Address

BName

Bank
U Owner

BAddress Company

CName CAddress

Person

Name

LienOrRegular Owns Purch_Date TEng_No TMake TModel Truck TYear

CEng_No CMake
CModel CAR CYear Registered _vehicle

Reg_No

Choice of DBMS

Governed by number of factors


Technological Economical Organizational requirements & decisions

Various costs involved are:


Software acquisition cost Maintenance cost Hardware acquisition cost Database creation and conversion cost Personnel cost Training Cost Operating Cost

Recent Trends in Database

Because of the development of new trends in information technology, new trends in database systems have also emerged. In recent years, several new application areas for database systems have emerged that are not served by relational data model. Some areas are distributed processing, computer-aided design, multimedia and hypermedia etc. Moreover, traditional business applications have grown more complex over time. For example, todays business applications often have to deal with image data and hypermedia databases.

Recent Trends in Database

Distributed Database: The DDBMS emerged as a merger of two technology: Database technology Network and data communication technology
Tremendous development due to wire and wireless technologies from satellite and cellular communications. A DDB is one that is stored in more than one physical location. Parts of the database are stored physically in one location and other parts are maintained in other locations.

Recent Trends in Database

Object Oriented Database: OOPLs: It creates software programs by selecting and arranging objects rather than by writing program code. When you integrate database capabilities with object programming language capabilities, the result is an object-oriented database management system or OODBMS

OODB is proposed to meet the needs of these more complex applications.


The object typically has two components state (value) and behavior (operations)

Recent Trends in Database

Hypermedia Database:
Also referred as multimedia or hypertext, includes various media, such as text, graphics, audio and video alongwith procedure for their use. In hypermedia databases, the concept of distributed information systems is used which has led to the emergence of global internet.

Management Responsibility

Management must understand some of the terms related to DBMS, concepts & approaches Manager to participate intelligently

User needs a facility for asking DBMS for information and reports Success of database also depends on user acceptance.