GATE CS - DATABASES (DBMS):Introduction to DBMS

Mastering introduction to dbms concepts and implementation.

Introduction to DBMS

Database Management System (DBMS) is software for managing databases. Understanding DBMS concepts is essential for GATE CS.

What is a Database?

Database is a collection of related data organized for efficient access and management.

Database Management System (DBMS) is software that:

  • Manages database structure
  • Provides data access
  • Ensures data integrity
  • Handles concurrent access
  • Provides security

Database vs File System

FeatureFile SystemDBMS
Data RedundancyHighLow
Data ConsistencyDifficultEasy
Concurrent AccessLimitedSupported
SecurityBasicAdvanced
Data IndependenceLowHigh

Data Models

1. Hierarchical Model

  • Tree structure
  • Parent-child relationships
  • One-to-many relationships

2. Network Model

  • Graph structure
  • Many-to-many relationships
  • More flexible than hierarchical

3. Relational Model

  • Tables (relations)
  • Rows (tuples)
  • Columns (attributes)
  • Most widely used

4. Object-Oriented Model

  • Objects and classes
  • Inheritance
  • Encapsulation

DBMS Architecture

Three-Schema Architecture

  1. External Schema (View Level)
  • User views
  • Multiple views for different users
  • Hides complexity
  1. Conceptual Schema (Logical Level)
  • Database structure
  • Entities, relationships, constraints
  • Database administrator view
  1. Internal Schema (Physical Level)
  • Storage details
  • File organization
  • Indexing

Data Independence

Physical Data Independence:

  • Changes in physical storage don't affect logical schema
  • Example: Changing file organization

Logical Data Independence:

  • Changes in logical schema don't affect external views
  • Example: Adding new table

Database Languages

1. DDL (Data Definition Language)

  • Define database structure
  • CREATE, ALTER, DROP

2. DML (Data Manipulation Language)

  • Manipulate data
  • SELECT, INSERT, UPDATE, DELETE

3. DCL (Data Control Language)

  • Control access
  • GRANT, REVOKE

4. TCL (Transaction Control Language)

  • Control transactions
  • COMMIT, ROLLBACK, SAVEPOINT

GATE CS Weightage

DBMS typically accounts for:

  • 8-12 marks out of 100 in GATE CS
  • Medium priority subject
  • Requires conceptual understanding

Important Topics for GATE CS

  1. ER Model (High Priority)
  • Entity-relationship diagrams
  • Relationships and cardinality
  1. Normalization (High Priority)
  • Normal forms (1NF, 2NF, 3NF, BCNF)
  • Functional dependencies
  1. SQL (High Priority)
  • Queries, joins, subqueries
  • Aggregate functions
  1. Transactions (High Priority)
  • ACID properties
  • Concurrency control
  1. Indexing (Medium Priority)
  • B-trees, hash indexing