Kerala State Board New Syllabus Plus Two Computer Science Notes Chapter 8 Database Management System.
Kerala Plus Two Computer Science Notes Chapter 8 Database Management System
DBMS means Data Base Management System. It is a fool used to store a large volume of data, retrieve and modify the data as and when required. DBMS consists of data and programs.
Advantages of DBMS
- Data Redundancy
- Inconsistency can be avoided
- Data can be shared
- Standards can be enforced
- Security restrictions can be applied
- Integrity can be maintained
- Efficient data access
- Crash recovery
Structure of DBMS
- Fields – Smallest unit of data. Eg: Name, age, sex, …
- Record – Collection of related fields.
- File- Collection of records
Components of DBMS
a) Databases – It is the main component.
b) Data Definition Language (DDL) It is used to define the structure of a table.
c) Data Manipulation Language (DML) – It is used to add, retrieve, modify and delete records in a database.
d) Users – With the help of programs users interact with the DBMS.
- Abstraction means hiding, it hides certain details of how data is stored and maintained.
Levels of Database Abstraction
- Physical Level (Lowest Level) – It describes how the data is actually stored in the storage medium.
- Logical Level (Next Higher Level) – It de¬scribes what data are stored in the database.
- View Level (Highest level) – It is closest to the users. It is concerned with the way in which the individual users view the data.
It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level.
a) Physical Data Independence – It is the ability to modify the physical scheme without causing application programs to be rewritten.
b) Logical Data Independence – It is the ability to modify the logical scheme without causing ap-plication programs to be rewritten.
Users of Database
- Database Administrator
- Application Programmer
- Naive users
Data models – It is a collection of tools for describ¬ing data, data relationships, data semantics, and consistency problem. 3 models.
- Hierarchical model
- Network model
- Relational model
RDBMS – Relational Data Base Management System. It consists of a collection of relations as a database.
- Relation means table.
- Domain – A pool of possible values from which col¬umn values are drawn.
- Tuple means rows.
- Attributes means columns. ,
- Cardinality – The number of rows.
- Degree -The number of columns
- View- A view is a virtual table derived from one or more base tables.
- Key is used to identify or distinguish a tuple in a relation.
- Candidate key- It is used to uniquely identify the row.
- Primary key – It is a set of one or more attributes used to uniquely identify a row.
- Alternate key -A candidate key other than the primary key.
- Foreign key- A single attribute or a set of attributes, which is a candidate key in another table is called a foreign key.
- Relational Algebra – It consists of a set of operations that takes one or two relations as input and produces a new relationship as a result.
- Select operation (σ)
- Project Operation (π)
- Cartesian Product (-)
- Union Operation (∪)
- Intersection operation (∩)
- Set difference operation (-)