Unit 3 of 4 ยท Theory + Practical

Database Management โ€“ DBMS

DBMS concepts, Keys, Relationships, LibreOffice Base: Tables, Forms, Queries, Reports, and SQL basics. Complete notes for CBSE IT 402 Class 10.

๐Ÿ—„๏ธ

DBMS Concepts

Database, DBMS, RDBMS, Tables, Fields, Records.

๐Ÿ”‘

Keys

Primary Key, Foreign Key, Candidate Key โ€” uniqueness rules.

๐Ÿ“‹

Tables

Create, modify tables in Design view or Wizard in LibreOffice Base.

๐Ÿ”

Queries

Retrieve data with criteria. SQL: SELECT, WHERE, ORDER BY.

๐Ÿ“Š

Forms & Reports

Forms: data entry UI. Reports: formatted printable output.

๐Ÿ”—

Relationships

One-to-One, One-to-Many, Many-to-Many between tables.

DBMS Concepts

Database, DBMS, RDBMS

  • Data: Raw, unorganised facts (numbers, text, dates).
  • Information: Processed, meaningful data.
  • Database: An organised collection of related data stored systematically for easy access, retrieval, and management.
  • DBMS (Database Management System): Software that manages databases. Examples: MySQL, Oracle, Microsoft Access, LibreOffice Base.
  • RDBMS (Relational DBMS): A DBMS that stores data in the form of related tables. LibreOffice Base is an RDBMS front-end (uses HSQL engine by default).

Table, Field, Record, Cell

TermDefinitionAnalogy
TableA collection of related data organised in rows and columns.Excel spreadsheet
FieldA column in a table โ€” represents one attribute/characteristic.Column header
RecordA row in a table โ€” represents one complete entry.One row of data
CellThe intersection of a row and column โ€” contains one data value.Individual cell

Database Keys โญ

Types of Keys in a Database

Key TypeDefinitionExample
Primary KeyA field (or combination) that uniquely identifies each record in a table. Cannot be NULL or duplicate.Student_ID in a Students table
Foreign KeyA 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 KeyAny 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 KeyA Primary Key made of two or more fields together.(Student_ID + Subject_ID) in a Marks table

Database Relationships โญ

Types of Relationships

RelationshipDescriptionExample
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.

Queries and SQL โญ

SQL โ€” Structured Query Language

SQL is the standard language for querying and manipulating relational databases.

SQL ClausePurposeExample
SELECTSpecifies which columns to retrieveSELECT Name, Age
FROMSpecifies the table nameFROM Students
WHEREFilters rows by a conditionWHERE Age > 15
ORDER BYSorts results (ASC/DESC)ORDER BY Name ASC
GROUP BYGroups rows for aggregate functionsGROUP BY Class
HAVINGFilters after GROUP BYHAVING COUNT(*) > 5

Sample SQL:

SELECT Name, Marks FROM Students WHERE Marks >= 80 ORDER BY Marks DESC;

Forms and Reports in LibreOffice Base

Forms โ€” Data Entry Interface

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.

  • Create: In Base โ†’ Forms โ†’ Use Wizard to Create Form โ†’ Select table and fields.
  • Forms have controls: Text boxes, Labels, Buttons, Checkboxes, Drop-downs.
  • One-record-at-a-time view makes data entry easier and less error-prone.

Reports โ€” Printable Output

A Report formats database data into a structured, printable layout (like a printed summary or invoice).

  • Create: In Base โ†’ Reports โ†’ Use Wizard to Create Report โ†’ Select fields โ†’ Set grouping and sorting.
  • Reports can group records by a field (e.g., group students by class) and sort them.
  • Reports are ideal for generating board marksheets, attendance lists, or sales summaries.

๐ŸŽฏ Practice: Try Unit 3 MCQs โ†’ on keys, SQL, and database concepts. Unit 3 carries 10 marks in theory!

โ† Unit 2 Next: Unit 4 โ€“ Web & Security โ†’