Overview
This chapter introduces the basic concepts of Database Management System (DBMS) as presented in the CBSE Class 9 Information Technology (Code 402) textbook. It begins by defining a database and a DBMS, explains why databases are needed, and compares DBMS with traditional file-based systems. The chapter highlights real-world uses (schools, libraries, banks, inventory) and the advantages of DBMS such as reduced redundancy, improved data integrity, faster retrieval and secure storage. Key themes include the relational model (tables, rows/records, columns/fields), primary and foreign keys, common data types, basic constraints, and an introduction to basic SQL operations (SELECT, INSERT, UPDATE, DELETE). Students learn practical skills: creating tables, defining fields and data types, entering and modifying records, designing simple queries, sorting and filtering data, and generating basic forms and reports using a DBMS software (for example MS Access or an equivalent). The chapter also touches on basic concepts of data validation, backups and simple security measures, and gives an introduction to normalization (avoiding redundancy) at a conceptual level. By the end, learners will be…
Learning Objectives
- Define database, DBMS, table, field, record, primary key and foreign key.
- Explain the purpose and advantages of a DBMS compared to a file-based system.
- Describe types of databases with emphasis on relational databases.
- Differentiate between data and information and between schema and instance.
- Identify components and functions of a DBMS, including query processor and storage manager.
- Create a database and tables using a DBMS (e.g., MS Access or MySQL) following given requirements.
- Apply appropriate data types and field properties while designing table structures.
- Construct and modify table structures using design tools or SQL (CREATE, ALTER statements).
Topics in this chapter
20 topics · tap a topic title to jump straight to it.
Introduction to Database
Introduction to Database
Key Point: TotalStorage ≈ number_of_records × average_record_size (useful to estimate disk space)
What is a Database?
A database is an organized collection of related data stored so that it can be easily accessed, managed and updated. Instead of keeping data in unstructured files, a database stores data in a structured way (usually in tables) so users and applications can retrieve and manipulate it efficiently.
What is a DBMS?
A Database Management System (DBMS) is software that creates, manages and provides controlled access to databases. It handles data storage, querying, updating, security, backup and concurrency. Examples of DBMSs include MySQL, PostgreSQL, Microsoft Access and SQLite.
Basic Components & Terms
- Table: A collection of related records (rows) organized in columns (fields).
- Field (Attribute): A column in a table that stores a single type of information (e.g., StudentName, RollNo).
- Record (Tuple): A single row in a table that contains data for all fields for one item (e.g., one student).
- Primary Key: A field (or set of fields) that uniquely identifies each record in a table (e.g., RollNo).
- Query: A request to retrieve or modify data (SELECT, INSERT, UPDATE, DELETE).
- Form: A user-friendly interface to enter or view data.
- Report: A formatted output of data for printing or review.
Why use a Database instead of Files?
- Reduced data redundancy: Same data is stored only once.
- Data integrity: Rules and constraints (like primary keys) keep data correct.
- Concurrent access: Multiple users can use data simultaneously without conflicts.
- Security: DBMS controls who can see or change data.
- Easy querying & reporting: Powerful queries give useful information quickly.
How DBMS works (overview)
Users or applications send queries/requests to the DBMS. The DBMS parses and optimizes these queries, accesses the stored data from disk or memory, applies any constraints, and returns results. The DBMS also logs changes, enforces security, and manages backups.
Simple Example Structure (Relational)
School Database may have tables: Students(StudentID, Name, DOB, Class), Teachers(TeacherID, Name, Subject), Classes(ClassID, ClassName). Relationships link tables: Student.Class -> Classes.ClassID.
Good practices
- Choose meaningful primary keys.
- Keep fields atomic (one piece of data per field).
- Normalize to reduce redundancy (split data into related tables).
- Regularly backup the database.
- School management: A Students table stores RollNo, Name, DOB, Class; teachers, attendance and exam marks are stored in related tables to generate report cards and attendance reports.
- Library system: Books table (BookID, Title, Author), Members table (MemberID, Name), and IssuedBooks table (IssueID, BookID, MemberID, IssueDate, ReturnDate) to track loans and late returns.
- Banking: Accounts table (AccountNo, Name, Balance), Transactions table (TxnID, AccountNo, Date, Amount) to view balance, deposits, withdrawals and statements.
- E-commerce: Products, Customers, Orders and OrderDetails tables to manage product listings, customer information and order histories.
- Hospital: Patients, Doctors, Appointments and Prescriptions tables to schedule visits and maintain medical records.
- \[TotalStorage ≈ number_of_records × average_record_size (useful to estimate disk space)\]
- \[average_record_size = sum(field_size_i for each field i) (in bytes)\]
- \[percentage_matching_records = (matching_records / total_records) × 100\]
Database Management System (DBMS)
Database Management System (DBMS)
Key Point: Record size (bytes) = Sum of sizes of all fields in the record (e.g., ID 4 + Name 30 + DOB 8 = 42 bytes).
Definition: A Database Management System (DBMS) is software that stores, manages and retrieves data in an organized way. It provides efficient, secure, and concurrent access to data for multiple users and applications.
Main components:
- Database: Collection of related data stored in tables (or other structures).
- DBMS software: The program that manages the database (e.g., MySQL, PostgreSQL, SQLite).
- Users: End users, application programs, and database administrators (DBAs).
Key concepts:
- Table (Relation): Structure made of rows (records) and columns (fields/attributes).
- Record (Tuple): One row in a table representing an entity instance.
- Field (Attribute): One column in a table representing a property.
- Primary Key: A unique identifier for each record in a table.
- Foreign Key: An attribute that creates a link between two tables.
- Query: A request to read or modify data (often using SQL).
Major functions of a DBMS:
- Data storage and retrieval
- Data manipulation (INSERT, UPDATE, DELETE)
- Query support (SELECT)
- Data integrity and constraints (e.g., uniqueness, referential integrity)
- Security and access control
- Transaction management (ACID properties)
- Backup and recovery
Types of DBMS (basic overview): Hierarchical, Network, Relational (most common for school-level studies), Object-oriented.
Why DBMS is better than simple file systems:
- Reduces data redundancy
- Ensures data consistency and integrity
- Supports multiple users concurrently
- Provides secure access control and easy querying
ACID (brief): Properties that ensure reliable transaction processing — Atomicity, Consistency, Isolation, Durability.
Normalization (introductory): Process to organize fields and tables to reduce redundancy. 1NF (First Normal Form) requires that each field contains only atomic (single) values and each record is unique.
Simple SQL examples:
- SELECT:
SELECT Name, Class FROM Students WHERE Class = '9'; - INSERT:
INSERT INTO Students (ID, Name, Class) VALUES (101, 'Aisha', '9'); - UPDATE:
UPDATE Students SET Class = '10' WHERE ID = 101; - DELETE:
DELETE FROM Students WHERE ID = 101;
Typical classroom example (summary): A school database might have tables: Students (StudentID, Name, Class, DOB), Teachers (TeacherID, Name, Subject), Classes (ClassID, ClassName, TeacherID). StudentID is primary key in Students; TeacherID in Teachers; TeacherID can be a foreign key in Classes.
- School management: Students table, Teachers table, and Attendance; lets staff search student records, create reports and manage grades.
- Library system: Books, Members, and Loans tables; tracks which member has borrowed which book and due dates.
- Hospital records: Patients, Doctors, Appointments and Treatments; stores patient history, prescriptions and billing.
- Banking: Accounts, Customers, Transactions; manages deposits, withdrawals, and account balances with transaction safety.
- E-commerce: Products, Orders, Customers, OrderItems; supports product catalog, shopping cart and order history.
- \[Record size (bytes) = Sum of sizes of all fields in the record (e.g.\]\[ID 4 + Name 30 + DOB 8 = 42 bytes).\]
- \[Records per block/page = Floor(Block size / Record size).\]
- \[Number of blocks/pages needed = Ceil(Total records / Records per block).\]
- \[Basic SQL 'formulas' (common commands): SELECT columns FROM table WHERE condition\]\[INSERT INTO table (cols) VALUES (vals)\]\[UPDATE table SET col = val WHERE condition\]\[DELETE FROM table WHERE condition.\]
Advantages of DBMS
Advantages of DBMS
Key Point: Data Redundancy (%) = (Number of Redundant Data Items / Total Data Items) * 100
A Database Management System (DBMS) is software that stores, manages and provides controlled access to data. Using a DBMS brings many advantages over traditional file-based storage systems. Below are the main advantages with short explanations:
- Reduced Data Redundancy: DBMS centralizes data, so duplicate copies are minimized. This saves storage and reduces inconsistencies.
- Improved Data Consistency: Because one copy of each data item is maintained, updates are reflected everywhere, keeping records consistent.
- Data Integrity: DBMS enforces rules (constraints) such as primary keys, foreign keys and validation to ensure accuracy and correctness of data.
- Data Security: Access control, authentication and authorization features restrict who can view or modify data, protecting sensitive information.
- Concurrent Access & Transaction Management: Multiple users can access and modify the database simultaneously while DBMS ensures transactions are atomic, consistent, isolated and durable (ACID properties).
- Backup and Recovery: DBMS provides automated backup and recovery mechanisms to restore data after failure or accidental deletion.
- Centralized Management: Administration is easier because the DBMS provides tools for monitoring, tuning, and managing data centrally.
- Faster Query Processing & Efficient Data Retrieval: Optimized query engines and indexes allow quick searching, sorting and reporting of data.
- Data Independence: Application programs are separated from data storage details. Changes in storage structures need minimal or no changes in application code.
- Data Sharing: Authorized users and applications can share the same data, supporting collaboration and integrated workflows.
These advantages lead to more reliable, secure and maintainable information systems in real-life settings such as banks, hospitals, schools and e-commerce platforms.
- School management system: A single DBMS stores student records, exam marks, attendance and fees so teachers, admin staff and the principal can access consistent data without duplication.
- Banking: Customer accounts, transactions and loan records are centrally stored; concurrent access is handled safely, preventing inconsistent balances.
- Hospital: Patient records, lab results and prescriptions are kept centrally with role-based access so doctors, nurses and pharmacists see correct and authorized information.
- Online retail store: Product inventory, orders and customer data are managed in a DBMS to prevent overselling and to support fast searches and recommendations.
- University admissions: Applicant data, entrance scores and seat allocation are kept in a DBMS to run fair, consistent selection and reporting processes.
- \[Data Redundancy (%) = (Number of Redundant Data Items / Total Data Items) * 100\]
- \[Consistency Rate (%) = (Number of Consistent Records / Total Records) * 100\]
- \[Storage Savings (%) = ((Storage_before_DBMS - Storage_with_DBMS) / Storage_before_DBMS) * 100\]
- \[Response Time (approx) = Query Processing Time + I/O Time + Network Time\]
- \[Throughput (transactions/sec) = Total Transactions Processed / Total Time (seconds)\]
Components of DBMS
Components of DBMS
Key Point: File size (bytes) = number_of_records × size_per_record (bytes). Useful to estimate storage needs.
What is a DBMS? A Database Management System (DBMS) is software that allows users to store, manage, retrieve and manipulate data in a structured way. To do this effectively, a DBMS is built from several interacting components.
Main components of a DBMS
- Hardware: The physical devices used to run the DBMS — servers, disks, network devices and client machines. Hardware provides storage, memory and processing power required by the DBMS.
- Software (DBMS engine): The core DBMS program that handles data storage, query processing and transaction management. Internally it includes modules such as the query processor (parses and executes queries), storage manager (reads/writes data from/to disk), transaction manager (ensures atomicity and consistency), recovery manager (handles backups and crash recovery) and security manager (controls access).
- Data: The actual facts stored in the database — tables, records (rows), fields (columns), indexes and metadata. Data is organized according to a schema (structure) defined by the database design.
- Database Access Language: A language used to create, read, update and delete data. SQL (Structured Query Language) is the standard language in most relational DBMSs. Example commands: SELECT, INSERT, UPDATE, DELETE.
- Procedures (Rules & Guidelines): The written instructions, policies and procedures for using the DBMS — backup policies, user roles, how to run queries, data-entry standards and maintenance routines. These ensure consistent and safe use of the database.
- Users: People who interact with the DBMS. Typical users include:
- Database Administrator (DBA): Responsible for installation, configuration, security, backup and recovery.
- Application Programmers: Write programs that use the database.
- End Users: Use applications or queries to view and update data (casual users, power users, and naive users such as data-entry operators).
- Data Dictionary / Metadata: A repository that stores definitions of database objects (tables, columns, data types, constraints). It helps the DBMS and users understand the structure and rules of the data.
How these components work together — simple flow: A user issues an SQL query (Database Access Language) through an application. The query processor interprets the query, the storage manager reads the needed data from hardware, the transaction manager ensures consistency, and the result is returned to the user. Policies and the DBA govern who can do what and how backups are performed.
Why components matter: Understanding components helps you know where problems can occur (e.g., slow hardware, wrong queries, poor indexing, incorrect procedures) and how to improve system performance, reliability and security.
- School student database: Hardware = school server, Data = student tables (name, roll no, grades), Software = DBMS (MySQL/Oracle), Users = teachers and admin, Language = SQL.
- Library management system: Data = books table, members table; DBMS handles checking-in/checking-out, search queries and maintains fines using transaction management.
- Banking system: DBMS ensures ACID transactions for deposits/withdrawals, recovery manager restores data after failures, security manager enforces access control for tellers and managers.
- Online shopping site: Product catalog and customer orders stored in DB; query processor serves search requests; indexes speed up product lookups.
- \[File size (bytes) = number_of_records × size_per_record (bytes)\]\[Useful to estimate storage needs.\]
- \[Address of fixed-length record: record_address = base_address + (record_number - 1) × record_length. (Used in simple file-based storage calculations.)\]
- \[Average access time ≈ seek_time + transfer_time. (Useful when estimating disk read performance: seek_time is head movement\]\[transfer_time ~ data_size / disk_rate.)\]
- \[Basic throughput (transactions/sec) = total_transactions / total_time. (Used to measure DBMS performance under load.)\]
Database Models (Overview)
Database Models (Overview)
Key Point: Total data cells in a table = number_of_rows × number_of_columns
What is a database model? A database model defines the logical structure of a database: how data is organised, stored and interrelated. It provides rules and conventions for representing real-world entities and relationships so that data can be stored, retrieved and manipulated efficiently.
Why models matter (Class 9 view): A model determines how easy it is to add, query and maintain data. Different models suit different kinds of applications — e.g., hierarchical data, relationships between many entities, or flexible documents.
Major database models (overview)
- Hierarchical model: Data is organised in a tree-like structure (parent-child). Each child has one parent. Good when relationships are fixed and one-to-many (e.g., company departments & employees).
- Network model: Similar to hierarchical but a child can have multiple parents — a graph-like structure. Useful for many-to-many relationships (e.g., airline routes connecting many cities).
- Relational model: Data is stored in tables (relations) with rows (tuples) and columns (attributes). Relationships are represented using keys (primary and foreign keys). This is the most common model for general-purpose applications (e.g., school databases, banking).
- Object-oriented model: Data is stored as objects (like in object programming), combining data and methods. Useful when application logic and data are closely linked (e.g., CAD systems, simulations).
- Document (NoSQL) model: Data stored as documents (e.g., JSON or XML). Flexible schema, good for web apps and content management (e.g., product catalogs, user profiles).
- Key-Value model: Simple pairs of key and value. Very fast for lookup by key (e.g., session stores, caching).
- Graph model: Data represented as nodes and edges, optimised for relationships and traversals (e.g., social networks, recommendation engines).
Key concepts common to models
- Entity: Thing about which data is stored (student, book, product).
- Attribute: Property of an entity (name, roll no, price).
- Primary key: Unique identifier for a record in a table.
- Foreign key: Attribute that creates a link between two tables.
- Cardinality: Describes relationship types — One-to-One, One-to-Many, Many-to-Many.
When to use which model?
- Hierarchical: simple, fixed parent-child relationships (legacy systems).
- Network: complex many-to-many relations where pointers help performance.
- Relational: general-purpose; ACID properties and structured queries (SQL).
- Document / Key-Value: flexible schema, scalable web apps.
- Graph: applications with heavy relationship queries (shortest path, friends-of-friends).
Summary: Choose the model based on data structure, relationship complexity, performance needs and scalability. For most school-level systems (library, student records, billing) the relational model is preferred for clarity and simplicity.
- Library system (Relational): Tables for Books, Members, Loans. Primary key BookID links to Loan records with MemberID as foreign key.
- Company org chart (Hierarchical): CEO -> Managers -> Employees where each employee has one immediate manager (parent).
- Social network (Graph): Users are nodes; friendships and follows are edges. Find friends-of-friends or shortest connection paths.
- E-commerce product info (Document): Each product stored as a JSON document with flexible fields (sizes, colors, reviews).
- Cache or session store (Key-Value): SessionID => session-data for fast retrieval.
- \[Total data cells in a table = number_of_rows × number_of_columns\]
- \[File size (approx) = number_of_records × average_record_size\]
- \[Average_record_size = sum_of_field_sizes (for all attributes in a record)\]
- \[Degree of a relationship = number of entity types participating (e.g.\]\[binary = 2\]\[ternary = 3)\]
Relation / Table
Relation / Table
Key Point: Relation as set: R ⊆ D1 × D2 × ... × Dn (each tuple is an n‑tuple from domains D1..Dn).
Definition: In a relational database a relation (commonly called a table) is a collection of tuples (rows) having the same attributes (columns). Formally, a relation R of degree n is a subset of the Cartesian product of n domains: R ⊂ D1 × D2 × ... × Dn.
Components:
- Attributes (columns): Named properties of the relation; each attribute has a domain (data type/allowed values).
- Tuples (rows): One record in the table; each tuple contains one atomic value per attribute.
- Heading: The list of attribute names.
- Body: The set of tuples (data rows).
Important properties / rules:
- Each attribute value is atomic (no repeating groups or nested relations).
- All tuples in a relation have the same attributes (same heading).
- Ordering of tuples (rows) is not significant; ordering of attributes (columns) is not significant for the meaning of the relation.
- No duplicate tuples — each row must be unique.
- Null values may appear to indicate missing/unknown information (but their use has semantic and integrity implications).
- Key constraint: One or more attributes that uniquely identify each tuple (primary key).
Common terms:
- Degree: Number of attributes (columns) in the relation.
- Cardinality: Number of tuples (rows) in the relation.
Example table (Student):
| RollNo | Name | Class | Marks |
|---|---|---|---|
| 101 | Asha | 9 | 86 |
| 102 | Rahul | 9 | 78 |
| 103 | Meera | 9 | 92 |
In this example: heading = {RollNo, Name, Class, Marks}; degree = 4; cardinality = 3; primary key = RollNo.
- School student table: attributes (RollNo, Name, Class, DOB, Marks). RollNo uniquely identifies each student.
- Library books table: (BookID, Title, Author, Year, Copies). BookID is primary key; Copies shows number of available copies.
- Bank accounts table: (AccountNo, HolderName, AccountType, Balance). AccountNo uniquely identifies account holders.
- Employee table in company: (EmpID, Name, Dept, Salary, JoinDate). EmpID is unique; Dept can be used to link to a Department table.
- Exam results table: (StudentID, SubjectCode, Term, Score). Combination (StudentID, SubjectCode, Term) can be a composite key.
- \[Relation as set: R ⊆ D1 × D2 × ... × Dn (each tuple is an n‑tuple from domains D1..Dn).\]
- \[Degree (n) = number of attributes (columns) in the relation.\]
- \[Cardinality |R| = number of tuples (rows) in the relation.\]
- \[Uniqueness (primary key) rule: ∀ t1,t2 ∈ R\]\[if t1[key] = t2[key] then t1 = t2.\]
- \[Composite key: key = (A1\]\[A2, ...\]\[Ak) such that values of these attributes uniquely identify tuples.\]
Attributes / Fields / Columns
Attributes / Fields / Columns
Key Point: Degree of a relation (number of attributes): degree(R) = n (if R has n attributes).
Definition: An attribute (also called a field or a column) is a named property or characteristic of an entity in a database. In a table (relation) each attribute defines one column and stores a particular kind of information for every record (row).
Key points:
- Synonyms: attribute = field = column.
- Domain: each attribute has a domain (the set of allowed values), e.g., integers, text, date.
- Data type: defines storage and operations (e.g., INT, VARCHAR, DATE).
- Atomicity: attributes should be atomic (store one value per cell). For example, store "FirstName" and "LastName" separately instead of "FullName" if you need to search/sort by parts.
- Null values: an attribute may allow NULL to represent unknown or not-applicable data.
- Keys and constraints: one or more attributes can be designated as a primary key (unique identifier). Attributes can also have constraints like UNIQUE, NOT NULL, CHECK.
- Types of attributes: simple (single-valued), composite (made of sub-parts, e.g., Address → Street, City), derived (computed from other attributes, e.g., Age from DateOfBirth).
Why attributes matter: Attributes define the structure of stored data, control what can be entered, and enable queries, sorting, grouping and relationships between tables.
Short example in table form:
| StudentID | FirstName | LastName | DateOfBirth | Gender |
|---|---|---|---|---|
| STU001 | Asha | Patel | 2008-05-14 | F |
Here StudentID, FirstName, LastName, DateOfBirth and Gender are attributes/columns. StudentID can be a primary key (unique) and DateOfBirth can be used to derive Age.
- School Student table: attributes — StudentID (VARCHAR), FirstName (TEXT), LastName (TEXT), Class (INT), Section (CHAR), DOB (DATE).
- Library Book table: attributes — BookID, Title, Author, ISBN, PublishedYear, Genre, CopiesAvailable.
- Employee table: attributes — EmpID (PK), Name, Department, Salary, DateOfJoining. Salary is numeric; Department could be constrained to a fixed set of values.
- Online store Orders: attributes — OrderID, CustomerID, OrderDate, TotalAmount, PaymentStatus. TotalAmount might be derived as SUM(quantity * unit_price).
- \[Degree of a relation (number of attributes): degree(R) = n (if R has n attributes).\]
- \[Cardinality of a relation (number of tuples): cardinality(R) = |R| = m (if R has m records).\]
- \[Size of one record (approx.): record_size = Σ size(attribute_i) for i=1..n.\]
- \[Table storage size (approx.): table_size ≈ record_size × cardinality(R).\]
- \[Derived attribute example: Age = CURRENT_DATE − DateOfBirth (computed\]\[not stored unless needed).\]
Tuples / Records / Rows
Tuples / Records / Rows
Key Point: Degree (arity) = m = number of attributes (columns) in the relation.
Definition: In a database table (relation), a tuple (also called a record or row) is one complete set of related data values. Each tuple holds values for every attribute (column) of the table that describe one real‑world entity or instance.
Structure and terms:
- Attribute (column): A named field in the table (e.g., StudentID, Name, Class).
- Tuple / Record / Row: A horizontal entry that provides values for all attributes (e.g., StudentID=101, Name=Anita, Class=9).
- Degree (arity): Number of attributes (columns) in the relation.
- Cardinality: Number of tuples (rows) in the relation.
- Primary key: An attribute or set of attributes that uniquely identifies each tuple (no two tuples can have the same primary key value).
- NULL: A special value meaning data is missing or not applicable for that attribute in the tuple.
Important properties:
- Order of tuples does not matter: a relation is a set of tuples, so rows have no inherent order.
- Each tuple contains one value per attribute (or NULL).
- Tuples must satisfy integrity rules like uniqueness of primary key and correct data types for attributes.
How tuples are used (operations): You can insert a new tuple, delete an existing tuple, or update values inside a tuple. Queries (like SELECT) pick out tuples that meet conditions (selection) or return specific attributes of tuples (projection).
Simple example (Student table):
| StudentID | Name | Class | Age |
|---|---|---|---|
| 101 | Anita | 9A | 14 |
| 102 | Ravi | 9B | 15 |
| 103 | Sana | 9A | 14 |
Each horizontal line above is a tuple (record/row). StudentID can be the primary key because it uniquely identifies each tuple.
- School database: each student is a tuple (StudentID, Name, Class, DOB). Example tuple: (101, 'Anita', '9A', '2009-03-10').
- Library system: a book record (BookID, Title, Author, Available) is a tuple. Example: (B205, 'Treasure Island', 'R. L. Stevenson', 'Yes').
- Bank account: each account is a tuple (AccountNo, HolderName, Balance, Branch). Example: (SB001234, 'Ramesh Kumar', 12500.50, 'Main Branch').
- Product inventory: a product tuple (ProductID, Name, Qty, Price). Example: (P100, 'Notebook', 250, 20.00).
- \[Degree (arity) = m = number of attributes (columns) in the relation.\]
- \[Cardinality = n = number of tuples (rows) in the relation.\]
- \[Relation size (rough) = n * record_size\]\[where record_size = sum(size of each attribute) + storage overhead.\]
- \[Uniqueness constraint for primary key PK: for any two tuples t_i and t_j\]\[if i ≠ j then t_i[PK] ≠ t_j[PK].\]
- \[Functional dependency of primary key: PK -> all other attributes (PK functionally determines the rest of the tuple).\]
Keys
Keys
Key Point: Functional dependency for a key K in relation R: K → A1, A2, ..., An (K determines all attributes of R)
What are Keys? In a database table (relation), a key is one or more attributes that uniquely identify a tuple (row). Keys enforce uniqueness and help link tables.
Main properties of a key:
- Uniqueness: No two distinct rows have the same key value(s).
- Minimality: A key contains no unnecessary attribute — removing any attribute breaks uniqueness (applies to candidate keys).
- Implied functional dependency: Key → all other attributes in the relation.
Types of keys:
- Superkey: Any set of attributes that uniquely identifies rows. (May contain extra attributes.)
- Candidate key: A minimal superkey (no redundant attributes). A table can have multiple candidate keys.
- Primary key: A chosen candidate key used as the main identifier. It should be unique and not null.
- Composite (Compound) key: A key made of two or more attributes together forming a unique identifier.
- Foreign key: An attribute (or set) in one table that references the primary key of another table, creating a relationship between tables.
- Alternate key: Any candidate key not chosen as the primary key.
How to choose a primary key (simple steps):
- Find attributes (or combination) that are unique for every row.
- Ensure minimality — remove redundant attributes if uniqueness still holds.
- Prefer stable, short, non-null attributes (e.g., IDs over names).
Why keys matter (practical benefits): They prevent duplicate records, speed up searches/indexing, and maintain referential integrity across tables.
Short example table (Student):
| RollNo (PK) | Name | Class |
|---|---|---|
| 01 | Asha | 9A |
| 02 | Ravi | 9B |
Here RollNo is the primary key: it uniquely identifies each student. If we added AdmissionNo that is also unique, AdmissionNo and RollNo are candidate keys; the chosen one is the primary key.
- Student table: RollNo (Primary Key) uniquely identifies each student; Name and Class are non-key attributes.
- Employee table: EmployeeID (Primary Key). Email could be an alternate key if unique.
- Course enrollment (Composite key): Enrollment table with StudentID + CourseID as composite key — together they uniquely identify a student’s enrollment in a course.
- Orders and Customers (Foreign Key): Orders table has CustomerID as a foreign key referencing Customers(CustomerID) primary key — links each order to a customer.
- Superkey vs Candidate key: {EmployeeID, Email} is a superkey if EmployeeID alone already identifies the row; removing Email may still keep uniqueness, so EmployeeID alone might be a candidate key.
- \[Functional dependency for a key K in relation R: K → A1\]\[A2, ...\]\[An (K determines all attributes of R)\]
- \[Uniqueness condition: ∀ t1\]\[t2 ∈ R\]\[(t1[K] = t2[K]) ⇒ (t1 = t2)\]
- \[Minimality for candidate key K: For any proper subset S of K\]\[S ↛ all attributes of R (S does NOT determine all attributes)\]
- \[Foreign key reference: R1(FK) → R2(PK) meaning FK values in R1 must match existing PK values in R2 (or be NULL if allowed)\]
Relationships between Tables
Relationships between Tables
Key Point: Cardinality notation: One-to-One = 1:1, One-to-Many = 1:N, Many-to-Many = M:N
What is a relationship between tables?
In a database, a relationship describes how records in one table are connected to records in another table. Relationships are implemented using keys: a primary key (PK) uniquely identifies a record in its table, and a foreign key (FK) in another table refers to that primary key.
Why relationships matter
They let us store data in separate, focused tables (avoiding duplication) and then combine related data when needed (using joins). Relationships enforce data consistency via referential integrity (a FK must reference an existing PK or be null if allowed).
Types of relationships
- One-to-One (1:1) — Each record in Table A relates to at most one record in Table B, and vice versa. Example use: Person – Passport (each person has one passport).
- One-to-Many (1:N) — A record in Table A can relate to many records in Table B, but a record in B relates to at most one record in A. This is the most common relationship. Example: Department – Employee (a department has many employees; each employee belongs to one department).
- Many-to-Many (M:N) — Records in Table A can relate to many in Table B and vice versa. Implemented by adding a junction (bridge) table that contains foreign keys to both tables. Example: Students – Courses implemented by Enrollments table.
How relationships are implemented
- Use a primary key in the parent table.
- Add a foreign key column in the child table which stores the parent table's PK values.
- For many-to-many, create a junction table whose columns are foreign keys to each related table; together they often form the junction table's composite primary key.
Referential integrity rules
- A foreign key value must match an existing primary key value (or be NULL if allowed).
- On updates/deletes you can set actions: CASCADE (propagate change), SET NULL (set FK to NULL), RESTRICT/NO ACTION (prevent change), etc.
Using relationships in queries
To retrieve related records you use joins. The FK-PK match is the condition for joining tables.
- One-to-One: Table Person (PersonID PK, Name) and Passport (PassportNo PK, PersonID FK). Each PersonID in Passport links to one PersonID in Person.
- One-to-Many: Table Department (DeptID PK, DeptName) and Employee (EmpID PK, Name, DeptID FK). Many employees can have the same DeptID.
- Many-to-Many: Table Student (StudentID PK), Course (CourseID PK), and Enrollment (StudentID FK, CourseID FK, Grade). Enrollment links students and courses; the pair (StudentID, CourseID) is unique.
- Referential integrity: If Department.DeptID is deleted and Employee.DeptID is a foreign key with ON DELETE SET NULL, Employee.DeptID becomes NULL for related employees.
- \[Cardinality notation: One-to-One = 1:1\]\[One-to-Many = 1:N\]\[Many-to-Many = M:N\]
- \[PK-FK relation: ChildTable.FK = ParentTable.PK (the condition used in JOINs)\]
- \[SQL JOIN pattern: SELECT columns FROM Parent P JOIN Child C ON P.PK = C.FK;\]
- \[Junction table primary key (simple): PRIMARY KEY (FK1\]\[FK2) for many-to-many relationships\]
- \[Referential action examples: FOREIGN KEY (FK) REFERENCES Parent(PK) ON DELETE CASCADE | ON DELETE SET NULL | ON DELETE RESTRICT\]
Data Types and Field Properties
Data Types and Field Properties
Key Point: Total Marks = Marks1 + Marks2 + Marks3
What are Data Types?
Data types define the kind of data a field/column can store in a database table. Choosing the correct data type ensures data integrity, reduces storage use and enables proper processing (sorting, calculations, validation).
Common Data Types (with short explanation)
- Short Text / Text: Stores letters, numbers and symbols (names, addresses). Usually limited in length (e.g., 255 characters).
- Long Text / Memo: Stores large text (descriptions, remarks).
- Number: Stores numeric values for calculations. Subtypes: Integer (no decimals), Float/Double (decimals).
- Currency / Decimal: For monetary values, often fixed decimal places to avoid rounding errors.
- Date/Time: Stores dates and times (DOB, transaction date). Allows date functions and age calculations.
- Boolean / Yes-No: Two-state values (True/False, Yes/No). Useful for flags like "Active" or "Passed".
- AutoNumber / Identity: Automatically generates a unique number for each record (primary key).
- Attachment / File: (In some systems) stores files or links to files (photos, documents).
Field Properties (what you set for each field)
- Field Size: Maximum number of characters or size of number type (e.g., Short Text 50 chars, Integer 4 bytes).
- Format: How data is displayed (e.g., date format dd/mm/yyyy, number of decimal places, currency symbol).
- Default Value: Value inserted automatically when no entry is given (e.g., Default = 0 or Default = "Not Specified").
- Validation Rule & Text: A condition that input must satisfy. If violated, Validation Text explains the error. Example:
[Marks] >= 0 And [Marks] <= 100. - Required (Yes/No): If set to Yes, the field cannot be left blank.
- Indexed: Speeds up searches and sorting on that field (useful for primary keys or frequently searched fields).
- Allow Zero Length: For text fields, allows storing an empty string ("") distinct from NULL.
- Input Mask: Enforces a pattern for data entry (phone number, postal code). Example mask:
(999) 000-0000.
How to choose data types & properties (practical tips)
- Use Text for names, Number for marks/quantities, Date/Time for dates, Boolean for yes/no flags.
- Keep field size as small as reasonably possible to save space.
- Use validation rules to prevent impossible values (e.g., negative ages or marks > 100).
- Use AutoNumber for primary keys to ensure unique records.
Example workflow (School student table)
Define fields like StudentID (AutoNumber), FirstName (Short Text, Size 50), DOB (Date/Time), MarksMath (Number, Integer, Validation: >= 0 And <=100), IsHosteller (Yes/No). Set default values or input masks as needed (e.g., phone mask for parent contact).
Why this matters: Correct data types and properties prevent data-entry errors, make queries and reports accurate (sums, averages, date calculations) and improve performance.
- School database - Student table: StudentID (AutoNumber), FirstName (Short Text, 50), LastName (Short Text, 50), DOB (Date/Time), Age (Number or calculated), MarksMath (Number, Validation: >=0 And <=100), ParentPhone (Short Text with Input Mask '(999) 000-0000'), IsHosteller (Yes/No).
- Inventory system - Product table: ProductID (AutoNumber), ProductName (Short Text), Quantity (Integer, Default 0, Validation: >=0), Price (Currency, Format = $#,##0.00), ExpiryDate (Date/Time).
- Library database - Book table: BookID (AutoNumber), Title (Long Text), Author (Short Text), ISBN (Short Text, Input Mask '000-0-00-000000-0'), PublishedYear (Integer), Available (Yes/No, Default = Yes).
- \[Total Marks = Marks1 + Marks2 + Marks3\]
- \[Percentage = (Total Marks / Maximum Marks) * 100\]
- \[Average = (Marks1 + Marks2 + ... + MarksN) / N\]
- \[Age (approx) = CurrentDate - DateOfBirth\]\[in SQL/Access example: DateDiff('yyyy', [DOB]\]\[Date())\]
- \[FullName (concatenate) = FirstName & ' ' & LastName (Access uses & to join strings)\]
- \[Validation rule examples: [Marks] >= 0 And [Marks] <= 100\]\[[Price] >= 0\]
Constraints
Constraints
Key Point: Primary Key rule: PRIMARY KEY ⇒ NOT NULL + UNIQUE
Definition: Constraints are rules applied to table columns in a database to enforce data integrity and correctness. They limit the type of data that can be stored and ensure relationships between tables remain consistent.
Why we use constraints:
- Prevent invalid or inconsistent data (data integrity).
- Enforce business rules (e.g., every student must have a roll number).
- Maintain referential integrity between related tables.
Common types of constraints:
NOT NULL
Ensures a column cannot have NULL values. Use when a value is mandatory.
CREATE TABLE Student (
roll_no INT NOT NULL,
name VARCHAR(50) NOT NULL
);
UNIQUE
Makes sure all values in a column (or group of columns) are distinct.
CREATE TABLE Employee (
emp_id INT PRIMARY KEY,
email VARCHAR(100) UNIQUE
);
PRIMARY KEY
A column (or columns) that uniquely identifies each row. It implies NOT NULL and UNIQUE. A table can have only one primary key.
CREATE TABLE Class (
class_id INT PRIMARY KEY
);
FOREIGN KEY (Referential Integrity)
Enforces that a column’s values must match existing values in the referenced table’s primary key (or be NULL if allowed). Options include cascading actions like ON DELETE CASCADE or ON UPDATE CASCADE.
CREATE TABLE Enrollment (
enroll_id INT PRIMARY KEY,
student_roll INT,
FOREIGN KEY (student_roll) REFERENCES Student(roll_no) ON DELETE RESTRICT
);
CHECK
Specifies a condition that each row must satisfy.
CREATE TABLE Person (
id INT PRIMARY KEY,
age INT CHECK (age >= 3 AND age <= 100)
);
DEFAULT
Provides a default value when none is supplied during insertion.
CREATE TABLE Orders (
order_id INT PRIMARY KEY,
status VARCHAR(20) DEFAULT 'pending'
);
When constraints are checked: At INSERT or UPDATE time. If the data violates a constraint, the operation is rejected and an error is returned.
Benefits: Reliable data, easier debugging, fewer application-side checks, clear representation of business rules in the schema.
Important rules/notes:
- Primary key implies NOT NULL and UNIQUE.
- A table can have multiple UNIQUE constraints but only one PRIMARY KEY.
- Foreign keys enforce that child table values exist in parent table (or are NULL if allowed).
- Constraints can be added at table creation or later using ALTER TABLE.
- School database: Student(roll_no INT PRIMARY KEY, name VARCHAR(50) NOT NULL, email VARCHAR(100) UNIQUE). Enrollment(enroll_id INT PRIMARY KEY, student_roll INT, FOREIGN KEY(student_roll) REFERENCES Student(roll_no)). This ensures every enrolled student exists and each student has a unique roll number and email.
- Library system: Book(book_id INT PRIMARY KEY, title VARCHAR(100), copies INT CHECK(copies >= 0)). Loan(loan_id INT PRIMARY KEY, book_id INT, member_id INT, FOREIGN KEY(book_id) REFERENCES Book(book_id) ON DELETE RESTRICT). CHECK prevents negative copies; FOREIGN KEY prevents loaning non-existent books.
- Banking: Account(acc_no INT PRIMARY KEY, balance DECIMAL(10,2) DEFAULT 0 CHECK(balance >= 0), holder_name VARCHAR(100) NOT NULL). This prevents negative balances, ensures account numbers are unique and names are always provided.
- E-commerce: Orders(order_id INT PRIMARY KEY, customer_id INT REFERENCES Customers(customer_id) ON DELETE CASCADE, status VARCHAR(20) DEFAULT 'pending'). When a customer is deleted, their orders can be set to cascade delete (if business rule allows).
- Attendance: Attendance(student_id INT, date DATE, present BOOLEAN DEFAULT FALSE, PRIMARY KEY(student_id, date)). Composite primary key prevents duplicate attendance records for the same student on the same date.
- \[Primary Key rule: PRIMARY KEY ⇒ NOT NULL + UNIQUE\]
- \[Referential integrity rule: For a FOREIGN KEY (FK) in child table\]\[FK value must be NULL or equal to an existing PRIMARY KEY value in parent table.\]
- \[Only one PRIMARY KEY per table\]\[multiple UNIQUE constraints allowed.\]
- \[CHECK condition: CHECK(expression) must evaluate to TRUE for each row\]\[Example: CHECK(age >= 3 AND age <= 100).\]
- \[ALTER TABLE syntax (add constraint): ALTER TABLE table_name ADD CONSTRAINT constraint_name constraint_definition;\]
- \[Typical SQL constraint declaration (inline): column_name data_type CONSTRAINT constraint_name constraint_type\]
Normalization (Basic)
Normalization (Basic)
Key Point: Functional dependency: A → B (A determines B).
What is Normalization? Normalization is a systematic process in database design to organize data to reduce redundancy and avoid anomalies (insertion, updation, deletion). It divides large tables into smaller, related tables and defines relationships between them.
Goals:
- Eliminate duplicate data (redundancy)
- Ensure data dependencies make sense (data integrity)
- Prevent update, insert and delete anomalies
Key concepts
- Primary key: Unique identifier for a record.
- Functional dependency (A → B): Value of A determines value of B.
- Composite key: A primary key made of more than one attribute.
Basic Normal Forms
- First Normal Form (1NF): Each column must contain atomic (indivisible) values and each record must be unique. No repeating groups or arrays inside a field.
- Second Normal Form (2NF): Table must be in 1NF and every non-key attribute must be fully functionally dependent on the entire primary key. (Removes partial dependencies when primary key is composite.)
- Third Normal Form (3NF): Table must be in 2NF and no transitive dependency should exist (non-key attribute should not depend on another non-key attribute).
Common Anomalies
- Insertion anomaly: Cannot add data because other data is missing.
- Deletion anomaly: Deleting data unintentionally removes other needed data.
- Update anomaly: Multiple places need updating for the same change, risking inconsistency.
How to normalize (basic steps)
- Check for repeating groups or multi-valued attributes → convert to atomic columns or separate table (1NF).
- If primary key is composite, ensure non-key attributes depend on whole key; if not, move dependent attributes to separate table (2NF).
- Remove transitive dependencies by creating new tables for attributes that depend on other non-key attributes (3NF).
Short example (conceptual)
Start: Students table with columns (StudentID, Name, Course1, Course2, Department, DeptHead)
- To achieve 1NF: replace Course1, Course2 with one related Enrollment table: (StudentID, CourseID).
- To achieve 2NF: if Enrollment primary key is (StudentID, CourseID) and a column like StudentName depends only on StudentID, move StudentName to Student table.
- To achieve 3NF: if DeptHead depends on Department (not on StudentID), create Department table (Department, DeptHead) and link by DepartmentID.
Result: Smaller tables (Students, Courses, Enrollment, Departments) connected by keys; redundancy reduced and anomalies avoided.
- Library system: Initial table (BookID, Title, Author1, Author2, BorrowerID, BorrowerName). Normalize by moving authors to a BookAuthors table and borrower details to a Borrowers table to avoid repeated author names and borrower info.
- School: ClassRecords (StudentID, StudentName, Class, ClassTeacher, TeacherContact). Move teacher details to Teacher table so teacher information is stored once (3NF).
- Online store orders: Orders (OrderID, CustomerName, CustomerAddress, Product1, Product2, ProductPrice1, ProductPrice2). Normalize into Customers, Orders, OrderItems, Products to prevent price and address inconsistencies.
- \[Functional dependency: A → B (A determines B).\]
- \[Partial dependency (problem for 2NF): If primary key is (A,B) and A → C\]\[then C has a partial dependency on the key subset A.\]
- \[Transitive dependency (problem for 3NF): A → B and B → C implies A → C (if B is non-key\]\[move B and C into a separate table).\]
- \[1NF condition: All attributes are atomic and each record is unique.\]
- \[2NF condition: Table in 1NF and no partial dependencies on a composite key.\]
- \[3NF condition: Table in 2NF and no transitive dependencies (every non-key attribute depends only on the primary key).\]
Basic CRUD Operations
Basic CRUD Operations
Key Point: INSERT template: INSERT INTO table_name (col1, col2, ...) VALUES (val1, val2, ...);
What are CRUD operations?
CRUD stands for Create, Read, Update and Delete. These are the four basic types of operations that you perform on data stored in a database. Every application that stores and manages data (like contact lists, school records or online stores) uses these operations.
Detailed explanation of each operation
- Create (C): Add new records (rows) to a table. Example: adding a new student to the Students table.
- Read (R): Retrieve data from the database without changing it. Example: viewing the list of students or searching for one student by ID.
- Update (U): Modify existing records. Example: changing a student’s grade or address.
- Delete (D): Remove records from the database. Example: deleting a student who left the school.
How CRUD is used in a database system
Operations typically run as SQL commands in a relational database. CRUD operations must preserve data integrity (for example, not deleting a student referenced in exam results without handling related data). In real systems, these operations are often handled in transactions so that changes are atomic and consistent.
Simple example table
Consider a table named Students with columns: StudentID (primary key), Name, Age, Grade.
SQL examples
-- Create (insert a new student)
INSERT INTO Students (StudentID, Name, Age, Grade) VALUES (101, 'Anita', 14, 'IX');
-- Read (select students in class IX)
SELECT StudentID, Name, Age FROM Students WHERE Grade = 'IX';
-- Update (change age for a student)
UPDATE Students SET Age = 15 WHERE StudentID = 101;
-- Delete (remove a student)
DELETE FROM Students WHERE StudentID = 101;
Important concepts related to CRUD
- Primary Key: Uniquely identifies a record (e.g., StudentID). Useful when updating or deleting a specific row.
- Constraints: Rules like NOT NULL or UNIQUE keep data correct.
- Transactions: Grouping multiple CRUD operations so they all succeed or all fail (ACID properties) to keep data consistent.
- Permissions: Users may be allowed to perform only certain CRUD actions (e.g., some users can read but not delete).
Why CRUD matters
Understanding CRUD helps design interfaces (forms and lists), APIs and database schemas. Most user actions map directly to one of the CRUD operations.
- Phone Contacts App: Create = add a new contact; Read = view a contact or search contacts; Update = change a phone number; Delete = remove a contact.
- Library Management: Create = register a new book; Read = search books by author or title; Update = edit book status when issued/returned; Delete = remove a lost/damaged book record.
- School Database: Create = add student records; Read = list students in a class; Update = change student grades or addresses; Delete = remove records of alumni (subject to rules).
- Online Shopping: Create = add a new product or place an order; Read = view product details or order history; Update = change order status or product stock; Delete = remove an item from the cart or discontinue a product.
- \[INSERT template: INSERT INTO table_name (col1\]\[col2, ...) VALUES (val1\]\[val2, ...)\]
- \[SELECT template (read): SELECT col1\]\[col2 FROM table_name WHERE condition ORDER BY col ASC|DESC LIMIT n\]
- \[UPDATE template: UPDATE table_name SET col1 = val1\]\[col2 = val2 WHERE condition\]
- \[DELETE template: DELETE FROM table_name WHERE condition;\]
- \[Conditional read (example): SELECT * FROM Students WHERE Grade = 'IX' AND Age > 13;\]
- \[Aggregate example (counts): SELECT COUNT(*) FROM Students WHERE Grade = 'IX';\]
Queries and Filtering
Queries and Filtering
Key Point: Basic SELECT: SELECT field1, field2 FROM TableName WHERE condition;
What is a Query? A query is a question you ask a database to retrieve a specific subset of data. It selects records from one or more tables based on conditions you give (criteria).
What is Filtering? Filtering is the process of applying criteria to hide records that do not meet the conditions, leaving only the records you need. Filters can be applied using a graphical interface (AutoFilter, Query Design) or by writing a query language statement (SQL).
Purpose: Quickly find, view or analyze relevant records (for example, students with marks above 80, books published after 2010, or items with low stock).
Basic components:
- Source table(s): where data is stored (e.g., Students).
- Fields/columns: which attributes to display (e.g., Name, Marks, Grade).
- Criteria: conditions that records must satisfy (e.g., Marks > 80).
- Output: the resulting list of records that match the criteria.
Common operators and expressions: =, <> (not equal), >, <, >=, <=, BETWEEN, IN, LIKE (pattern matching), AND, OR, NOT. Use AND to require multiple conditions, OR to allow either condition.
Example ways to create queries:
- Query Design (GUI): choose table, add fields, enter criteria in the criteria row, run the query.
- SQL (text): use SELECT ... FROM ... WHERE ... to specify fields and conditions.
- Spreadsheet filters: apply AutoFilter or custom filter on column headings.
Tips for building effective queries:
- Start simple: test one condition, then add more.
- Use parentheses to control logical order when combining AND/OR.
- Use wildcards with LIKE to find partial matches (e.g., 'A%' for names starting with A).
- Check data types: compare numbers to numbers and text to text (use quotes around text in SQL).
- Students table: Show names and marks of students with Marks > 80. SQL: SELECT Name, Marks FROM Students WHERE Marks > 80; Result: list of students scoring above 80.
- Library table: Find all books published between 2000 and 2010. SQL: SELECT Title, Author, Year FROM Books WHERE Year BETWEEN 2000 AND 2010;
- Inventory table: List items with Stock less than 10 to reorder. SQL: SELECT ItemID, ItemName, Stock FROM Inventory WHERE Stock < 10;
- Customer table: Find customers whose names start with 'A'. SQL (using pattern): SELECT Name, City FROM Customers WHERE Name LIKE 'A%';
- Multiple conditions: From Students show Name where Class = '9' AND Marks >= 75. SQL: SELECT Name FROM Students WHERE Class = '9' AND Marks >= 75;
- \[Basic SELECT: SELECT field1\]\[field2 FROM TableName WHERE condition\]
- \[Comparison operators: =, <>, >, <, >=, <= (example: WHERE Age >= 15)\]
- \[Range: BETWEEN low AND high (example: WHERE Year BETWEEN 2000 AND 2010)\]
- \[Set membership: IN (val1\]\[val2, ...) (example: WHERE City IN ('Delhi','Mumbai'))\]
- \[Pattern matching: LIKE 'pattern' with % or _ wildcards (example: LIKE 'A%' finds strings starting with 'A')\]
- \[Logical combinations: condition1 AND condition2\]\[condition1 OR condition2\]\[NOT condition (example: WHERE Marks >= 50 AND Grade = 'A')\]
Forms and Reports
Forms and Reports
Key Point: Sum (total of a field): Total = SUM(FieldName)
Forms and Reports are two important components of a Database Management System (DBMS) used to enter, view and present data.
Forms
A form is a user-friendly screen that lets users enter, edit or view individual records of a table. Forms provide a controlled interface so data entry is easier and errors are reduced.
- Purpose: Data entry, validation, navigation and user interaction.
- Common controls: label, text box, combo box (drop-down), list box, radio button, checkbox, date picker, command/button.
- Types: Single-record form (one record at a time), continuous form (many records shown in rows), split form (form plus datasheet).
- Key properties: bound (linked to table/field) or unbound, default value, required, validation rule/message, input mask, control source.
- Typical steps to create: choose table/query, design layout, add controls for fields, set validation rules, add buttons for Save/Next/Delete.
Reports
A report is a formatted, printable presentation of data. Reports are used to summarize and display information for decision-making, record keeping or sharing.
- Purpose: Present data in a readable and often printable format for review, analysis and decision-making.
- Parts of a report: Report header (title), page header, group header (for grouped data), detail section (records), group footer (subtotals), page footer (page numbers), report footer (totals/summary).
- Types: Tabular (detailed rows), Summary (totals and aggregates), Grouped (records grouped by a field, e.g., class or category).
- Typical steps to create: select source (table/query), choose fields, decide grouping/sorting, add aggregate calculations (sum, avg), format layout, preview/print.
Validation and Calculations
Forms commonly include validation to ensure correct data (eg. required fields, valid date range, numeric limits). Reports often include calculations such as totals, averages and percentages.
Differences (brief)
- Forms are for data entry and interaction; reports are for presentation and printing.
- Forms usually show one or a few records in an interactive view; reports show many records in a read-only, formatted view.
Best practices
- Organize form fields in logical groups and use labels clearly.
- Use input masks and validation rules to reduce errors.
- Keep reports uncluttered: clear headings, group related data, highlight totals.
- Preview reports before printing to check page breaks and layouts.
Short example workflows
- Student admission: Use an admission form to capture name, DOB, address, class. Store in Students table.
- Monthly sales report: Use a report that groups sales by product or month and shows totals and trends for managers.
Note: Forms and reports are usually created in database applications (like MS Access, LibreOffice Base) or via web front-ends connected to a database.
- School admission form: fields – StudentID, Name, DOB, Class, ParentContact. Use validation to ensure DOB is a valid date and ParentContact uses a phone number mask.
- Mark sheet report: For each student show Subject-wise marks, Total = Sum(marks), Percentage = (Total / MaxTotal) * 100, Grade determined by percentage range.
- Inventory report for a shop: Group items by Category, show QuantityOnHand, ReorderLevel, and compute TotalValue = Sum(QuantityOnHand * UnitPrice) for each category.
- Invoice form and report: Form to enter sale (customer, items, quantities); Report to print invoice with subtotal, tax, and grand total.
- Library issue form: Enter BookID, MemberID, IssueDate, DueDate. Report to list overdue books by comparing DueDate with today's date.
- \[Sum (total of a field): Total = SUM(FieldName)\]
- \[Average: Avg = AVG(FieldName)\]
- \[Count: Count = COUNT(*) or COUNT(FieldName)\]
- \[Minimum/Maximum: Min = MIN(FieldName)\]\[Max = MAX(FieldName)\]
- \[Percentage (marks): Percentage = (MarksObtained / TotalMarks) * 100\]
- \[Running balance example: Balance = OpeningBalance + SUM(Credits) - SUM(Debits)\]
Indexes and Performance (Overview)
Indexes and Performance (Overview)
Key Point: Search time without index ≈ k * N (linear scan; time proportional to number of records N)
What is an index? An index is an extra data structure that stores key values and pointers to the actual records in a table. It is similar to the index at the back of a book: instead of scanning every page (record), you use the index to jump directly to the pages you need.
How indexes work (simple): The database keeps a sorted structure (often a B-tree or hash table) of key(s) and addresses. When you search for a record by an indexed column, the DBMS looks up the key in the index and follows the pointer to the record — much faster than scanning every row.
Common types of indexes: single-column (on one field), composite (on multiple fields), unique (enforces uniqueness), and cluster vs non-cluster (clustered stores table rows in index order; non-clustered keeps data separately).
Benefits:
- Much faster search and retrieval for queries that use the indexed column(s).
- Faster ORDER BY and range queries when index matches the sort/key.
- Can enforce uniqueness (unique index).
Costs / trade-offs:
- Uses extra storage space to store the index structure.
- Slows down INSERT, UPDATE, DELETE because the index must be updated whenever indexed data changes.
- Too many or wrong indexes can hurt overall performance.
When to use an index: Create indexes on columns frequently used in WHERE clauses, JOIN conditions, ORDER BY, or GROUP BY. Avoid indexing small tables or columns rarely queried or frequently updated unless needed.
Simple summary: Indexes trade a little extra storage and write overhead for much faster read/search performance. They are essential for performance when tables grow large and queries are selective.
- Phone directory (real life): Last-name index lets you find a person without reading every entry.
- Library catalogue: ISBN or author index points to the shelf/location — faster than scanning all books.
- School database: Indexing StudentID or AdmissionNumber allows the school software to fetch a student record quickly.
- E-commerce product search: Index on product name, category or price makes searches and sort-by-price fast.
- \[Search time without index ≈ k * N (linear scan\]\[time proportional to number of records N)\]
- \[Search time with index ≈ k * log_b(N) (logarithmic\]\[where b is the index branching factor\]\[very much smaller than N for large N)\]
- \[Index storage (approx.) ≈ N * (size_of_key + size_of_pointer) (extra bytes used by the index)\]
- \[Write cost ≈ base_write_cost + index_update_cost (index_update_cost grows with number of indexes and index complexity)\]
Backup, Recovery and Security (Overview)
Backup, Recovery and Security (Overview)
Key Point: Availability (%) = (Uptime / Total time) × 100
Overview: Backup, recovery and security are three closely related parts of managing a database so that data is safe, available and trustworthy. Backups create copies of data so it can be restored after loss or damage. Recovery is the process of restoring data to a correct state after failure, error or attack. Security protects data from unauthorized access, modification or disclosure.
Why it matters: Hardware failures, accidental deletion, software bugs, natural disasters or malicious attacks can cause data loss or corruption. Proper backup, recovery plans and security controls reduce downtime, limit data loss and keep sensitive information safe.
Backup types (basic):
- Full backup: A complete copy of the entire database. Simple to restore but takes more time and space.
- Incremental backup: Copies only data changed since the last backup (of any type). Faster and smaller, but a restore may require multiple steps (last full + each incremental).
- Differential backup: Copies data changed since the last full backup. Restore needs last full + last differential (fewer steps than incremental).
Backup locations and media: Local disks, external drives, network storage (NAS), tape, and cloud storage. Best practice: keep copies in separate physical locations.
Common strategies: The 3-2-1 rule — keep at least 3 copies of data, on 2 different media, with 1 copy off-site (or in the cloud). Schedule regular full and incremental/differential backups based on how often data changes.
Recovery approaches: Point-in-time recovery (restore DB to a specific time), full database restore, and file-level restore. Recovery steps typically: identify failure → pick correct backup → restore backup → apply transaction/logs to reach desired state → verify and bring system online.
Security basics (CIA triad):
- Confidentiality: Prevent unauthorized reading (use strong authentication, role-based access control, encryption).
- Integrity: Ensure data is not altered illegally (use checksums, hashing, digital signatures, and access controls).
- Availability: Ensure authorized users can access data when needed (use backups, redundancy, failover systems).
Security controls and best practices: Use strong passwords and multi-factor authentication, implement least-privilege access, encrypt data at rest and in transit, keep systems patched, maintain audit logs, test backups and recovery procedures regularly, and secure physical access to servers and backup media.
Testing and documentation: A backup plan must be tested by performing periodic restore drills to verify recovery time and data integrity. Maintain a written disaster recovery plan listing responsible people, steps, and contact information.
Simple risk-reduction checklist: Regular automated backups, off-site copy, encrypted backups, documented recovery steps, periodic restore tests, and access controls + monitoring.
- School attendance database: Daily full backup on Saturday and incremental backups each weekday. If a teacher accidentally deletes a month of records, restore the most recent full backup and apply the incremental backups to recover lost entries.
- Personal computer: Use cloud backup (e.g., Google Drive/OneDrive) plus an external hard drive. If the laptop is stolen, data can be restored from the cloud and sensitive backup files are encrypted to prevent misuse.
- Bank transaction system: Continuous transaction log backups allow point-in-time recovery to fix errors caused by a faulty update without losing all transactions processed afterward.
- Office server with RAID and UPS: RAID reduces risk from a single disk failure; UPS keeps the server running through short power outages so backups finish and files remain consistent.
- Ransomware attack: An organization restores systems from clean off-site backups and then strengthens security (patches, endpoint protection, stricter access controls) to prevent recurrence.
- \[Availability (%) = (Uptime / Total time) × 100\]
- \[RPO (Recovery Point Objective) ≤ Backup interval (i.e.\]\[maximum acceptable data loss = time since last backup)\]
- \[RTO (Recovery Time Objective) = acceptable downtime (time taken to restore service)\]
- \[MTBF (Mean Time Between Failures) = Total operational time / Number of failures\]
- \[Reliability = MTBF / (MTBF + MTTR)\]\[where MTTR = Mean Time To Repair\]
Practical Database Design Steps
Practical Database Design Steps
Key Point: Record Size = sum of field sizes (bytes) for all columns in a row. Example: RecordSize = Size(Name) + Size(DOB) + Size(IntegerFields) + ...
Practical Database Design Steps describe a systematic process to convert real-world requirements into a well-structured, efficient, and maintainable database. Good design reduces redundancy, ensures data integrity, improves query performance and makes future changes easier.
Steps
- Requirement analysis: Meet stakeholders (teachers, librarians, store managers) to list required data and typical operations (add, search, update, report). Identify functional needs and constraints (privacy, backups, expected size).
- Identify entities and attributes: Find main objects (Student, Book, Product) and their attributes (Name, RollNo, ISBN, Price). Distinguish between attributes that describe an entity and those that represent relationships.
- Choose primary keys: Select an attribute (or combination) that uniquely identifies each record, e.g., RollNo for Student or ISBN for Book. If none exists, create a surrogate key (StudentID).
- Define relationships: Determine how entities relate: one-to-one, one-to-many, many-to-many. Model many-to-many with an associative table (e.g., StudentCourse).
- Create an ER diagram: Draw entities, attributes, keys and relationships. This visual blueprint guides table creation.
- Map ER to relational schema (table design): Convert entities to tables, choose data types for each attribute, add foreign keys to represent relationships.
- Apply normalization: Remove update/insert/delete anomalies by organizing tables into normal forms (1NF, 2NF, 3NF). Normalize until redundancy is minimized while keeping performance in mind.
- Specify constraints: Define NOT NULL, UNIQUE, CHECK rules and referential integrity (FOREIGN KEY) to enforce valid data.
- Physical design and indexing: Choose appropriate data types, create indexes on columns used often in WHERE/JOIN to speed queries, but avoid excessive indexing which slows writes.
- Test with sample data: Populate sample records and run typical queries and reports to verify correctness and performance.
- Backup, security and maintenance plan: Define backup frequency, user roles and privileges, and a plan for growth and schema changes.
Normalization quick guide
- 1NF: Each field contains only atomic (indivisible) values; no repeating groups.
- 2NF: In 1NF and every non-key attribute is fully functionally dependent on the whole primary key (eliminate partial dependencies).
- 3NF: In 2NF and no transitive dependency exists (non-key attributes do not depend on other non-key attributes).
Practical tips
- Start simple: design for current needs and anticipate likely extensions.
- Prefer surrogate keys for multi-attribute natural keys that can change.
- Keep columns focused and use appropriate data types (date for dates, integer for counts).
- Document the schema and ER diagram so future students or admins can understand it.
- School database: Entities — Student (StudentID, Name, Class, DOB), Teacher (TeacherID, Name, Subject), Class (ClassID, ClassName). Relationships — Teacher teaches Class (1-to-many), Student attends Class (many-to-1). Normalize marks into a separate Marks table (StudentID, SubjectID, Marks).
- Library system: Entities — Book (ISBN, Title, Author), Member (MemberID, Name), Loan (LoanID, ISBN, MemberID, IssueDate, ReturnDate). Use ISBN as primary key for Book, MemberID for Member, and Loan as associative table for many-to-many history of borrowings.
- Inventory for a stationery shop: Entities — Product (ProductID, Name, Price), Supplier (SupplierID, Name), Purchase (PurchaseID, ProductID, SupplierID, Quantity, PurchaseDate). Index ProductID for fast lookups and compute stock using transactions table.
- Student marks and report cards: Tables — Student, Subject, Exam, Result. Result holds StudentID, SubjectID, ExamID, Marks. To calculate percentage: TotalMarksObtained / TotalMaximumMarks * 100 (use as application-level formula).
- \[Record Size = sum of field sizes (bytes) for all columns in a row\]\[Example: RecordSize = Size(Name) + Size(DOB) + Size(IntegerFields) + ...\]
- \[Table Size = Record Size * Number of Records\]\[Example: TableSize(bytes) = RecordSize(bytes) × N(records).\]
- \[Estimated B-tree height ≈ log_f(N) where f = average fan-out (children per node) and N = number of indexed entries\]\[smaller height = faster index lookup.\]
- \[Percentage score = (TotalObtained / TotalMaximum) × 100 — useful when storing or displaying aggregate marks.\]
- \[Cardinality notation: 1-to-1, 1-to-many (1..*)\]\[many-to-many (*..*)\]\[Use these to decide foreign key placement or associative tables.\]
Introductory SQL Concepts
Introductory SQL Concepts
Key Point: CREATE TABLE table_name (column1 datatype constraint, column2 datatype, ...);
What is SQL?
SQL (Structured Query Language) is a standard language used to communicate with relational databases. It is used to create and modify database structures and to insert, update, delete and retrieve data.
Main categories of SQL commands
- DDL (Data Definition Language) – commands that define or change the structure of database objects: CREATE, ALTER, DROP.
- DML (Data Manipulation Language) – commands that manipulate data: INSERT, UPDATE, DELETE, SELECT.
- DCL (Data Control Language) – commands that control access: GRANT, REVOKE.
- TCL (Transaction Control Language) – commands that manage transactions: COMMIT, ROLLBACK.
Basic concepts
- Tables: Data is stored in tables (rows and columns). Each column has a data type (e.g., INT, VARCHAR(n), DATE, FLOAT).
- Primary Key: A column (or set of columns) that uniquely identifies each row (e.g., student_id).
- NULL: Represents missing/unknown value.
- Constraints: NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY to ensure data integrity.
Common SQL statements (with examples)
Create a table 'Students':
CREATE TABLE Students (
student_id INT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
class INT,
dob DATE,
gender CHAR(1)
);
Insert rows:
INSERT INTO Students (student_id, name, class, dob, gender)
VALUES (1, 'Aisha', 9, '2011-05-12', 'F');
Simple select and filter:
SELECT name, class FROM Students WHERE class = 9 ORDER BY name;
Update and delete:
UPDATE Students SET class = 10 WHERE student_id = 1;
DELETE FROM Students WHERE student_id = 10;
Aggregate queries:
SELECT COUNT(*) AS total_students FROM Students;
SELECT AVG(marks) AS average_marks FROM Results WHERE subject = 'Math';
Helpful SQL features
- SELECT DISTINCT to get unique values.
- LIKE with % and _ for pattern matching (e.g., name LIKE 'A%').
- ORDER BY to sort results, ASC (default) or DESC.
- GROUP BY to aggregate by categories and HAVING to filter aggregated groups.
Transactions (simple idea)
A transaction is a group of operations that must succeed together. Use COMMIT to save changes or ROLLBACK to undo them if something goes wrong.
Real-life uses
- School: store student details, attendance, and marks.
- Library: maintain books, borrowers, issue/return records.
- Shop inventory: track products, stock levels, and sales.
Tips for beginners
- Write and test one SQL statement at a time.
- Use meaningful column names and set primary keys.
- Use WHERE in UPDATE/DELETE to avoid accidental changes to all rows.
- School: List names of class 9 students ordered alphabetically. SQL: SELECT name FROM Students WHERE class = 9 ORDER BY name;
- Library: Count how many books are currently available in the 'Science' category. SQL: SELECT COUNT(*) FROM Books WHERE category = 'Science' AND status = 'available';
- Marks: Find average marks in Math for class 9. SQL: SELECT AVG(marks) FROM Results WHERE subject = 'Math' AND class = 9;
- Inventory: Decrease stock after a sale of product_id = 101 by 2 units. SQL: UPDATE Products SET stock = stock - 2 WHERE product_id = 101;
- Search: Find students whose name starts with 'S'. SQL: SELECT * FROM Students WHERE name LIKE 'S%';
- \[CREATE TABLE table_name (column1 datatype constraint\]\[column2 datatype, ...)\]
- \[INSERT INTO table_name (col1\]\[col2, ...) VALUES (val1\]\[val2, ...)\]
- \[SELECT column_list FROM table_name WHERE condition ORDER BY column ASC|DESC;\]
- \[SELECT DISTINCT column FROM table_name;\]
- \[UPDATE table_name SET column1 = value1\]\[column2 = value2 WHERE condition\]
- \[DELETE FROM table_name WHERE condition;\]
Key Concepts
- Database
- An organized collection of related data stored so it can be accessed, managed and updated efficiently.
- DBMS
- Database Management System — software that creates, manages and provides controlled access to databases.
- RDBMS
- Relational DBMS — a DBMS that stores data in tables (relations) and supports keys and joins.
- Table
- A collection of rows and columns in a database that stores data about one entity type.
- Record (Tuple)
- A single row in a table representing one item or entity instance.
- Field (Attribute)
- A column in a table representing one property of the entity.
- Primary Key
- A field or set of fields that uniquely identifies each record in a table.
- Foreign Key
- A field in one table that refers to the primary key of another table, creating a link between tables.
- Composite Key
- A primary key made of two or more fields that together uniquely identify a record.
- Index
- A data structure that improves the speed of data retrieval on a table column.
- Query
- A request for data or information from the database, usually written in a query language.
- SQL
- Structured Query Language — the standard language used to communicate with relational databases.
- CRUD
- Basic operations performed on database data: Create, Read, Update, Delete.
- Normalization
- Process of organizing data to reduce redundancy and improve integrity, using normal forms.
- Data Redundancy
- Unnecessary repetition of data in a database, causing storage waste and inconsistency risks.
- Data Integrity
- Accuracy and consistency of data over its lifecycle, enforced by rules and constraints.
- Transaction
- A sequence of database operations treated as a single unit that must fully succeed or fail (ACID properties).
- Schema
- The structural design of a database that defines tables, fields, relationships and constraints.
- Relationship
- A logical association between two tables: one-to-one, one-to-many or many-to-many.
- Backup and Recovery
- Processes to copy and restore database data to protect against data loss and ensure availability.
Practice Questions
-
What is a Primary Key in a database table? / डेटाबेस तालिका में प्राथमिक कुंजी क्या है? (a) The first column of any table / किसी भी तालिका का पहला कॉलम (b) A field or set of fields that uniquely identifies each record in a table / एक फ़ील्ड या फ़ील्ड का समूह जो तालिका के प्रत्येक रिकॉर्ड को विशिष्ट रूप से पहचानता है (c) A field that can contain NULL values / एक फ़ील्ड जिसमें NULL मान हो सकते हैं (d) A foreign key that links two tables / एक विदेशी कुंजी जो दो तालिकाओं को जोड़ती है
Show answer
(b) A field or set of fields that uniquely identifies each record in a table / एक फ़ील्ड या फ़ील्ड का समूह जो तालिका के प्रत्येक रिकॉर्ड को विशिष्ट रूप से पहचानता है — A primary key must be unique and NOT NULL. For example, RollNo in a Students table uniquely identifies each student. / प्राथमिक कुंजी अद्वितीय और NOT NULL होनी चाहिए। उदाहरण के लिए, छात्र तालिका में RollNo प्रत्येक छात्र को विशिष्ट रूप से पहचानता है।
-
In a relational database, what is the relationship type when one record in Table A can be linked to many records in Table B, but each record in Table B is linked to only one record in Table A? / रिलेशनल डेटाबेस में, जब टेबल A का एक रिकॉर्ड टेबल B के कई रिकॉर्ड से जुड़ा हो सकता है, लेकिन टेबल B का प्रत्येक रिकॉर्ड केवल टेबल A के एक रिकॉर्ड से जुड़ा हो, तो यह किस प्रकार का संबंध है? (a) Many-to-Many / मेनी-टू-मेनी (b) One-to-One / वन-टू-वन (c) One-to-Many / वन-टू-मेनी (d) Zero-to-Many / ज़ीरो-टू-मेनी
Show answer
(c) One-to-Many / वन-टू-मेनी — This is the most common relationship type. Example: One Department can have many Employees, but each Employee belongs to one Department. The FK (DeptID) in the Employees table links to the PK (DeptID) in the Departments table. / यह सबसे सामान्य संबंध प्रकार है। उदाहरण: एक विभाग में कई कर्मचारी हो सकते हैं, लेकिन प्रत्येक कर्मचारी एक विभाग से संबंधित है।
-
Which SQL command is used to retrieve data from a table? / तालिका से डेटा प्राप्त करने के लिए कौन-सा SQL कमांड उपयोग किया जाता है? (a) INSERT / इनसर्ट (b) UPDATE / अपडेट (c) SELECT / सेलेक्ट (d) DELETE / डिलीट
Show answer
(c) SELECT / सेलेक्ट — SELECT is used to query data from one or more tables. Example: SELECT Name, Class FROM Students WHERE Class = '9'; retrieves names and classes of all Class 9 students. / SELECT एक या अधिक तालिकाओं से डेटा क्वेरी करने के लिए उपयोग किया जाता है। उदाहरण: SELECT Name, Class FROM Students WHERE Class = '9';।
-
In a database table, the number of columns (attributes) is called the ________ and the number of rows (records) is called the ________. / डेटाबेस तालिका में, कॉलम (विशेषताओं) की संख्या को ________ और पंक्तियों (रिकॉर्ड) की संख्या को ________ कहते हैं।
Show answer
Degree (or arity); Cardinality / डिग्री (या एरिटी); कार्डिनलिटी — Degree = number of attributes. Cardinality = number of tuples/records. These terms describe the size and structure of a relation. / डिग्री = विशेषताओं की संख्या। कार्डिनलिटी = टपल/रिकॉर्ड की संख्या।
-
The ________ constraint ensures that a column cannot have empty (NULL) values. / ________ बाधा सुनिश्चित करती है कि एक कॉलम में रिक्त (NULL) मान नहीं हो सकते।
Show answer
NOT NULL / नॉट नल — The NOT NULL constraint is applied to a column to make it mandatory, meaning every record must provide a value for that column. For example, a student's name should never be empty. / NOT NULL बाधा एक कॉलम को अनिवार्य बनाती है, जिसका अर्थ है कि प्रत्येक रिकॉर्ड को उस कॉलम के लिए मान प्रदान करना होगा।
-
True or False: In a DBMS, a Foreign Key in one table must match a Primary Key value that already exists in the referenced table (or be NULL if allowed). / सत्य या असत्य: DBMS में, एक तालिका की विदेशी कुंजी को संदर्भित तालिका में पहले से मौजूद प्राथमिक कुंजी मान से मेल खाना चाहिए (या अनुमति होने पर NULL हो सकती है)।
Show answer
True / सत्य — This is called referential integrity. A foreign key value must reference a valid (existing) primary key value in the parent table. This prevents orphan records and keeps data consistent across related tables. / इसे संदर्भात्मक अखंडता कहते हैं। एक विदेशी कुंजी मान को मूल तालिका में एक वैध (मौजूदा) प्राथमिक कुंजी मान का संदर्भ देना चाहिए।
-
What is the difference between a DBMS and a traditional file-based system? State any two advantages. / DBMS और पारंपरिक फ़ाइल-आधारित प्रणाली में क्या अंतर है? कोई भी दो लाभ बताइए।
Show answer
In a traditional file-based system, data is stored in separate unrelated files with no central management, leading to data redundancy and inconsistency. A DBMS provides centralized management of data. Two advantages: (1) Reduced data redundancy — data is stored once and shared; (2) Data integrity — constraints like primary keys and validation rules prevent incorrect data from being entered. / पारंपरिक फ़ाइल-आधारित प्रणाली में डेटा अलग-अलग असंबंधित फ़ाइलों में संग्रहीत होता है जिससे डेटा अतिरेक और असंगति होती है। DBMS डेटा का केंद्रीकृत प्रबंधन प्रदान करता है।
-
Write the SQL INSERT statement to add a student with StudentID=105, Name='Priya', Class=9 to a table called Students. / Students नामक तालिका में StudentID=105, Name='Priya', Class=9 वाले छात्र को जोड़ने के लिए SQL INSERT कथन लिखिए।
Show answer
INSERT INTO Students (StudentID, Name, Class) VALUES (105, 'Priya', 9); — This statement specifies the table name, the column names in brackets, and the corresponding values to insert. String values like names are enclosed in single quotes; numeric values are written without quotes. / INSERT INTO Students (StudentID, Name, Class) VALUES (105, 'Priya', 9); — यह कथन तालिका का नाम, कोष्ठक में कॉलम नाम और सम्मिलित करने के लिए संबंधित मान निर्दिष्ट करता है।
Related Laws & Principles
Explore allFoundational laws & principles connected to this chapter — tap to open in the Laws Explorer.