Database = organised data. DBMS = software that manages the database.
- A database stores organised data; a DBMS manages it.
- A DBMS reduces redundancy and inconsistency and adds security.
Revision notes
The key points, rules to remember, tables and diagrams from all 9 lessons, on one page for quick revision. To keep a copy, use your browser's Print and choose "Save as PDF".
Lesson 1
Database = organised data. DBMS = software that manages the database.
Lesson 2
| Roll | Name | City | Marks |
|---|---|---|---|
| 1 | Asha | Pune | 72 |
| 2 | Ravi | Jaipur | 55 |
| 3 | Meena | Patna | 90 |
| 4 | Imran | Pune | 63 |
Row = record, column = field. Primary key = unique identifier; foreign key = link to another table.
Lesson 3
| Type | Meaning | Example |
|---|---|---|
| One-to-one (1:1) | One record matches exactly one record | One person and one Aadhaar-style ID record |
| One-to-many (1:N) | One record matches many records | One class has many students |
| Many-to-many (M:N) | Many records match many records | Students and subjects: a student takes many subjects and a subject has many students |
1:1, 1:N, M:N. Many-to-many needs a third (junction) table.
Lesson 4
| Roll | Name | City | Marks |
|---|---|---|---|
| 1 | Asha | Pune | 72 |
| 2 | Ravi | Jaipur | 55 |
| 3 | Meena | Patna | 90 |
| 4 | Imran | Pune | 63 |
| Command | Purpose | Example |
|---|---|---|
| SELECT | Read data | SELECT Name FROM Students WHERE Marks > 60; |
| INSERT | Add a record | INSERT INTO Students VALUES (5, 'Kiran', 'Surat', 80); |
| UPDATE | Change a record | UPDATE Students SET Marks = 58 WHERE Roll = 2; |
| DELETE | Remove records | DELETE FROM Students WHERE Roll = 4; |
SELECT reads, INSERT adds, UPDATE changes, DELETE removes; WHERE picks the rows.
Lesson 5
| Role | Job |
|---|---|
| Database administrator (DBA) | Controls, secures and maintains the database |
| Application programmer | Writes programs that use the database |
| End user | Uses the data through forms and reports |
Integrity keeps data correct, authorisation limits actions, backups allow recovery.
Lesson 6
| Model | Shape | Parents per child | Example picture |
|---|---|---|---|
| Hierarchical | Tree | One | Folders inside folders; school to class to student |
| Network | Web | Many | A student in several clubs |
| Relational | Tables | Not applicable; linked by keys | Student table linked to Class table |
| NoSQL | Documents, key-value or graph | Depends on the type | A profile stored as one flexible document |
Tree = hierarchical, web = network, tables = relational, flexible non-table stores = NoSQL.
Lesson 7
| Data type | Holds | Example field |
|---|---|---|
| Text (string, CHAR/VARCHAR) | Letters, digits and symbols treated as text | Name, address, phone number |
| Integer | Whole numbers | Number of copies, age |
| Decimal / Float | Numbers with a fractional part | Price, percentage |
| Date / Time | Calendar dates and times | Date of birth, date of issue |
| Boolean (Yes/No) | Only two values: true or false | Fees paid? |
| Currency | Money amounts with fixed decimals | Fee amount |
| AutoNumber | A number the system increases by itself | Record number |
Number type only for values you calculate with. Codes and phone numbers are text.
Lesson 8
WHERE picks rows. AND needs both, OR needs one. % means many characters, _ means one. Never run UPDATE or DELETE without WHERE unless you mean every row.
Lesson 9
Entities become tables, identifiers become primary keys, and links become foreign keys.