Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Rdbms Chapter 1 Database and Database Users: Describes The Structure of The Data

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

RDBMS

Chapter 1 Database and Database users


Database
A database is a collection of related data or Database is a collection of a
logically coherent collection of data with some inherent meaning.
Data:
Data is a collection of nown facts.
DBMS:
DBMS is a collection of programs that enables the users to create and
maintain the database.
Defining !defining data types" structures and constraints#
Constructing !storing the data#.
Manipulating !$uerying" updating" generating reports#.
Characteristics of Database Approach:
Self describing nature of the database system:
Database consists of both the data and the database definition
!catalog#" which has the complete description of the data base
structure and the constraints.
%nformation stored in the catalog is called the Meta data which
describes the structure of the data.
%nsulation between the program and the data" Data Abstraction
Data abstraction includes program operation and program data
independence.
&peration consists of an interface and implementation.
Data abstraction pro'ides a conceptual representation of the data
rather than the implementation details. (his is done using Data
Models uses logical concepts such as ob)ects" their properties rather
than the storage concepts.
Support of Multiple *iews of the Data
A 'iew is a subset of the database or the data that is deri'ed from the
database files but is not e+plicitly stored.
Sharing of data and Multi user transaction ,rocessing:
Database must support concurrent access to the data in a correct
manner.
Actors on the scene:
-or for design" de'elopment and operation of the Database.
Database Administrators:
,rimary resource: database
Secondary resource: DBMS and associated software.
1. Authori.e access to database
/. Coordinate and monitor the database.
0. (o ac$uire hardware and software resources.
Database Designers:
1. (hey identify the data to be stored in the database and choose
appropriate structures to store them.
/. (hey interact with the potential users and create a 'iew of the
database that meets their re$uirements.
0. (hese 'iews are integrated to create a feasible design of the
database.
1nd users:
2uery" update database and generate reports.
1. Casual 1nd users:
&ccasionally access the data base.
Re$uire different data each time
3se sophisticated $uery language
3se 4igh and medium le'el languages as browsers.
/. 5ai'e or parametric end users:
3se standard $ueries and updates called Canned transactions.
1+ample: Clers.
0. Sophisticated end users:
(hey thoroughly now the database structure and DBMS and
create applications for the database.
1g: Scientists" engineers
6. Stand Alone users:
Maintain their personal databases such as a ta+ pacage.
System analysts and Application programmers:
System analysts de'elop specifications for the canned transaction.
Application programmers implement these specifications as
programs.
Actors behind the scene:
-or for design" de'elopment and operation of the DBMS.
Database Designers and implementers:
(hey implement the components and the module of the DBMS.
(ool De'elopers:
(hey de'elop tools which impro'e the performance of the DBMS.
&peration and Maintenance personnel.
Ad'antages of using a DBMS:
Controlling redundancy
7imitations of redundancy in traditional file processing
1. %nconsistency of data
/. Storage space is wasted.
0. 3pdating must be done e'erywhere.
Restricting unauthori.ed access:
A DBMS pro'ide security by means of a Authori.ation and Security
subsystem
,ro'iding persistent storage for program ob)ects and data structures.
-hen the data structures used by the data base and the programming
language are different then it is called as Impedance Mismatch
problem.
,ro'iding inference and actions using rules
,ro'iding multiple user interfaces.
Representing comple+ relationships between data
1nforcing integrity constraints
,ro'iding bacup and reco'ery.
,otential for enforcing standards
Reduced application de'elopment time
8le+ibility
A'ailability of up to date information
1conomies of scale
Limitations:
4igh initial in'estment.
&'erhead for pro'iding security
9enerality that a DBMS pro'ides for defining and processing data
Chapter / Database system concepts and Architecture
Data Models:
%t is a collection of the concepts that can be used to describe the structure of
the database.
Data models describe the structure and also consist of the basic set of the
operations that describe the Dynamic aspect or beha'ior of a database.
Categories of Data Models:
4igh le'el or Conceptual data models:
,ro'ides concepts for the users. (hey use concepts such as
1. 1ntity
Represents a real world ob)ect or concept
/. Attribute
Represents the property of interest of a particular
entity such as employee salary
0. Relationship
Represents the interaction among the entities
1+ample is 1R model.
,hysical Data models:
,ro'ides concepts are meant for specialists. (hey tell how data is
stored in the computer by pro'iding information about records"
access paths.
Access ,ath:
%t is a structure that maes the search for a ,articular database
record efficient.
Representational or %mplementation Data Models:
%ncludes Relational" networ and hierarchical model. (hey represent
data using Record structures. 4ence they are called as Record based
Models.
Schema:
(he description of the database that is pro'ided during the Database design
is called as Database Schema.
Schema Diagram:
Schema diagram represents the schema diagrammatically and each instance
of the schema is called as the Schema Construct. %t pro'ides data such as names
of record types and data items and constraints.
Database state or Snapshot:
(he data in the database at the particular moment of time is called as the
database state or the snapshot. %t is also called as the current set of &ccurrences or
instances in the database.
%ntension and 1+tension:
Database schema is called as the %ntension and the database state is called
as the 1+tension.
Database Architecture:
%n this structure schemas are at three le'els:
%nternal 7e'el:
4as internal schema" which describes the physical storage structure.
3ses a physical model.
Describes about storage structure and the Access paths.
Conceptual 7e'el:
Describes the structure of the whole database for the users.
3ses the high le'el or implementation model.
Describes about entities" attributes and relationships.
1+ternal 7e'el or *iew 7e'el:
Describes the structure of the part of the database for a set of users.
3ses the high le'el or implementation model.
3se e+ternal schema.
Mappings:
(he transformation of the re$uests and results between the le'els is called
as Mappings.
Data %ndependence:
-hen a schema is changed" all the other schemas should not be changed.
7ogical Data %ndependence !change of conceptual should not change
e+ternal schema#.
,hysical Data %ndependence !Change of %nternal should not change
conceptual schema#.
DBMS languages:
DD7:
DD7 is used to create definition of the schemas. (he processing of
the DD7 statements is done by a DD7 Compiler. DD7 is used to
specify only the conceptual schema !CS#
SD7!Storage Definition 7anguage#
SD7 is used to specify the internal schema !%S#. (he mapping
between CS and %S is pro'ided by any of the two languages.
*D7! *iew Definition 7anguage#
Manipulation languages:
5on ,rocedural or high le'el language
,rocedural or 7ow le'el language
o Record at a time
o Set at a time
-hen DM7 commands are embedded in a programming
language" the programming language is called as HOS language and
the DM7 is called as D!! S"#L!$%"!%&.
4igh le'el DM7 in a interacti'e manner is called as
'uer( Language.
DBMS %nterfaces:
Menu based
93%
8orm based
5atural
%nterfaces for parametric users
%nterfaces for the DBA
Database System 1n'ironment:
: Database Components:
Stored data Manager:
; %s used to control the access to the database
information stored on the hard dis.
; 3ses &S ser'ices for carrying low le'el transfers
between the dis and main memory.
DD7 Compiler:
; ,rocesses schema definitions specified in
DD7 and stores the descriptions in the catalog.
Runtime database processor
; handles database accesses at the Run time such as updates
and retrie'als
2uery Compiler
; parses the %nteracti'e $ueries and calls the run time
processor to handle the database accesses.
,re compiler
; 1+tracts the DM7 commands from the program in the
4&S( language
DM7 Compiler
; DM7 Compiler compiles the commands
recei'ed from the pre compiler and con'erts into the
ob)ect code.
: Database System utilities
7oading
,erformance monitors
Bacup
8ile Reorgani.ation
: (ools" Application en'ironments and Communication facilities
Case tools
Application de'elopment en'ironments
Communication software
%nformation repository
Classification of Database Management Systems:
Based on data model
5etwor
4ierarchical
Relational
&b)ect Relational
&b)ect oriented
Based on no of users
Single
Multi user
Based on Centrali.ation
Centrali.ed
Distributed
Chapter 0 1ntity Relationship Model
1R Diagram < 4igh le'el Conceptual Data Model.
Database Design ,rocess:
1 Re$uirement Collection and Analysis 1 Re$uirement Collection and Analysis
8unctional Re$uirements Database Re$uirements
/ 8unctional Analysis / Conceptual Design
4igh le'el transaction specification Conceptual schema
0 7ogical Design
7ogical schema
6 Application program design 6 ,hysical design
(ransaction %mplementation %nternal schema
Application programs
Attributes:
(ypes:
Simple 'ersus composite
Composite: Attributes that can be di'ided into small parts which
ha'e independent meaning eg: Address !street" house no" city etc#
Simple: Attributes those are indi'isible.
Single 'ersus Multi'alued Attributes
Single: Attribute that has only one 'alue eg: age
Multi'alued: Attribute that can ha'e more than one 'alue eg: colours
of a car
Stored 'ersus Deri'ed:
(he attributes that can be deri'ed from related entities are called as
Deri'ed attributes eg: age can be deri'ed from Birth date. -here
bdate is stored one.
5ull 'alues for a attribute can be missing or not nown.
%n Comple+ Attributes notation ! # is used for Composite attributes and
=> for Multi'alued attributes

1ntity (ypes !1+tension#:
1ntity type is the collection of entities that share the same set of attributes.
1ntity set !%ntension#:
(he current sets of entities present in the entity type constitute the 1ntity
set.
?ey Attribute:
(he attribute or set of attributes !composite# whose 'alues are uni$ue for
the set of entities of a entity type is called the ey attribute of the entity type.
1g: social security no is uni$ue for each employee
An entity type can ha'e more than one ey attribute and may not ha'e e'en one
)*ea+ entit( t(pe,
Relationship type:
%t is the set of associations between the 'arious 1ntity types namely 11"
1/@1n etc and is denoted by R.
Relationship Set:
%t is set of relationships between indi'idual entities.
Degree of Relationship type:
%t is the number of participation entity types.
-hen degree A/ relationshipAbinary
degree A0 relationshipAternary
Role 5ame:
Role name signifies the role played by the entity type in the relationship
Recursi'e Relationships:
-hen the same entity type is present more than once in the relationship
playing different roles then it is called as recursi'e relationship.
Constraints:
Constraints are conditions that restrict the possible combinations of the
participating entities in the relationship set.
Cardinality ratio:
%t is the number of relationship instances that an entity can participate in.
,articipation Constraints:
(his states that the e+istence of an entity in a relationship depends on its
being related to another entity.
,articipation can be
(otal participation or 1+istence dependency
,artial
Cardinality ratio B participation constraint A structural constraint
%dentifying or &wner entity type:
-hen a entity identifies the entities present in the other entity type then it is called
as owner entity type and the relationship is ID&$I-.I$% R&L!IO$SHI/
-ea entity always has total participation constraint in the %dentifying
relationship.
Chapter 6 Ad'anced 1R Model and &b)ect Model

You might also like