DBMS concepts, Keys, Relationships, LibreOffice Base: Tables, Forms, Queries, Reports, and SQL basics. Complete notes for CBSE IT 402 Class 10.
Database, DBMS, RDBMS, Tables, Fields, Records.
Primary Key, Foreign Key, Candidate Key โ uniqueness rules.
Create, modify tables in Design view or Wizard in LibreOffice Base.
Retrieve data with criteria. SQL: SELECT, WHERE, ORDER BY.
Forms: data entry UI. Reports: formatted printable output.
One-to-One, One-to-Many, Many-to-Many between tables.
| Term | Definition | Analogy |
|---|---|---|
| Table | A collection of related data organised in rows and columns. | Excel spreadsheet |
| Field | A column in a table โ represents one attribute/characteristic. | Column header |
| Record | A row in a table โ represents one complete entry. | One row of data |
| Cell | The intersection of a row and column โ contains one data value. | Individual cell |
| Key Type | Definition | Example |
|---|---|---|
| Primary Key | A field (or combination) that uniquely identifies each record in a table. Cannot be NULL or duplicate. | Student_ID in a Students table |
| Foreign Key | A field in one table that refers to the Primary Key of another table. Establishes a relationship between tables. | Student_ID in an Exam table (links to Students) |
| Candidate Key | Any field that could serve as a Primary Key โ it is unique and not NULL. There may be several candidate keys; only one becomes the Primary Key. | Email or Phone in a Contacts table |
| Composite Key | A Primary Key made of two or more fields together. | (Student_ID + Subject_ID) in a Marks table |
| Relationship | Description | Example |
|---|---|---|
| One-to-One (1:1) | One record in Table A matches exactly one record in Table B. | One person has one passport. |
| One-to-Many (1:N) | One record in Table A relates to many records in Table B. Most common relationship. | One teacher has many students. |
| Many-to-Many (M:N) | Multiple records in Table A relate to multiple records in Table B. Requires a junction/bridge table. | Students enrol in many courses; each course has many students. |
In LibreOffice Base, define relationships via Tools โ Relationships.
SQL is the standard language for querying and manipulating relational databases.
| SQL Clause | Purpose | Example |
|---|---|---|
SELECT | Specifies which columns to retrieve | SELECT Name, Age |
FROM | Specifies the table name | FROM Students |
WHERE | Filters rows by a condition | WHERE Age > 15 |
ORDER BY | Sorts results (ASC/DESC) | ORDER BY Name ASC |
GROUP BY | Groups rows for aggregate functions | GROUP BY Class |
HAVING | Filters after GROUP BY | HAVING COUNT(*) > 5 |
Sample SQL:
SELECT Name, Marks FROM Students WHERE Marks >= 80 ORDER BY Marks DESC;
A Form is a graphical interface that allows users to view, enter, and edit records in a database table without seeing the raw table structure.
A Report formats database data into a structured, printable layout (like a printed summary or invoice).
๐ฏ Practice: Try Unit 3 MCQs โ on keys, SQL, and database concepts. Unit 3 carries 10 marks in theory!