0% found this document useful (0 votes)
4 views

Class 12 Computer Science Database Notes

A database is an organized collection of data that allows for easy access, management, and updates, essential for systematic data storage and security. The relational data model organizes data in tables, with key concepts including relations, tuples, attributes, and various types of keys. Important terms include normalization, DBMS, RDBMS, and SQL, which are crucial for managing and interacting with databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Class 12 Computer Science Database Notes

A database is an organized collection of data that allows for easy access, management, and updates, essential for systematic data storage and security. The relational data model organizes data in tables, with key concepts including relations, tuples, attributes, and various types of keys. Important terms include normalization, DBMS, RDBMS, and SQL, which are crucial for managing and interacting with databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Class 12 Computer Science - Database Concepts Notes

Database Concepts

What is a Database?

A database is an organized collection of data that can be easily accessed, managed, and updated.

Example: A school database contains data of students like name, roll number, marks, etc.

Why Do We Need a Database?

- To store data systematically.

- To avoid duplication (no repeated data).

- To ensure data security.

- To easily retrieve or update the data.

- To handle large amounts of data efficiently.

Relational Data Model

A Relational Database stores data in tables (also called relations).

1. Relation (Table)

A relation is a table with rows and columns.

Example:

| Roll_No | Name | Class |

|---------|-------|-------|

| 101 | Aman | 12A |

| 102 | Riya | 12B |

2. Tuple

A tuple is a row in a table. Represents a single record.

Page 1
Class 12 Computer Science - Database Concepts Notes

(101, Aman, 12A) is one tuple.

3. Attribute

An attribute is a column in the table. Represents a field/property.

4. Domain

The domain of an attribute is the set of valid values it can take.

For Roll_No, domain = integers.

5. Degree

Number of attributes (columns) in a relation. In the example, Degree = 3.

6. Cardinality

Number of tuples (rows) in a relation. In the example, Cardinality = 2.

Keys in a Database

a. Candidate Key

A set of minimum attributes that can uniquely identify each row.

A table can have more than one candidate key.

b. Primary Key

One chosen candidate key to uniquely identify each record.

Cannot be NULL or duplicate.

c. Alternate Key

Page 2
Class 12 Computer Science - Database Concepts Notes

The other unused candidate keys (not selected as primary key).

d. Foreign Key

A field in one table that refers to the primary key in another table.

Creates a link between two tables.

Other Important Notes

- Normalization: Organizing data to reduce redundancy.

- DBMS: Software that manages databases (e.g., MySQL, SQLite).

- RDBMS: DBMS that uses the relational model (e.g., MySQL, Oracle).

- SQL: Used to interact with the database.

Page 3

You might also like