DBMS Notes

 

CHAPTER-1

INTRODUCATION TO DBMS

System

A system is an integration of entities, alternatively designed as components, which have integration among them.

For E.g., consider a particular department in a college (or) university. The entities of the department are students, non-teaching staff, infrastructure etc. These entities interact with another.

          The information system can be either a conventional file processing system (or) database management system.

Explain the Conventional File Processing System:

          In the conventional File Processing System each and every sub system of the information system will have own set of files. As a result there will be a duplication of data between various sub systems.

          The concept of Conventional File Processing System is shown below.


The above system consists of 3 sub-systems namely application-x, application-y and applications.

    It is clearly that some of the files are duplicated in different subsystems of the conventional file processing system. This will intern increase the data redundancy.

Example of Conventional File Processing System:

    Consider the example of a hospital system. The following diagram of the hospital is shown below.

The patients come to the hospital from the society. Upon the arrival of a preliminary registration is done by seeking information about the patient. Then depending on the type and illness, the patient will either be treated as out-patient (or) in-patient. In some cases initially a patient will be treated as out-patient and then the patient will be admitted as outpatient if necessary. Finally the bills are to be paid before the patient is discharged. In this system we are using four files. The files are

Patient File:    At the Registration.

In-patient Treatment File:  at the in-patient section.

Out-patient Treatment File: at the out-patient section.

In Voice File: at the accounts section.

    The files are maintained in different sections of the hospital in a decentralized manner, certain data items (patient no, patient name, patient address) will be duplicated. This will have some undesirable results. Some of the difficulties of the conventional file processing system of the hospital are the following.

1.    There may be a duplication of data in different sections of the hospital which would lead to inconsistency of data.

2.    A lot of paper work and telephone calls would be required to synchronize file structure.

3.    The system cannot provide answer to complex queries.

What are the Drawbacks of Conventional File Processing System ?

A list of drawbacks of the Conventional File Processing System is presented below.

1.    Uncontrolled Redundancy of data.

2.    Inconsistency of data.

3.    Inflexibility

4.    Lack of backup and recovery

5.    Limited data sharing.

6.    Poor enforcement of standards.

7.    Unable to represent Relationships among data.

8.    Excessive program maintenance and low programming productivity.

1.   Uncontrolled Redundancy of data

    Each sub system of an organization maintains own set of files without data sharing, the same data will be available in different files. This will result increased disc space, increased time of data entry and inconsistency of data.

2.   Inconsistency of data

    The uncontrolled redundancy of data will permit the system to have the same data in different files. As a result, a particular data element like patient name will be entered differently in different files. Which is nothing but inconsistency of that particular data element . while performing the basic data operations like updation, deletion, retrieval etc. This inconsistency will give misleading results.

3.   Inflexibility

In the conventional file processing system generally top down approach will be followed in file design. In this approach a set of meaningful entities of the proposed system will be identified along with their attributes to create the files. The actual set of reports which is required for the system will not be considered on this approach. As a result , it may not be possible to meet the requirements of the users fully. Also in the future , if there is a some changes in the user requirements , then the conventional file processing system will not be flexible to provide the results.

4.   Lack of Backup and recovery

    In this conventional file processing system there is no implicit facility for backup and recovery from system failure. It means that when an application program failed in middle of its work on its updating on a file.

5.   Limited data sharing

    In the conventional file processing system the data is stored in a decentralized manner, hence   sharing of the data is complex one.

6.   Poor enforcement of standards

    Since different applications and their respective files were developed by different groups will design data fields, since each group will follow its own standards for fields name, fields width, fields type etc. This will create a serious difficulty while modifying programs and data structures by different groups of users which will leads to low programmer productivity.

7.   Unable to represent relationships among data.

    In the conventional file processing system there is no implicit facility to represent relationship among data in different file for a single system.

8.   Excessive program maintenance & Low program productivity

    Since the different applications are developed differently by different groups in terms of file specifications and program specifications, it will be very difficult to modify the programs and data structure at a later stage by a different group. Many of program variables may be defined differently in different programs. All these difficulties will leads to excessive maintenance.

    Programmer productivity is a measure of time taken to develop an application. If the time taken to develop an application is low then the programmer productivity is high and vice versa.

What is DATABASE?

Ø  Database is a collection of related data (or) files.

Ø  Data means known facts that can be recorded and that have implicit meaning.

For E.g., consider the names, telephone numbers and addresses of the people. We have recorded this data in an address book (or) we may have stored it on a file in the hard disk, using a computer and software such as Microsoft Excel (or) MS Access. This collection of inter related data is a database. Generally a database contains one data file (or) large number of data files. The database is organized in such a way that a application programs will quickly retrieve the required data.

What is Database Management System (DBMS)?

    A database management system (DBMS) is a collection of programs that enables users to create and maintain a database.The DBMS is general-purpose software system that facilitates the defining, constructing, manipulating and sharing database among various users and applications.

Defining a database involves specifying the data types, structures, and constraints for the data to be stored in the database.

Constructing the database is the process of storing the data itself on some storage medium that is controlled by the DBMS.

Manipulating a database includes such functions as querying the database to retrieve specific data, updating the database to reflect changes in the database, and generating reports from the data.

Sharinga database allows multiple users and programs to access the database simultaneously. Other important function provided by the DBMS is unauthorized users cannot access the database.

 

Example of Database Management System

Consider the example of the hospital system which deals in-patients as well as out- patients. The hospital system is shown below.




In the Conventional File Processing System there will be a separate system for in-patients, Out-patient and Accounts. But under the database approach, all the necessary files are included in a single database, which minimizes redundancy of data and facilitates sharing. As a result all the drawbacks of Conventional File Processing System are eliminated in the Database System.

What are the Advantages of Database Management System:

 The Advantages of Database Management System are

1.    Controlled Redundancy of data.

2.    Consistency of data.

3.    Flexibility

4.    Backup and recovery

5.    Enhanced Data sharing.

6.    Better enforcement of standards.

7.    Relationships among data.

8.    Reduced  program maintenance and Increased  programmer productivity.

 

1. Controlled Redundancy of data

The database approach uses a centralized place to save data hence the amount of data redundancy will be minimized. Data redundancy can be minimized by applying normalization process in database design.

2. Consistency of data

The controlled redundancy will minimize the presence of same data in different files. This will lead consistency of data by reducing multiple inserts and updates on same data at different places.

3. Flexibility

          In database approach , the database design based on bottom up approach. In this approach all the reports that are currently used and various expected reports are taken into design the database. When some changes in report requirements occurs revision of database can be done with minor changes in the database.

4. Backup and Recovery

          In DBMS if a transaction fails in middle of its execution due to system failure then DBMS will get back the data into its consistent state as before.

5. Enhanced Data Sharing

In database approach uses centralized database hence same data can be shared by different applications or users simultaneously with concurrency control. In DBMS multiple users will access same data and can do changes.

6. Better enforcement of standards

          Since different files of the database are design at a time of a different subsystems, it will be better enforcement of standards in terms of defining field name, field width , field type etc.,

7. Relationships among data

          We can apply relationships among data to improve performance of applications and consistency (correctness) of data. For example foreign key constraint makes a relationship between Employee and Department information.

8. Reduced program maintenance and increase of programming productivity.

          Different applications are developed under the coordination of the database administrator. As a result, there will be a integrated effort among the different group in terms of file design and program design. This will reduce the program maintenance.    

Programmer productivity is measure of time taken to develop an applications. In database approach , data is separated from programs. There are many fourth generation languages available to access and manipulate the database.

Because of advanced capabilities of fourth generation languages , the time taken to develop an application will be less when compared to the time taken to develop using conventional file processing system.

What are the Application of DBMS ?

         The application of database is:

1.  Banking: For customer information, accounts, loans, Bank transactions.

2.  Airlines: For reservations and scheduled information.

3.  Universities: For student information, course registration and grading.

4.  Telecommunication: For keeping records of call mode, generating monthly bills,                  

     maintaining balances on pre-paid cards and storing information about the communication 

    Network.

What are the Disadvantages of DBMS ?

        The following are the disadvantages of using DBMS.

1.    Increased complexity.

2.    Requirement of new and specialized manpower.

3.    Large size of DBMS.

4.    Increased installation and maintenance cast.

5.    Conversion cost.

1.   Increased complexity

A multi user DBMS becomes an complex piece of software due to expected functionalities from it. It becomes necessary for database designers, developers, database administrator and end users to understand these functionalities. Failure to understand that can lead to bad designed decisions.

2.   Requirement of new and specialized manpower

Because of rapid in database technology and organizations, business need to trained manpower on regular basis to design and implement of database administrative services and manage a staff of new people, therefore an organization needs to maintain specialized skill person.

3.   Large size of DBMS  

The DBMS occupies many Giga Bytes of storage space and requires more amount of main memory to run efficiently.

4.   Increased installation and maintenance cost

The DBMS software has a high initial cost. It requires trained person to install and operate. and also has more annual maintenance. Installing such software’s also requires upgrades to the hardware and software.

5.   Conversion cost

The conversion cost from old database technology to modern database environment is high.

Explain the DBMS Architecture 

1.      The main aim of database system is to provide an abstract view of data hiding of certain detail of how data is stored. And manipulated, to satisfy these needs to develop architecture for database system.

2.      In early days the whole DBMS package was a single package where as modern DBMS is based on client-server architecture.

3.      Under the client-server architecture the database is not present in the client machine. But the client machine connected to the database system through Network and server.

4.      There are two types of DBMS architecture as shown below.



In two-tier architecture, the application is a component that resides on the client machines that communicate server machine through query language statements.

In three-tier architecture, the client machine cannot directly communicate with an application server, the application server communicates with a database to access data. Three tier architectures are more suitable for large applications.

Explain the Database Architecture

        A database Architecture is shown below depending upon the three tier architecture. It contains of 3 levels.


Internal level

       The internal schema defines the internal level. The internal level is the lowest level of data abstraction. This level indicates how the data will be stored into the database and describes the file structures and data structures and methods to be used by the data base.

 

Conceptual level

The conceptual schema defines the conceptual level. The conceptual level in the middle level abstraction. This level indicates entities, attributes, relationship between entities and attributes.

External level

External schema defines the external level. The external level is the highest level of data abstraction. This level describes part of database. i.e., relevant to the user.

What are the Functions or services of DBMS ?

The functions and services of DBMS are

1.       Data storage Management

DBMS creates the structure for database in the physical storage devices. It provides a mechanism for permanent storage of dat.

2.       Data Manipulation Management

     The DBMS provides ability to add new data into the database (or) retrieve, update and delete existing data in the database.

3.       Data Definition Management

The DBMS creates the structure of data in which the data is stored.

4.       Data dictionary

The DBMS provides a data dictionary in which stores the description of data items.

5.       Authorization

     The DBMS protects the database against unauthorized access either intentional (or) accidental.

6.       Backup and recovery

     The DBMS provides a mechanism for Backup data periodically and recovery from different types of failures.

7.       Concurrency control  

The DBMS supports sharing of data among multiple users. The DBMS provides a mechanism for concurrent access to the database.

8.       Transaction Management

The transaction in a series of database operations, which access (or) changes the content of the database. This is done by the transaction management.

9.       Data Independency Service

The DBMS supports the independency of the programs from its structure of the database.

10.      Integrity Service

The DBMS provides integrity service to store the data into the database (or) to change the data into the database follows certain rules.

 

What are the Functions database Administrator ?

         Database administrator is an individual person with an overview of one (or) more databases and also controls the design and use of database.

           Functions and responsibilities of DBA are

1.     Defining conceptual schema and database creation

The DBA creates the conceptual schema such as defining entities and attributes, deleting entities and attributes and modifying entities and attributes etc. The DBA also creates the structure of the database.

2.     storage structure and access method definition

The DBA defines the storage structure of the data. And access methods of the database.

3.     Granting authorization to the user

The DBA grants the access to use the database to its users. The authorization information is kept is a system, the database system consults whenever someone attempt to access the data in the system.

4.     Routine maintenance

The DBA maintains periodically backups of the database either on hard disc (or) CD to prevent loss of data in case of failure.

 

5.     Job monitoring

The DBA is responsible for the performance of data is not decreased.

What are the various components of Database Systems  ?

       The database system is composed of the five major components.

1.        Hardware

2.        Software

3.        People

4.        Producers

5.        Data


1.       Hardware: Hardware refers to physical components of the system.

      E.g. storage devices, printers etc.

2.       Software: software is a set of programs. To make database system function fully, three types of software’s are needed. They are

      a.  Operating System Software

      b.   DBMS software.

      c.   Application Programs and utility software.

       a. Operating system software:  operating system manages all hardware components and run other software’s on the computer.

      E.g. WINDOWS, LINUX

      b. DBMS Software:   manages the database within the database system.

      E.g.   Oracle, SQL, MS Access

      C. Application programs and utility software:  Application programs are used to access and manipulate data to generate reports and making decisions.

Utilities are the software tools used to help, manage the database systems computer components.

3.       People: There are five types of users in the database system.

a.       System Administrator: to see the database systems general operation.

b.       Database Administrator: see the database is functionality properly.

c.        Database designers: design the database structure.

d.       System analyst and programmers: Design and implement the application programs.

e.       End user: use the application programs to run the organization daily operations.

4.       Procedures:  procedures are the set of rules based on design and use the database.

5.       Data:  The data is a facts stored in the database. Because data are the raw material from which the information is generated.

 

What is Data?

           A system consists of interrelated entities, each entity has a set of attributes of entities of the system.

What is Information ?

           Information is nothing but processed data.

Define Meta data

           Meta data is the data about the data i.e., information for accessing the data.

Explain the Terminology of a file

Field: A field is the lowest level of data item of an entity which is alternatively called as an attribute of that entity.

        Emp               Empno        Empname         Empaddress

Record: Record is the collection of fields (or) attributes of an entity.

                               Empno        Empname         Empaddress

                                   1               sweaty              banglore          

File: File is a collection of records having same set of fields arranged in the same sequence.

                               Empno        Empname           Empaddress

                                    1             manimala             Chennai

                                    2                priya                Hyderabad

Key field (or) Primary key: A key field is said to be key field (Or) primary key if it can identify a record uniquely in a file.

 

e.g.         student no in student file

               emp no in emp file.

Non key field (or) secondary key: A field is said to be Non key field (or) secondary key if it cannot identify a record uniquely in a file.

e.g.           student name in student file.

                 Emp name in emp file.

Schema: it is a overall view of all the files in the database.

Subschema: A portion of the schema of a database is called as subschema.










Comments

Popular posts from this blog

Chapter-2