8, మార్చి 2013, శుక్రవారం

DATABASE MANAGEMENT SYSTEMS/CHAPTER-1




Written by:-  Ramu dayinaboyina   For lecturer reference
Main points only for quick reference taken from c.j.date
A database is simply a computer based record keeping system
It is a system whose overall purpose is to record and maintain the information
This information is concerned with the data that is significant to an organization

The major components that involves in the database system are
v  Data
v  Hardware
v  Software
v  Users

Data: - the data stored in the system is the forms of databases
A database is a repository of stored data
In general it is both     integrated”   and         shared”
The integrated data means that the database may be thought of as a unification of several distinct data files
Shared data means the indidual pieces of data in the database that may be shared among several users
Hardware
It consists of the secondary storage devices such as disks, tapes…etc on which the database is stored
The hardware also includes the devices that are associated above devices
Software it is the layer between the data and the hardware usually called as the database management system (DBMS)
All the requests from the user for access to the database are handled by the DBMS
It provides the interface between data and hardware
Users
The users are broadly classified as
Application programmers
End users
Database administrators (DBA)
The application programmers are responsible for writing programs that use the database, typically in any language (for example COBOL)
The end users are who access the data from the terminal
The end user may use the query language provided by the system
Or
Application programs written by the programmers

The database administrator   Is a person Or A group of persons who has the centralized control over the data?
Operational data
The data in the database referred to as the operational data this does not include the input output and other kinds of data
The data maintained by an enterprise for its operations is called operational data
Now the database can be defined as the collection of stored operational data used by the application of some particular enterprise
Entity:-An entity is a distinguishable object that is to be represented in the database
Relationship: - The associations or linking the basic entities together is called relationship









The same entity may be associated in any number of relation ships
Advantages of database
A database is used to have the centralized control over the operational data in an enterprise
 There is a responsible person having centralized control as the data base who is called database administrator (DBA)
The advantages of maintaining the database with a control on the operational data are
1. Redundancy can be reduced
Redundancy Means   maintaining the data of an item in two areas this leads to the complications and wastage of space
This can be reduced by maintaining a database

2. Inconsistency can be avoided
Inconsistency means a data having 2 entities are not agreeing
A database in an inconsistent state is capable of supplying incorrect and conflicting information this inconsistency can be avoided to the maximum extinct by maintaining the database
3 data can be shared
If the database is manipulated for the enterprise then it can be shared for different applications, new applications can also be developed operating on the same stored data
4. Security restrictions can be applied
Providing security for the data is the most important aspect
If the database is maintained then we have a control on the data so we can ensure that the database is accessed only through proper channel we can also check the unauthorized access to the sensitive data

5. Integrity can be maintained
Integrity means bringing similarities among the entities with the control on the database the entities can be integrated so that the inconsistency and redundancy of data can be avoided

6. Standreds can be enforced to the data stored in the database must maintained in the same standard storing data in different or various formats.
This is particularly describes in interchanging the data between different systems
7. Conflicting requirements can be balanced
The database provides the overall control on the data so the requirements of the data management in the enterprise can be clearly understood and it can be balanced


DATA INDEPENDENCE
“Data dependence means”
               The way in which the data is organized in the secondary storage devices and the way in which it is accessed both are dictated by the requirements of the application
              The knowledge of the data organatision and access technique used in the logic of the application
            So it is impossible to change storage structure and access method without modifying the application
The immunity of an application change in storage structure and access methods are called the data independence
Such application don’t depend on any particular storage structure or devices and access methods strategies
    The data independence is extremely describe for the applications as
  1. Different applications will need different views of same data
For example if the data in a file can be stored in binaries and the data in other file stored in decimals then we can’t interchange the data between them
The DBMS should provide a facility for conversion of the data stored in different formats

  1. The DBA must have the freedom to change the storage structures or access strategy for any requirement without modifying the existing application
If the data is independence then it is possible to change the storage structure, type, access methods, in different applications

Logical independence
Physical independence
DATABASE ARCHITECTURE
                                 The database architecture describes the general database concepts and explains the structure of individual system
The architecture is divided into three general levels
1.       External level
2.       Conceptual level
3.       Internal level








The internal level is the one closet to the physical storage, and it is concerned with the way in which the data is actually stored
The external level is the one closest to the users those concerned with the the way in which the data is viewed by individual users.
The conceptual level is a level of indirection that defines the community user’s view

The 3 levels of an employee record is
External level (COBOL)
01 EMP-REC
      05   EMP-NO    PIC    9(5)
      05   NAME       PIC    A(20)
      05   SALARY   PIC    9(4)
Conceptual level
Employee Record
Employee Number   Numeric (5)
Employee Name                   Char (20)
Salary                                 Name (4)
Internal Level
EMP-REC      length=29 bytes
EMP-NO    Bytes (5)            Offcet-0
NAME       Bytes (20)          Offcet-5
SALARY   Bytes (4)            Offcet-25
The components of database architecture can be explained in detail as follows








HL host language DSL data sub language

The users are either application programmers, end-users even DBAs
Each user has a language (such as COBOL) to access the database
The end users has a query language or a readymade program
Either of these 2 is called DSL (Data Sublanguages)

The DSL is a subset of total language used with the database
The DSL is a part embedded in a Host Language
The DSL is the combination of 2 languages

I.e. DataDefinationLanguage (DDL) and DataManipulationLanguage (DML)
The DDL provides the definition or description of the database object The DDL consists of declarations
The DDL is written outside of the program

the DML consists of executable instructions
The DML supports the manipulations or processing of such objects
The DML is called with statements such as CALL

In some cases, both DDL and DML are included in the same language

The individual user is generally interested only in some portion of the database
He is not concerned with how it is stored but how it is seen  His view is called external view
So an external view is the content of the database as it is seen by some particular user.
The external view consists of multiple occurrences of multiple types of external records.
An external record is not necessarily same as stored record
Each external view is defined by means of an external schema
The external schema consists of definitions of each of the various types of external records in the external view.
The external schema is written using the DDL of DSL
The conceptual view is a representation of the entire information content of the database
It is the abstract of the data stored physically on the devices
The conceptual view consists of multiple occurrences of multiple types of conceptual records.
A conceptual record is not necessacarly the same as either an external record or a stored record
The conceptual schema defines the conceptual view
The conceptual schema contains definitions of various types of conceptual records
The conceptual schema is written using the conceptual DDL

The third level of the architecture is the internal level
The internal view is very low level representation of the entire database
It consists of multiple occurrences of multiple types of internal records.
An internal record is the physically stored records.
The internal schema defines the internal view
This internal schema defines the type, indexing method and physical stored sequence of the internal record
In the database architecture there are 2 levels of mapping
One mapping is between external and conceptual levels and the other mapping is Between conceptual and internal levels

The conceptual /internal mapping defines the correspondence between the conceptual view and the stored database
It specifies how conceptual records map into the corresponding the stored records
The external /conceptual mapping defines the correspondence between a particular external view and the conceptual view
The DBMS is the software that handles all access to the database

The DBMS includes the activities as
1)      A user issues an access request using  a DML
2)      The DBMS interprets these requests
3)      The DBMS inspects the schemas and mappings
4)      The DBMS performs the necessary operations on the stored database

DATABASE ADMINISTRATOR
            The another compartment in the architecture of database system is DBA
The DBA is a person or a group of persons responsible for overall control of the database system
The DBA responsibilities includes the following
1)      Deciding the information content of the database
It is the DBA’s job to decide exactly what information is to be held in the database the DBA must define the content of the database by writing the conceptual schema
2)      Deciding the storage structure and accessing strategy
The DBA must also decide how the data is to be represented in the database and
Must specify the representation by writing the storage structure definitions using a DDL
The associated mapping between the storage structure definition and the conceptual schema must also be specified
3)      Interacting with users
The DBA must interact with the users to ensure that the data …required is available
And to write the necessary external schemas using different external DDL’s
4)      Defining authorizing checks and validation procedures
The authorization checks and validation procedures are considered as logical extensions of conceptual schema
The conceptual DDL should include the facilities for specifying such checks and procedures
5)      Defining a storage for backup and recovery
Damage to any portion of database may be caused due to human error or hardware failure etc   so the DBA must implement the appropriate strategy for backup the database into tapes and has to implement the procedures for reloading (recovering )the relevant portion of the database from the tapes
6)      Monitoring performances and responding to change in requirements
The DBA is responsible for organizing the system to get the best performance
He requires a number of utility programs such as data dictionary
DISTRIBUTED DATABASE
A distributed database is a database that is not stored in its entity at a single physical storage location
But it is spread across a network of computers that are geographically dispersed and connected via communication links
For example
A central bank has its braches at different locations
A branch office may has a record of a customer
This record is stored any of that Brach office
But this can be distributed to other braches as wells to the central office.

The advantage of a distributed network is that a centralized system is provided to the users
The disadvantage is that data transfer depends on communications links
So it is risky and needs a lot of technical expertise


STORAGE STRUCUTRE
The database is stored as a secondary storage device with certain structure and certain access method
The DBMS connects the internal records into external and vice versa
The components responsible for this convention is called the AccessMehtod
The accessmehtod consists of a set of program routine which conceals all the device dependent details fromDBMS and provides a “STORED RECORD INTERFACE”.
The interface permits the DBMS to view the storage structure as a collection of stored files consisting of stored records each consisting of stored fields
The access method is responsible for assembling a unique” stored record address (SRA)”. This value is used to identify a record in the database uniquely.

-----End of the Chapter -------




1 కామెంట్‌:

  1. NICE POST!!! An education provides individuals with the ability to develop their potential to a much greater extent. It improves interaction between people and results in more efficient exchanges. Thanks for sharing a nice information.
    Top MBA Colleges in India
    Best MBA Colleges in India




    రిప్లయితొలగించండి