Post on 06-Apr-2018
8/3/2019 Final Mis Done
1/39
INTRODUCTION
What Is a DBMS?
A Database is a collection of recordsand data in structured format so that datacan be easily retrieved for analysis andcalculations.
8/3/2019 Final Mis Done
2/39
What Is a DBMS?
A Database Management System is a system that
creates, manages, and controls a database used
by managers for analysis and decision making.
8/3/2019 Final Mis Done
3/39
Why Study Databases??
To understand :-
The importance of storing data. The roles of data models.
Views of business users and database designers.
The concept of sharing data.
?
8/3/2019 Final Mis Done
4/39
Why Use a DBMS?
Data independence and efficient access.
Reduced application development time.
Data integrity and security.
Uniform data administration.
Concurrent access, recovery from crashes.
8/3/2019 Final Mis Done
5/39
Applications of DBMS
SalesReporting
OrderProcessing
Payroll
PerformanceAppraisal
Marketingapplication
Financeapplication
HRISapplication
DatabaseMgmtSystemIntegrateddata store
Marketingapplication
8/3/2019 Final Mis Done
6/39
Database management system
A database management system is a system which defines, interprets,manipulates and maintains a collection of databases which are entirelyseparate in structure. DBMS is the major component of database system.
There are many different types of DBMSs, ranging fromsmall systemsthat run on personal computers to huge systems that runon mainframes.
The following are examples ofdatabase applications:
Banking System and ATM's machines.
Credit Card/Credit Limit Check System.
computerized library systems
flight reservation systems
computerized parts inventory systems
Different DBMSs support different query languages, although there is asemi-standardized
query language called SQL(structured query language).Sophisticated languages for managing database systems are called fourth-generation languages, or 4GLsfor short.
http://www.webopedia.com/TERM/S/system.htmlhttp://www.webopedia.com/TERM/R/run.htmlhttp://www.webopedia.com/TERM/P/personal_computer.htmlhttp://www.webopedia.com/TERM/M/mainframe.htmlhttp://www.webopedia.com/TERM/M/mainframe.htmlhttp://www.webopedia.com/TERM/M/mainframe.htmlhttp://www.webopedia.com/TERM/R/run.htmlhttp://www.webopedia.com/TERM/P/personal_computer.htmlhttp://www.webopedia.com/TERM/M/mainframe.htmlhttp://www.webopedia.com/TERM/D/database_management_system_DBMS.htmlhttp://www.webopedia.com/TERM/S/support.htmlhttp://www.webopedia.com/TERM/S/SQL.htmlhttp://www.webopedia.com/TERM/L/language.htmlhttp://www.webopedia.com/TERM/L/language.htmlhttp://www.webopedia.com/TERM/S/SQL.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/L/language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/F/fourth_generation_language.htmlhttp://www.webopedia.com/TERM/L/language.htmlhttp://www.webopedia.com/TERM/S/SQL.htmlhttp://www.webopedia.com/TERM/S/support.htmlhttp://www.webopedia.com/TERM/D/database_management_system_DBMS.htmlhttp://www.webopedia.com/TERM/M/mainframe.htmlhttp://www.webopedia.com/TERM/P/personal_computer.htmlhttp://www.webopedia.com/TERM/R/run.htmlhttp://www.webopedia.com/TERM/S/system.html8/3/2019 Final Mis Done
7/39
The information from adatabase can be presentedin a variety of formats:
Most DBMSs include a reportwriter programthat enablesyou to output data in theform of a report.
Many DBMSs also includea graphics component thatenables you to outputinformation in the form ofgraphs and charts.
Formats
Report
writer
Graphics
8/3/2019 Final Mis Done
8/39
Diagram of DBMS
8/3/2019 Final Mis Done
9/39
Components of DBMS
components
data
Hard-ware
Soft-ware
user
8/3/2019 Final Mis Done
10/39
Advantages of a DBMS
Provides the way for storage
Centralized control and an easy access
Provides the way for doing simple and complexqueries
Arranging data in various ways
Maintain non redundancy of data
Maintain security and privacy of data
Access to multi users
8/3/2019 Final Mis Done
11/39
Disadvantages of DBMS
Costly due to requirements of expensivehardware
Higher operating costs
Greater complexity of backup and recoveryin multiuser environment
High risk of data loss due to centralized ofdatabase
8/3/2019 Final Mis Done
12/39
STRUCTURE OF A DBMS
DATA DEFINITION LANGUAGE (DDL)
DATA MANAGER
FILE MANAGER
DISK MANAGER
QUERY MANAGER
DATA DICTIONARY
8/3/2019 Final Mis Done
13/39
ROLE OF DBMS IN BUILDINGSYSTEMS
DBMS are very popular packages formicrocomputers
Examples of leading DBMS
It provides user friendly interface
Easy to manage application
8/3/2019 Final Mis Done
14/39
Data Models
A data model is a collection of concepts fordescribing data.
A schemais a description of a particularcollection of data, using the given data model.
The relational model of datais the most widelyused model today.
Main concept: relation, basically a table with rows
and columns.
Every relation has a schema, which describes the
columns, or fields.
8/3/2019 Final Mis Done
15/39
Types of data models and schema
Conceptual schema:1. This schema is concerned with the overall logical
model of the database.
2. It is mainly concerned with representation of
information in the abstract from as compared to theway in which data is actually stored.
3. Example:-
in a payroll system , the information about
employee no.(4 characters), employeename(20) andbasic salary (8 digits) is the conceptual view of thedatabase.
8/3/2019 Final Mis Done
16/39
External schema:-
1. It is concerned with the user-orientedway of viewing the data.
2. This schema is also termed as sub-schema.
3. Example:-
in a payroll system , the employee nameand his basic salary as viewed by theuser is the external view of the database.
8/3/2019 Final Mis Done
17/39
Contt..
Internal schema:-
1. It is concerned with the actual storagedesign of data.
2.
It reflects how the data is stored in andaccessed from the physical storage.
3. Example:-
in a payroll system , the information about
how the employee no., employee name andbasic salary are stored is the internal viewof the database.
8/3/2019 Final Mis Done
18/39
1. To Modify the Structure of the Table:
In order to add new fields or deleteexisting fields we have to modify thestructure of the table. To do this,
Select the table name.
Right-click on the selected name for theshort-cut menu.
Click on design. The table structure window is displayed
where changes can be made
8/3/2019 Final Mis Done
19/39
Structured Query Language
SQL developed by IBM , is a standard datadefinition and data manipulation languageof relational databases.
It is designed to define , access , querry ,organise and update the data andinformation in relational databases.
8/3/2019 Final Mis Done
20/39
Contt
To create a table of supplier database inSQL :
CREATE TABLE SUPPLIER
(SUPPNO CHAR (3) NOT NULL.SUPPNAME CHAR(20),
CITYCODE NUMBER(2),
CITYNAME CHAR(3));
To query the database , the followingstatement is used:
8/3/2019 Final Mis Done
21/39
Contd...
SELECT SUPPNO, SUPPNAME, CITYCODE ,CITYNAME
FROM SUPPLIER
WHERE SUPPNO = S01;
8/3/2019 Final Mis Done
22/39
2. To modify/delete the data in the table:
In order to edit data, or delete existingrecords or add new records to the table,
Select the table name.
Right-click on the selected name for theshort-cut menu
Click on Open. The data window is displayed where data
can be edited, deleted or added.
8/3/2019 Final Mis Done
23/39
3. To Rename a table:
In order to change the name of a table,
Select the table name.
Right-click on the selected name for theshort-cut menu.
Click on Rename.
8/3/2019 Final Mis Done
24/39
4. To Delete a table:
In order to delete a table from thedatabase,
Select the table name. Right-click on the selected name for the
short-cut menu.
Click on delete.
8/3/2019 Final Mis Done
25/39
5. To Return to VB:
Select File > Exit to exit from Visual Data
Manager and return to VB.
8/3/2019 Final Mis Done
26/39
Database locking
Database locking is a mechanism by which two userswill be prevented from updating the same record at thesame time. The Microsoft Jet database engine provides3 levels of locking.
1. Database locking: Only one user can access thedatabase.
2. Table locking: Only one user can access the table.
3. Page locking: The Microsoft jet database engineautomatically performs page locking which is to lock
one page of data (normally about 2KB) in which therecord is present.
8/3/2019 Final Mis Done
27/39
What is Normalisation ?
Normalization is the basis of designingrelational databases
Process of simplifying the data structureby replacing it with smaller and multipledata structure
Study of relations between tables andattributes
8/3/2019 Final Mis Done
28/39
Goals of normalisation
Minimizing the redundant data
Reducing inconsistent data
Designing data structures for easiermaintainance
8/3/2019 Final Mis Done
29/39
Types of normal forms
First normal form
Second normal form
Third normal form
8/3/2019 Final Mis Done
30/39
First normal form (1NF)
No duplicated rows in the table Each cell is single valued
Entries in the column is of same kind
Second normal form (2NF) All non key attributes are dependent on key
All column depends on the primary key only
Each record in a table should be uniquelyidentifieable trough a single column
8/3/2019 Final Mis Done
31/39
Contt
Third normal form
A relation is said to be in third normalform if no non keyfield depends on
another non-key field
8/3/2019 Final Mis Done
32/39
Denormalisation:-
Denormalisation is a processs ofattempting to optimize the readperformance of a database by addingredundant data or by grouping data
8/3/2019 Final Mis Done
33/39
Basic DBMS types
Hierarchical structure
Trees of records: one-to-many relationships
Limitations: Requires duplicating records (e.g. many-to-many
relationship)
Problems when updated
Retrieval requires knowing the structure (limited data
independence): traversing the tree from top to bottom using a procedural
language
8/3/2019 Final Mis Done
34/39
Contt.
Network structure: similar to the hierarchical database with theimplementation
of many-to-many relationships
Relational structure
Object-Oriented structure
Objects (collection of data items and procedures) andinteractions between them.
Is this really a new paradigm, or a special case of networkstructure?
Separate implementation vs. implementation on top of aRDBMS
8/3/2019 Final Mis Done
35/39
Relational structure
Relations, attributes, tuples
Primary key (unique combination of attributes for each tuple)
Foreign keys: relationships between tuples (many-to-many).
Example: SUPPLIES defines relations between ITEM andSUPPLIER
tuples.
Advantages: many-to-many relationships, ,high level declarative query language (e.g. SQL)
h d l
8/3/2019 Final Mis Done
36/39
The Transaction Model
Examples of primitives for transactions.
Primitive Description
BEGIN_TRANSACTION Make the start of a transaction
END_TRANSACTION Terminate the transaction and try to commit
ABORT_TRANSACTION Kill the transaction and restore the old values
READ Read data from a file, a table, or otherwise
WRITE Write data to a file, a table, or otherwise
8/3/2019 Final Mis Done
37/39
Conclusion:-
As we have seen DBMS is a collection ofrecords and data in structured format sothat data can be easily retrieved for
analysis and calculations. Hence DBMS is very important for any
organization.
8/3/2019 Final Mis Done
38/39
Reference:-
DBMS book of Bsc(I.T) by Himalayaprakashan.
Introduction to Computers By A. Leon & M
Leon.
8/3/2019 Final Mis Done
39/39