Upload
sahana-s-mendon
View
216
Download
0
Embed Size (px)
Citation preview
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 1/50
DBMSData Base Management System
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 2/50
Introduction to DB
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 3/50
What is Database?
It is a collection or single storage of allrelated data files or it is mechanized,centrally-controlled, collection of data
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 4/50
What is the problem of traditional file basesystem? Why DATABASE
Problems of file based systems: Data redundancy and inconsistency
Redundancy - Same data kept in many places Inconsistency – Data in many places but the data do not match
(no updation).
Difficulty in accessing data When the data are kept in many files then this can happen
Data Isolation When attempting to maintain the highest level of isolation , a
DBMS usually acquires locks on data (when accessed more then one
place)
Concurrent access anomalies If same data accessed two places (example bank Rs.1000 balance, Cheaque 2000)
Security problems Any one can take the full database out
Integrity problems Integrity check since the file will accept anything eg:-29/02/1983
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 5/50
Purpose of Database Systems
Database management systems weredeveloped to handle the following difficulties of typical file-processing systems supported byconventional operating systems:
Data redundancy and inconsistency Difficulty in accessing data Data isolation – multiple files and formats Concurrent access by multiple users /Concurrent
access anomalies Security problems Integrity problems
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 6/50
Database Characteristics
Co-ordinated updation To ensure data consistency, each subsystem that participates in
a single transaction must coordinate update operations.
High Quality and Recency of Data belonging to, or occurring at a time immediately before the
present
Data Security means of ensuring that data is kept safe from corruption and that
access to it is suitably controlled.
Data Compatibility data search may reveal multiple sources of similar data
No Data Duplication Data multiply copies
Logical Concept Purposes for creation
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 7/50
DBMS Objectives(5 Objectives)
1. Availability
2. Shareability
3. Evolvability
4. Data Independence
5. Data Integrity
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 8/50
Availability
Data should be available when the user wants to use it for:
Efficient storage, updating and retrieval of
data.
Purposeful information retrevel.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 9/50
Share ability
Data shared across applications
No data is owned by an application.
Minimization of unplanned redundancy.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 10/50
Evolvability
Database should evolve with time asapplications and query needs changeswith time.
It is also defined as the capacity of asystem for adaptive evolution
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 11/50
Data Independence
It is the type of data transparency thatmatters for a centralized DBMS. It refersto the immunity of user applications to
make changes in the definition andorganization of data.
Data Independence Types
Physical Independence Logical Independence
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 12/50
Data Independence Types
Physical Independence:
Physical data independence deals with hiding the details of thestorage structure from user applications. The application should notbe involved with these issues, since there is no difference in theoperation carried out against the data.
Logical Independence:
The external scheme may stay unchanged for most changes of the logicalscheme. This is especially desirable as the application software does not
need to be modified or newly translated.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 13/50
Data Integrity
It refers to the trustworthiness of systemresources over their entire life cycle. In moreanalytic terms, it is "the representationalfaithfulness of information to the true state of theobject that the information represents, whererepresentational faithfulness is composed of four essential qualities or core attributes”: Completeness,
Timeliness,
Accuracy and
Validity
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 14/50
View of Data
An architecture for a database system
View 1
Physical
level
Logical
level
View 2 View n…
View level (DB’s)
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 15/50
Actually, Creating Various DB with DBMS
Personnel Dept.
Emp – Details -1
ECODE (Primary Key)
Name Address
Basic
Grade (confidential info)
Training Needs
Marketing Dept.
Emp – Details -2
ECODE (Primary Key)
Name Job – Assigned
Performance
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 16/50
Full table (information's available to all) no privacy
Full Table
ECODE
Name
Address
Basic
Job-Assigned
Performance
Grade
Training-needs
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 17/50
Creating Various DB using DBMS
LOGICAL (VIEW-1)
Personnel Dept.
Emp – Details -1
ECODE (Primary Key) Name
Address
Basic
Grade (confidentialinfo)
Training Needs
LOGICAL (VIEW-2)
Marketing Dept.
Emp – Details -2
ECODE (Primary Key) Name
Job – Assigned
Performance
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 18/50
Physical View (Stored in DBMS)
ECODE
Name
Address
Basic
Job-Assigned
Performance
Grade
Training-needs
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 19/50
Data Models A collection of tools for describing:
Data Data relationships Data semantics Data constraints
Object-based logical models Entity-relationship model Object-oriented model Semantic model Functional model
Record-based logical models Relational model Network model Hierarchical model
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 20/50
A collection of tools for describing
Data The term data refers to qualitative or quantitative
attributes of a variable or set of variables
Data relationships
A relationship exists between two databasetables when one table has a foreign key thatreferences the primary key of another table.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 21/50
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 22/50
Data semantics
It is a conceptual data model in which semanticinformation is included. This means that the modeldescribes the meaning of its instances. Such a
semantic data model is an abstraction that defineshow the stored symbols (the instance data) relate tothe real world.
Or
The semantic data model is a software engineeringmodel based on relationships between storedsymbols and the real world.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 23/50
Data constraints
Database constraints are rules that defineinterrelations between tables and can check andmodify the data in a database.
or Database constraints is the section shows the data
rules that must be followed when entering data in thevarious Domain Name Control Panel fields.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 24/50
Usernames Allowed characters: A-Z a-z 0-9
Passwords Allowed characters: A-Z a-z 0-9 [ ] ( ) ! @ $ ^ , . ~ | = - + _ ]
Phone Numbersmax 20 characters
Fax Numbersmax 20 characters
Email Addresses
check in Email::Valid
Field Limits*_first_name => 64*_last_name => 64*_org_name => 64*_address1 => 64 (note, conflicts in various areas)
*_address2 => 64 (optional) (note, conflicts in various areas)*_address3 => 64 (optional) (note, conflicts in various areas)*_city => 64*_state => 32*_country => 2*_postal_code => 32 (required) ("na" accepted as a placeholder)*_phone => 20 (note, conflicts in various areas)
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 25/50
Object-based logical models
Entity-relationship model (ER Model)
An entity-relationship model (ERM) is anabstract and conceptual representation of
data. Entity-relationship modeling is adatabase modeling method, used to producea type of conceptual schema or semantic datamodel of a system, often a relationaldatabase, and its requirements in a top-downfashion. Diagrams created by this process arecalled entity-relationship diagrams, ERdiagrams, or ERDs.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 26/50
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 27/50
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 28/50
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 29/50
Object-Oriented Model
The Object-Oriented Model assists the
programmer to address the complexity of aproblem domain by considering the problemnot as a set of functions that can beperformed but primarily as a set of related,
interacting Objects.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 30/50
Semantic model
It is a conceptual data model in whichsemantic information is included. This means
that the model describes the meaning of itsinstances(occurrences). Such a semantic datamodel is an abstraction that defines how thestored symbols (the instance data) relate to the real
world
Semantic - meaning that is used to understand human expression through language
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 31/50
Functional model
A function model, also called an activity modelor process model, it is a graphical
representation of an enterprise's functionwithin a defined scope.
The purposes of the function model are todescribe the functions and processes.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 32/50
Data Definition Language (DDL)
Specification notation for definingthe database schema
DDL compiler generates a set of
tables stored in a data dictionary
Data dictionary contains metadata (data aboutdata)
Data storage and definition language – specialtype of DDL in which the storage structure andaccess methods used by the database systemare specified
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 33/50
Data Manipulation Language (DML)
DML involves both access to andalteration of the contents of database andhence its relations:
Retrieval – via SELECT Statement Insertion – via SELECT Statement
Deletion – via DELETE Statement
Modification – via UPDATE Statement
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 34/50
Language for accessing and manipulatingthe data organized by the appropriate datamodel
Two classes of languages Procedural – user specifies what data is
required and how to get those data
Nonprocedural – user specifies what data isrequired without specifying how to get thosedata
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 35/50
Transaction Management
A transaction is a collection of operations thatperforms a single logical function in a databaseapplication.
Transaction-management component ensuresthat the database remains in a consistent(correct) state despite system failures (e.g.power failures and operating system crashes)and transaction failures.
Concurrency-control manager controls theinteraction among the concurrent transactions,to ensure the consistency of the database.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 36/50
Storage Management
A storage manager is a program module thatprovides the interface between the low-leveldata stored in the database and the applicationprograms and queries submitted to the system.
The storage manager is responsible for thefollowing tasks:
Interaction with the file manager Efficient storing, retrieving, and updating of data
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 37/50
Database Administrator
Coordinates all the activities of the databasesystem; the database administrator has agood understanding of the enterprise’sinformation resources and needs:
Database administrator’s duties include: Schema definition
Storage structure and access method definition
Schema and physical organization modification
Granting user authority to access the database Specifying integrity constraints
Acting as liaison (communication) with users
Monitoring performance and responding to changes inrequirements
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 38/50
Database Users
Users are differentiated by the way they expectto interact with the system.
Application programmers: interact with system throughDML (Data Manipulation Language).
Specialized users: write specialized databaseapplications that do not fit into the traditional dataprocessing framework
Sophisticated users: form requests in a database querylanguage.
Naive users: invoke one of the permanent applicationprograms that have been written previously
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 39/50
Data Warehouse
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 40/50
What is a Data Warehouse?
A single, complete and consistent store of data obtained from a variety of differentsources made available to end users in a
what they can understand and use in abusiness context.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 41/50
A process of transformingdata into information andmaking it available tousers in a timely enoughmanner to make adifference
Data
Information
orWhat is Data Warehousing?
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 42/50
Data Warehousing -- It is a process
Technique for assembling and managingdata from various sources for the purposeof answering business questions. Thus
making decisions that were not previouspossible
A decision support database maintained
separately from the organization’soperational database
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 43/50
A data warehouse is a
subject-oriented
integrated time-varying
non-volatile
collection of data that is used primarily in
organizational decision making.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 44/50
Benefits of a Data Warehouse
A data warehouse maintains a copy of information fromthe source transaction systems.
Maintain data history Integrate data from multiple source systems, enabling a
central view across the enterprise. Improve data, by providing consistent codes and
descriptions. Present the organization's information consistently. Provide a single common data model for all data.
Restructure the data so that it makes sense to thebusiness users. Restructure the data so that it delivers excellent query
performance
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 45/50
Data Mining
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 46/50
Data Mining works with Warehouse Data
Data Warehousing provides the Enterprisewith a memory
Data Mining provides the Enterprise withintelligence
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 47/50
Data Mining
A Process that uses various techniques todiscover “patterns” or knowledge from
data.
Visualization.
Machine Learning algorithms.
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 48/50
Examples
Link Analysis
Frauds detection
New Solutions
Revenue Management
Marketing
Stocks
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 49/50
7/30/2019 DBMS Module 3
http://slidepdf.com/reader/full/dbms-module-3 50/50
Thank you…