Ch 7 introduces database management systems (DBMS) — the relational model, tables, keys, relationships, and fundamental concepts needed before learning SQL.
Database: organised collection of related data. DBMS: software to create, manage, and query databases (MySQL, PostgreSQL, Oracle, SQLite). Advantages over file system: reduced redundancy, data integrity, concurrent access, security, backup/recovery. Relational model: data stored in tables (relations). Table= Relation, Row = Tuple (record), Column = Attribute (field), Domain = set of allowed values for an attribute. Degree: number of columns. Cardinality: number of rows.
Primary Key: uniquely identifies each row — no NULLs, no duplicates. Candidate Key: any attribute that COULD be primary key. Alternate Key: candidate keys not chosen as primary. Foreign Key: attribute in one table that references the primary key of another — creates relationships. Types of relationships: one-to-one, one-to-many, many-to-many. Referential integrity: foreign key values must exist in referenced table. Normalisation basics: 1NF (no repeating groups), 2NF (no partial dependency), 3NF (no transitive dependency) — reduces redundancy.
Download: https://ncert.nic.in/textbook/pdf/lecs107.pdf | Complete Book: https://ncert.nic.in/textbook/pdf/lecs1ps.zip
Primary Key: uniquely identifies each record in its OWN table. Rules: must be unique, cannot be NULL. Example: StudentID in Students table. Foreign Key: a column in one table that references the primary key of ANOTHER table — establishing a relationship. Can have duplicates, can be NULL (if relationship is optional). Example: ClassID in Students table referencing ClassID in Classes table. The primary key ensures identity within a table; the foreign key ensures consistency between tables (referential integrity).
Book a Trial + Diagnostic session. Get a personalized Learning Path with clear milestones, tutor match, and a plan recommendation — all within 24 hours.
Book Trial + Diagnostic →