# DBMS/Introduction
## Introduction
### Data

    raw facts and figures

### Data Processing

    performing operations on the input data to generate output.

### Database

    collection of related information about a particular enterprise.

### Database Management System

    collection of interrelated data, set of programs to access the data conveniently and efficiently.

### File System

Typically data is stored in files.
1.) flat files contains one table at a time generally
2.) flat files contains values at each row and separated with a special symbol so to reach the data you have to parse each row and obtaining an array of values and then you can query the data.
3.) to control the data in a file , you have to read it line by line and parse it and because of it they are slow
4.) there is no control mechanism in files
5.) dbms systems commonly has a special language called sql to modify and reach the data easily
6.) dbms systems has indexes to reach the data, not read it line by line
7.) there are much more control mechanisms that approves the correctness of data
8.) you can reach the data across networks by using a dbms system easily and safely

### Need for Database Management Systems

Data access through file systems suffers from the following problems.
* minimal data redundancy
* difficulty in accessing data
* inconsistency
* concurrent access
* data isolation
* integrity
* atomicity
* security
A good database management system solves all the above mentioned problems which a user generally faces in a file system.

### Database Users

Following are the types of database users:
* Database Administrator(DBA) - a database administrator performs the following activity
** Granting user authority to access the database
** Enforcing security and integrity rules
** Strategizing backup & recovery
** enforcing security and integrity rules
* Application programmers
* Data analysts
* Naive users

### Enterprise Application Architecture
#### three tier architecture

    Modern enterprise application architecture consists of the following layers
* application client
* application server
* database system
Present trend in the enterprise architecture is moving towards n-tier architecture in which each of the above three layers is further distributed among multiple systems or layers

### Database Tools

* query tools
* administration tools

### Database Architecture

Following are the different database architecture types:
* Centralized
* Client-server
* Parallel (multi-processor)
* Distributed

### Database abstraction

* physical abstraction
* logical abstraction
* view abstraction
To the design of complex data structure for the representation of data in the database. However since database system are often used by non computer professionals, this complexcity must be hidden from database system users. This is done by defining level of abstract as which the database may be viewed, There are logical view or external, conceptual view and internal view or physical view.

#### External view

This is the highest level of abstraction as seen by a user. This level of abstraction describe only part of entire database.

#### Conceptual view :

This is the next lower level of abstraction which is the sum total of user's views. This level describe what data are actually stored in the database. This level contain information about entire database in term of small number of relatively simple structure.

#### Internal Level :

This is the lowest level of abstraction at which one describe how the data are physically sorted.

### Database Schema

Definition : Overall logical design of data base. Schema contains 'No of records + Type of data + No of attributes'
* External level or Sub schema
* logical schema
* physical schema

### Database Instance

Definition: The term instance is typically used to describe a complete database environment, including the RDBMS software, table structure, stored procedures and other functionality. It is most commonly used when administrators describe multiple instances of the same database.
Definition: The information stored in database at the particular movement is called instance.
Also Known As: environment is the place where the data can be stored in manageable manner.
Examples: An organization with an employees database might have three different instances: production (used to contain live data), pre-production (used to test new functionality prior to release into production) and development (used by database developers to create new functionality).

### Data Model

What is data model:it consists of some concepts to describe the structure of database i.e., data type, relations, and constraints that should hold on the data. E.g. ER model
* XML data Model - semi structured
* relational data model
* object oriented
* object relational
* network
* hierarchy

### Database Languages

* procedural - what data is required and how to get this data
* declarative - what data is required without describing how to get this data
* data control language (DCL)
* data manipulation language (DML)
* data definition language (DDL)
* data storage language