Database Concepts Complete Notes
Database Concepts Complete Notes
What is a Database?
Database is a systematic collection of organized data or information typically stored on electronic media in a
computer system. With a database, data can be easily accessed, managed, updated, controlled, and
organized.
Many websites on the World Wide Web widely use database systems to store and manage data (commonly
referred to as backend).
Advantages of Database:
- Minimize Data Redundancy: In traditional file processing systems, the same piece of data may be held in
multiple places, resulting in data redundancy (duplicacy). A database system minimizes redundancy through
data normalization.
- Increased Data Consistency: When multiple copies of the same data do not match with one another, it is
- Data Security: Database allows only authorized users to access data in the database.
- Data Sharing: Database allows its users to share data among themselves.
A DBMS refers to software that is responsible for storing, maintaining, and utilizing a database. Some
examples of popular database software include MySQL, Microsoft Access, Microsoft SQL Server, FileMaker
Data Model:
A data model is the way data is organized in a database. Different types of data models control the
Page 1
Class 12 Computer Science - Database Concepts Notes
The Relational Data Model is widely used by most of the popular Database Management Systems. In this
In the Relational Data Model, data is organized into tables (rows and columns). Tables in a relational model
are called Relations. Each row of a relation represents a relationship between all the values in that row.
Relational Database:
A relational database is a collection of multiple data sets organized as tables. A relational database facilitates
users to organize data in a well-defined relationship between database tables/relations. It uses Structured
Query Language (SQL) to communicate with the database and efficiently maintain data.
Primary Key:
The attribute or the set of attributes that uniquely identifies records in a relation is called the Primary Key of
Page 2
Class 12 Computer Science - Database Concepts Notes
the relation.
Types of Keys:
- Candidate Key: A candidate key is an attribute/set of attributes that uniquely identifies tuples in a relation. A
- Primary Key: A primary key is an attribute/set of attributes that uniquely identifies tuples in a relation. All
values in the primary key must be unique and NOT NULL. Among all candidate keys, the Database
Administrator (DBA) selects one as the primary key. A relation may have multiple candidate keys but ONLY
- Alternate Key: An alternate key is any candidate key that is not used as the primary key of the relation.
- Foreign Key: A foreign key is an attribute of a relation (called the child table) that refers to the primary key of
Page 3