DBMS Introduction

DBMS Is a collection of programs that enables users to create and maintain databases in a convenient and effective manner. It is a software system that facilitates the following:

1. Defining the database:
This includes defining the structures, data types, constraints, indexes etc. Database catalog/Data dictionary/ called as Meta-data

2. Constructing the database:
This means storing data into the database structures and storing on some storage medium.

3. Manipulating database for various applications:
This encompasses activities like - querying the database, inserting new records into the database, updating some data items, and deleting certain items from the database.

Database and Database Management System

Why DBMS, why not File system???
If we take the example of savings bank enterprise, information about customers and savings accounts etc. need to be stored. One way to keep the information on computers is to store in files provided by operating systems (OS).

Disadvantages of the above System
  • Difficulty in accessing data (possible operations need to be hard- coded in programs)
  • Redundancy leading to inconsistency
  • Inconsistent changes made by concurrent users
  • No recovery on crash
  • The security provided by OS in the form of password is not sufficient
  • Data Integrity is not maintained
Advantages of using DBMS
  • Data independence
  • Efficient data access
  • Data integrity and security
  • Data Administration
  • Concurrent access and Crash recovery
  • Reduced application development time
Disadvantages of DBMS
  • Extra cost due to SW, HW and training.
  • Not suitable or effective for certain applications (Real-time constraints; well-defined limited operations)
  • Data manipulation not supported by Query languages

Data Model

Data Model Is a collection of concepts that can be used to describe the structure of the database. Structure means data types, relationships, constraints etc. DBMS allows a user to define the data to be stored in terms of a data model.
i) high-level data models (ii) low-level data models, (iii) representational or implementation data models

High-level Data Models :
Use set of concepts to describe the database, where the descriptions are close to user views. High-level data models are also known as conceptual models. In conceptual data modeling we use concepts like - entity, attributes, relationship etc.

Low-level Data Models :
give details about how the data is stored in a computers (storage level details).

Representational/Implementation Data Models :
This is in between high-level and low-level data models. Here we represent the concepts described in conceptual model using a specific structures like, networks, objects, tables, trees etc. Ex: Relational Model, NW Model, Hierarchical Model, Object Model, Object relational model etc.

Database Schema

Description of a database is called as database Schema Three-Schema Architecture A database can be described using three different levels of abstractions. Description at each level can be defined by a schema. For each abstraction we focus on one of the specific issues such as user views, concepts, storage etc.

1.External schema :
Used to describe the database at external level. Also described in terms of the data model of that DBMS. This allows data access to be customized at the level of individual users/groups/applications. Any external schema has one or more views and relations from the conceptual schema. This schema design is guided by end user requirements.

2.Conceptual schema (logical schema) :
Describes the stored data in terms of the data model specific to that DBMS. In RDBMS conceptual schema describes all relations that are stored in the database. Arriving at good choice of relations, fields and constraints is known as conceptual database design. 3. Physical schema: Describes the physical storage strategy for the database.