Database fundamentals

35
DBMS

description

This presentation has the details about the database fundamentals..

Transcript of Database fundamentals

Page 1: Database fundamentals

DBMS

Page 2: Database fundamentals

Data Storage Hierarchy٭ Bit: it is smallest unit of data a single binary Digit.

٭ Character: Multiple related bits are combine to

form a character(M,8,$..etc).

٭ Field: Multiple related character are combine to

form field. (employee code, emp name).

٭ Record: Multiple related field are combined to

form record. (a student record will contain field

containing data of the students)

Page 3: Database fundamentals

Data Storage Hierarchy

٭ File: Multiple related file are combine to form a

file.(a collection of all employee record of a

company will be employee file.)

٭ Database: Multiple related file are integrated to

form a Database. (multiple employee file such as

salary file, Personnel information file, Skill Set file)

Page 4: Database fundamentals

Database Model

٭ A database model defines the manner in which the

various files of a database are linked together.

٭ The commonly used database model are:

1. Hierarchical Database.

2. Network Database.

3. Relational Database.

4. Object Oriented Database.

Page 5: Database fundamentals

Hierarchical Database Model٭ The data element are linked in form of inverted

tree structure.

٭ Root at the top.

٭ Parent-child relationship

٭ Parent data element is one and can have one or

more subordinate or child element.

٭ There may be many child but only one parent

data element.

Page 6: Database fundamentals

Hierarchical Database Model٭ The data element of many applications can be

neatly organized with this model

٭ The main limitation is, it does not support

flexible data access because the data can only be

accessed by following the tree structure.

٭ Hence the mapping of data and their relationship

in tree structure is very important when the

database is first design.

Page 7: Database fundamentals

Network Database Model٭ It is extension of Hierarchical Database model.

٭ It follows parent-child relationship.

٭ The mapping of data and their relationship is very

important when the database is first design.

٭ Here the child data can have more than one parent and

can have no parent at all.

٭ Here the extraction of information can be from any data

element in database structure instead of root data

element.

Page 8: Database fundamentals

Relational Database Model

٭ Here the data element are organized in form of

multiple tables with rows and columns.

٭ Each table represents separate file.

٭ Each table column are represent as field.

٭ Each table row are represent as data record.

٭ The data in one table are related to data in

another table by common field.

Page 9: Database fundamentals

Relational Database Model

٭ It provide grater flexibility in data organization

and future enhancement.

٭ If new data is to be added then it is not necessary

to redesign the database rather new table can be

easily added.

Page 10: Database fundamentals

Database Model

Some Limitation Of Database Models Are:

1. Ability to model complex nested entities such as

engineering objects, multimedia documents.

2. Have only a limited set of data types they do not

allow storage and retrieval of long unstructured

data such as images, audio and textual documents.

Page 11: Database fundamentals

Object-Oriented DATABASE MODEL

٭ It was introduced to overcome the above listed

shortcoming.

٭ IT is a collection of object whose behavior, state and

relationship is defined according to object oriented

concept.

Page 12: Database fundamentals

Object-Oriented DATABASE MODEL

Page 13: Database fundamentals

Main Components of DBMS:

٭ Data Definition Language (DDL).

٭ Data Manipulation Language (DML)

٭ Query Language

٭ Report Generator.

Page 14: Database fundamentals

Data Definition Language (DDL).

IT is use to define the structure of a Database. The database

structure definition (Schema) typically includes the following:

٭ Defining all data element.

٭ Defining data element field and records.

٭ Defining the name, field length, and field type for each data

type.

٭ Defining control for field that can have only selective values.

٭ Defining the logical relationship among various data element.

٭ Defining access control for security purpose.

Page 15: Database fundamentals

Data Definition Language (DDL)

٭ In short every thing about the database structure is

included in its schema.

٭ This description can be use by system analyst in

defining new application.

٭ It is possible to generate complete description from

its schema.

Page 16: Database fundamentals

Database Administrator٭ Database system are typically installed and coordinated

by an individual called database Administrator.

٭ He have the overall authority to establish and control

data definition and Standard.

٭ He is responsible for determining relationship among

data element and designing database security.

٭ He also train programmer to use database.

٭ A DATA DICTONARY is develop to store DDL and even it

is automatically updated by DDL module.

Page 17: Database fundamentals

Data Manipulation Language (DML)٭ Once the structure is defined the database is ready for

entry and manipulation of data.

٭ Data Manipulation Language (DML) includes the

command to enter and manipulate the Data, with these

commands the user can perform the following,

٭ Add new records, navigate through the existing records,

view contents of various fields, modify the data, delete

the existing record, sort the record in desired sequence.

Page 18: Database fundamentals

Query Language٭ All database provide a query language which is use

to define the requirement for extracting information

from the database in form of Queries.

Page 19: Database fundamentals

Report Generator

٭ It helps the user to design report in desired format.

٭ It can also instructed to do arithmetic calculations

while presentation.

Page 20: Database fundamentals

Examples of Commercial Systems

• Oracle

• Informix (Unix)

• DB2, SQL/DS (IBM)

• Access (Microsoft)

• SQL Server (Microsoft +)

Page 21: Database fundamentals

Creating and Using Database

1. Defining its Structure (Schema).

2. Designing Forms.

3. Entering Data in it.

Page 22: Database fundamentals

Defining its Structure (Schema).

1. Here we list down all the field required in a database.

2. Determine name type and size of each field.

3. This information is captured in the system by the tool

called schema builder. (schema builder help the user to

define the database schema by prompting the user to

enter the field type, field size and so on…)

4. Modification is always possible be it is always better to

design the database carefully in 1st instance and

minimize the need to modify.

Page 23: Database fundamentals

Designing Forms

To Facilitate easier data entry form are form design with

several feature:

• List Box: it list several option and the user can

choose among them.

• Validation check: to ensure the corectness of

entered data.

• Automatic conversions: like upper to lower case.

• Automatic Formatting

Page 24: Database fundamentals

Designing Forms

Page 25: Database fundamentals

Entering Data

٭ After the form have been designed, the database is

ready for entry of data.

٭ Data is entered one record at a time.

٭ First the form with blank field are displayed then user

key in data in the blank form, then for second record

and so on……

Page 26: Database fundamentals

Viewing, Modifying, Deleting and Adding Records

1. Viewing Record

2. Modifying Record

3. Deleting Record

4. Adding Record

Page 27: Database fundamentals

Viewing records

٭ The command for viewing a record enables the

user to display the record of various field

according to the user requirement

Page 28: Database fundamentals

Modifying records

٭ The command for modifying a record enables

the user not only view but also update the

various field of a record.

Page 29: Database fundamentals

Delete records

٭ The command for delete a record enables the

user to remove the selected data from the

database.

Page 30: Database fundamentals

Add records

٭ The command for ADD a record enables the user

to add new record to Database when this

command is enabled the system display a blank

form and wait for the user to fill it

Page 31: Database fundamentals

Searching for Desired Information

1. Find Command.

2. Query Language

3. Query by Example.

Page 32: Database fundamentals

Find

٭ It is use for simple display query.

Example:

٭ It can not be use for complex query.

٭ It can operate only one table at a time.

Page 33: Database fundamentals

Query Language

٭ For handling complex queries all database support a

query language.

٭ Query lang can be easily learnt and used even by non

programmer.

٭ It can operate on multiple tables at a time and

specified criteria can be saved for future Use.

Page 34: Database fundamentals

Query By Example٭ It is a form which is designed to collect all necessary

information and the user simply have to specify the

search criteria by inputting values in the field of this

form.

٭ Again the values may be typed or selected from the

set of options. Once the user complete the QBE form

the QBE engine automatically convert in suitable

Query language.

Page 35: Database fundamentals

The End

…… Thank You ……