Class 11 Informatics Practices Chapter 08 Β· 18 min read

πŸ—„οΈ Database Concepts

Unit 3 Β· Ch 8 Sep 30, 2026
Chapter Quiz

Your school stores the details of thousands of students β€” names, classes, fees, marks, attendance. 🏫 Your bank stores every rupee you deposit, and a railway website stores lakhs of bookings every day. πŸš† Where does all this data live, and how is it kept correct, safe and quick to find? The answer is a database! This chapter answers the BIG questions: What problems happen when data is kept in ordinary files? What is a database and a DBMS? What is a relation, a tuple, an attribute and a domain? And what are primary, candidate, alternate and foreign keys? Let's get organised! πŸ—„οΈ

πŸ’‘ How to use these notes

The most tested topics are limitations of the file system, advantages of a DBMS, relational model terms (relation, attribute, tuple, domain, degree, cardinality), and keys β€” especially "identify the primary, candidate and alternate keys in this table". Practise finding degree and cardinality on every table you see!


8.1 🏁 Introduction β€” Why Do We Need a Database?

Before computers, schools kept records in registers. πŸ“’ Later, people started keeping data in computer files β€” a separate file for every job. This is called a file system.

Imagine a school where the office, the library and the exam cell each keep their own file of students:

  πŸ“ Office file           πŸ“ Library file          πŸ“ Exam file
  ───────────────          ────────────────         ─────────────
  Roll, Name, Address      Roll, Name, Address      Roll, Name, Marks
  101, Riya, Salt Lake     101, Riya, Salt Lake     101, Riya, 92
  102, Aman, Howrah        102, Aman, Park St ❗    102, Amann ❗, 85

Can you spot the problems? Aman's address is different in two files, and his name is misspelt in the third! 😬

8.1.1 Limitations of the File System ⚠️

πŸ“‘

Data Redundancy

The SAME data is stored again and again in many files β€” wasting space

Duplication
❓

Data Inconsistency

Copies of the same data don't match β€” which one is correct?

Mismatch
πŸ”’

Data Isolation

Data is scattered in different files and formats β€” hard to bring together

Scattered
πŸ”

Difficult Access

A new question (like "students with fees due") needs a NEW program to be written

No easy search
πŸ‘₯

Poor Sharing

It's hard for many people to use the same file at the same time

No sharing
πŸ›‘οΈ

Weak Security

Anyone who opens the file can see or change everything

Not safe
🧠 Memory Trick: "RIDDS" 🧠

Redundancy, Inconsistency, Data isolation, Difficult access, Security and sharing problems β€” the file system gives you RIDDS (riddles) to solve!

πŸ“‹ Typical question

"What is data redundancy? How does it lead to data inconsistency?" β€” 2 marks Answer: Data redundancy means the same data is stored in more than one place. When the data is changed in one place but not in the others, the copies no longer match β€” this is data inconsistency. For example, if a student's address is updated only in the office file and not in the library file, the two files show different addresses.


8.2 πŸ—„οΈ Database and DBMS

A database is an organised collection of related data, stored so that it can be easily accessed, managed and updated.

A DBMS (Database Management System) is the software that lets us create, store, update, search and protect the data in a database.

graph LR
    U1["πŸ§‘β€πŸ’Ό Office"]
    U2["πŸ“š Library"]
    U3["πŸ“ Exam Cell"]
    DBMS["βš™οΈ DBMS\n(MySQL, Oracle…)"]
    DB[("πŸ—„οΈ ONE shared\nDatabase")]

    U1 --> DBMS
    U2 --> DBMS
    U3 --> DBMS
    DBMS <--> DB

    style DBMS fill:#FF9800,color:#fff
    style DB fill:#2196F3,color:#fff

Now everyone uses the same single copy of the data β€” so there is no duplication and no mismatch!

Analogy: A database is like a big library full of books (data). πŸ“š The DBMS is the librarian πŸ‘©β€πŸ’Ό β€” she keeps the books in order, finds any book you ask for in seconds, lets many people borrow books, and makes sure no one takes a book without permission!

Popular DBMS software:

🐬

MySQL

Free and open source β€” used in this course and by many websites

Open source
πŸ”Ά

Oracle

Used by big companies and banks

Commercial
πŸͺŸ

Microsoft SQL Server

Popular in offices using Microsoft products

Commercial
🐘

PostgreSQL

Free and powerful

Open source
πŸͺΆ

SQLite

Tiny DBMS built into mobile apps and browsers

Lightweight

8.2.1 Advantages of a DBMS βœ…

Advantage Meaning
Less redundancy Data is stored once in one place, so duplication is reduced
Consistency With one copy, there is no mismatch between copies
Easy sharing Many users and programs can use the data at the same time
Security Passwords and permissions decide who can see or change what
Integrity Rules (constraints) keep wrong data out β€” e.g. marks can't be negative
Easy access Any question can be answered using simple queries (SQL)
Backup and recovery Data can be backed up and restored after a failure
πŸ“‹ Typical question

"Write any three advantages of a DBMS over a file system." β€” 3 marks Answer: (1) Reduced redundancy β€” data is stored only once, avoiding duplication. (2) Data consistency β€” since there is a single copy, all users see the same correct data. (3) Data security β€” access to data is controlled using passwords and permissions. (Data sharing, integrity and backup are also correct.)

8.2.2 Where are Databases Used? 🌍

🏦

Banking

Accounts, deposits, loans and transactions

Bank records
πŸš†

Railway / Airline

Seat booking, PNR status and schedules

Reservations
🏫

School

Admissions, fees, attendance and results

Student records
πŸ›οΈ

Online Shopping

Products, orders, payments and deliveries

E-commerce
πŸ₯

Hospital

Patient details, doctors and medicines

Health records

8.3 πŸ“Š The Relational Data Model

The most popular way to organise a database is the relational data model. In it, data is stored in tables, and a table is called a relation.

Here is a relation named STUDENT:

                            β”Œβ”€β”€β”€β”€ Attributes (columns) ────┐
                            β–Ό            β–Ό          β–Ό        β–Ό
                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
  Relation name β†’     β”‚ RollNo  β”‚ Name       β”‚ Class  β”‚ Marks  β”‚  ← heading
  STUDENT             β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
                      β”‚ 101     β”‚ Riya       β”‚ 11     β”‚ 92     β”‚  ◄─┐
                      β”‚ 102     β”‚ Aman       β”‚ 11     β”‚ 85     β”‚  ◄── Tuples
                      β”‚ 103     β”‚ Zoya       β”‚ 12     β”‚ 97     β”‚  ◄── (rows)
                      β”‚ 104     β”‚ Kabir      β”‚ 12     β”‚ 78     β”‚  β—„β”€β”˜
                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

   Degree      = number of attributes (columns) = 4
   Cardinality = number of tuples (rows)       = 4

8.3.1 Important Terms πŸ“–

Term Meaning In the STUDENT table
Relation A table with rows and columns STUDENT
Attribute A column β€” one property of the data RollNo, Name, Class, Marks
Tuple A row β€” one complete record 102, Aman, 11, 85
Domain The set of all allowed values for an attribute Class β†’ {11, 12}; Marks β†’ 0 to 100
Degree The number of attributes (columns) 4
Cardinality The number of tuples (rows) 4
🧠 Memory Trick: "Degree goes Down? NO β€” Degree goes ACROSS!" 🧠

Degree = columns (count across the top). Cardinality = count the rows (going down). Or remember: "C for Count of rows".

Analogy: A relation is like your class attendance register πŸ“’ β€” the column headings (Roll No, Name, Date) are the attributes, and each student's line is a tuple. The domain of the "Present?" column is just {P, A}!

⚠ Degree and cardinality are NOT the same as in maths!

Many students swap them. Degree = columns, Cardinality = rows. Adding a new student changes the cardinality; adding a new column like "Phone" changes the degree.

8.3.2 Properties of a Relation πŸ“

🏷️

Unique Column Names

No two attributes in a table can have the same name

Unique names
🧍

No Duplicate Rows

Two tuples can never be exactly the same

Each row unique
πŸ”€

Order Doesn't Matter

Rows and columns can be in any order β€” the data means the same

Any order
1️⃣

Atomic Values

Each cell holds ONE single value β€” not a list

One value per cell
🚫

NULL for Unknown

A missing or unknown value is stored as NULL

NULL
πŸ“‹ Typical question

"A table ITEM has 5 columns and 20 rows. 3 more rows are added and 1 column is deleted. What are its degree and cardinality now?" β€” 2 marks Answer: Degree = 5 βˆ’ 1 = 4. Cardinality = 20 + 3 = 23.


8.4 πŸ”‘ Keys in a Relation

A key is an attribute (or a group of attributes) used to identify a tuple uniquely or to link two tables.

Let's use this table:

   EMPLOYEE
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ EmpID β”‚ Name    β”‚ AadhaarNo    β”‚ Email               β”‚ DeptNo β”‚
   β”œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
   β”‚ E01   β”‚ Ravi    β”‚ 2345 6789 01 β”‚ ravi@mail.com       β”‚ D1     β”‚
   β”‚ E02   β”‚ Sneha   β”‚ 3456 7890 12 β”‚ sneha@mail.com      β”‚ D2     β”‚
   β”‚ E03   β”‚ Ravi    β”‚ 4567 8901 23 β”‚ ravi.k@mail.com     β”‚ D1     β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

(Name can't identify an employee β€” there are two Ravis! πŸ‘€)

graph TD
    CK["πŸ—οΈ Candidate Keys\n(all columns that can identify\na row uniquely)\nEmpID, AadhaarNo, Email"]
    PK["πŸ”‘ Primary Key\n(the ONE chosen)\nEmpID"]
    AK["πŸ—οΈ Alternate Keys\n(candidates NOT chosen)\nAadhaarNo, Email"]

    CK --> PK
    CK --> AK

    style CK fill:#9C27B0,color:#fff
    style PK fill:#4CAF50,color:#fff
    style AK fill:#FF9800,color:#fff

8.4.1 Candidate Key πŸ—οΈ

A candidate key is any attribute (or set of attributes) that can uniquely identify every tuple. It has no duplicate values and no NULL values. In EMPLOYEE: EmpID, AadhaarNo and Email are candidate keys.

8.4.2 Primary Key πŸ”‘

The primary key is the one candidate key chosen by the database designer to identify tuples. It must be unique and NOT NULL. A table has only one primary key. In EMPLOYEE: EmpID is chosen as the primary key.

8.4.3 Alternate Key πŸ”

The candidate keys that are not chosen as the primary key are called alternate keys. In EMPLOYEE: AadhaarNo and Email are alternate keys.

πŸ”‘ The key formula

Candidate keys = Primary key + Alternate keys So, Alternate keys = Candidate keys βˆ’ Primary key.

Analogy: A class wants to elect a monitor πŸ§‘β€πŸŽ“. All students who are eligible are the candidates (candidate keys). The one who wins becomes the monitor (primary key). Those who lost are the alternates (alternate keys) β€” still good, just not chosen!

8.4.4 Foreign Key πŸ”—

A foreign key is an attribute in one table that refers to the primary key of another table. It is used to link (relate) two tables.

   EMPLOYEE (child table)                        DEPARTMENT (parent table)
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ EmpID β”‚ Name  β”‚ DeptNo β”‚ ───── refers to ──►│ DeptNo β”‚ DeptName    β”‚
   β”œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€                    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
   β”‚ E01   β”‚ Ravi  β”‚ D1     β”‚                    β”‚ D1     β”‚ Sales       β”‚
   β”‚ E02   β”‚ Sneha β”‚ D2     β”‚                    β”‚ D2     β”‚ Accounts    β”‚
   β”‚ E03   β”‚ Ravi  β”‚ D1     β”‚                    β”‚ D3     β”‚ HR          β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               DeptNo = FOREIGN KEY                   DeptNo = PRIMARY KEY
  • DeptNo is the primary key of DEPARTMENT.
  • DeptNo in EMPLOYEE is a foreign key β€” it can only have values that exist in DEPARTMENT (D1, D2, D3), or NULL.
  • A foreign key can repeat (two employees can be in D1).
⚠ A foreign key does NOT have to be unique!

Many employees can belong to the same department, so D1 can appear many times in EMPLOYEE. Only the primary key it refers to (in DEPARTMENT) must be unique.

🧠 Memory Trick 🧠

A foreign key is a "foreigner" 🧳 β€” it lives in one table but actually belongs to (comes from) the primary key of another table!

Key Unique? NULL allowed? How many per table?
Candidate key Yes No One or more
Primary key Yes No Exactly one
Alternate key Yes No Zero or more
Foreign key Not needed Yes Zero or more
πŸ“‹ Typical question

"In the table STUDENT(AdmNo, RollNo, Name, Phone), AdmNo and Phone are unique for every student, and AdmNo is used to identify students. Identify the candidate, primary and alternate keys." β€” 3 marks Answer: Candidate keys: AdmNo, Phone. Primary key: AdmNo. Alternate key: Phone. (RollNo is not a candidate key if two students in different classes can have the same roll number.)


8.5 🧾 A Complete Example

Let's put everything together with two related tables.

   BOOK                                             MEMBER
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ BookID β”‚ Title              β”‚ MemberID β”‚        β”‚ MemberID β”‚ Name   β”‚ Phone       β”‚
   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
   β”‚ B1     β”‚ Wings of Fire      β”‚ M2       β”‚        β”‚ M1       β”‚ Asha   β”‚ 98300 11111 β”‚
   β”‚ B2     β”‚ Python Basics      β”‚ NULL     β”‚        β”‚ M2       β”‚ Rohit  β”‚ 98300 22222 β”‚
   β”‚ B3     β”‚ Malgudi Days       β”‚ M2       β”‚        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Question Answer
Degree of BOOK 3
Cardinality of BOOK 3
Degree and cardinality of MEMBER 3 and 2
Primary key of BOOK BookID
Candidate keys of MEMBER MemberID, Phone
Primary and alternate key of MEMBER MemberID (primary), Phone (alternate)
Foreign key MemberID in BOOK β€” refers to MEMBER
Why is NULL allowed in BOOK.MemberID? Book B2 is not issued to anyone yet

⚠️ Common Errors and Misconceptions

Mistake What's Wrong Correct Understanding
"Database and DBMS are the same" One is data, the other is software Database = the data; DBMS = software that manages it
"Degree = number of rows" Swapped Degree = columns, Cardinality = rows
"Redundancy and inconsistency are the same" One causes the other Redundancy (duplicates) leads to inconsistency (mismatch)
"A table can have two primary keys" Only one is chosen Exactly one primary key (it may have several columns)
"Primary key can be NULL if unknown" Must always have a value Primary key is unique and NOT NULL
"Foreign key must be unique" It can repeat Foreign key can have duplicates and NULLs
"Name is a good primary key" Two people can share a name Use something unique, like an ID
"Alternate key is a backup copy of the table" It's a key, not a copy Alternate key = candidate key not chosen as primary
"Domain is the table name" Domain is about allowed values Domain = set of permitted values of an attribute
"Adding a row changes the degree" Rows change cardinality New row β†’ cardinality changes; new column β†’ degree changes

πŸ”‘ Quick Revision β€” Exam Ready!

  • File system problems β†’ Redundancy, Inconsistency, Data isolation, Difficult access, Security and sharing issues (RIDDS)
  • Database β†’ organised collection of related data
  • DBMS β†’ software to create, manage, share and protect a database (MySQL, Oracle, SQL Server, PostgreSQL, SQLite)
  • DBMS advantages β†’ less redundancy, consistency, sharing, security, integrity, easy access, backup
  • Relational model β†’ data stored in tables called relations
  • Attribute = column; Tuple = row; Domain = set of allowed values
  • Degree = number of columns; Cardinality = number of rows
  • Relation properties β†’ unique column names, no duplicate rows, order doesn't matter, atomic values, NULL for unknown
  • Candidate key β†’ every attribute set that can uniquely identify a row (unique, not NULL)
  • Primary key β†’ the ONE candidate key chosen (unique, not NULL, one per table)
  • Alternate key β†’ candidate keys not chosen as primary
  • Candidate = Primary + Alternate
  • Foreign key β†’ attribute that refers to the primary key of another table; links tables; can repeat and can be NULL

🎯 Sample Exam Questions

Q1: Very Short Answer [1 mark each]

a) What is a row of a relation called? Answer: Tuple

b) What is the number of columns in a relation called? Answer: Degree

c) Name any two DBMS software. Answer: MySQL and Oracle

d) What is the set of permitted values of an attribute called? Answer: Domain

e) Which key is used to link two tables? Answer: Foreign key

Q2: Short Answer [2 marks]

Differentiate between a database and a DBMS.

Answer: A database is an organised collection of related data, such as the records of all students of a school. A DBMS is the software used to create, store, update, search and protect that data β€” e.g. MySQL.

Q3: Short Answer [2 marks]

Define degree and cardinality. Find them for a table with columns (Code, Item, Price, Qty) containing 12 records.

Answer: Degree is the number of attributes (columns) of a relation, and cardinality is the number of tuples (rows). Here, Degree = 4 and Cardinality = 12.

Q4: Short Answer [3 marks]

Consider the table CUSTOMER:

   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ CustID β”‚ Name   β”‚ Email            β”‚ City        β”‚
   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
   β”‚ C1     β”‚ Meena  β”‚ meena@mail.com   β”‚ Pune        β”‚
   β”‚ C2     β”‚ Arjun  β”‚ arjun@mail.com   β”‚ Delhi       β”‚
   β”‚ C3     β”‚ Meena  β”‚ m.j@mail.com     β”‚ Pune        β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

(a) Identify the candidate keys. (b) If CustID is the primary key, which is the alternate key? (c) Why can't Name be a key?

Answer: (a) Candidate keys: CustID and Email (both are unique for every row). (b) Alternate key: Email. (c) Name has duplicate values (two customers named Meena), so it cannot identify a row uniquely.

Q5: Short Answer [3 marks]

What is a foreign key? Explain with an example of two tables.

Answer: A foreign key is an attribute of one table that refers to the primary key of another table; it is used to link the two tables. For example, in STUDENT(RollNo, Name, ClassID) and CLASS(ClassID, ClassTeacher), ClassID is the primary key of CLASS and a foreign key in STUDENT. Every ClassID in STUDENT must exist in CLASS (or be NULL), and it can repeat, since many students belong to the same class.


✏️ Practice Problems

  1. List any four limitations of keeping data in ordinary files.
  2. What is data inconsistency? Give an example from your school.
  3. Explain the role of a DBMS using the "librarian" analogy.
  4. Draw a table BOOK with 4 attributes and 5 tuples. Write its degree and cardinality.
  5. A relation has degree 6 and cardinality 30. Two columns are added and 5 rows are deleted. What are the new degree and cardinality?
  6. What is a domain? Give the domain of the attributes Gender, Class (for a senior secondary school) and Marks (out of 100).
  7. Why must a primary key be unique and NOT NULL?
  8. In PATIENT(PatientID, Name, Phone, BedNo, DoctorID), identify a suitable primary key, the alternate keys, and a possible foreign key.
  9. Can a table have more than one candidate key? More than one primary key? Explain.
  10. Differentiate between a primary key and a foreign key (any three points).
  11. Why is "Name" usually a poor choice for a primary key?
  12. Give two examples each of how databases are used in a bank and in a hospital.
Learning Support

Need Help With This Chapter?

Save key topics for exam revision, ask questions to teachers, or submit content corrections.

Verified Doubts & Teacher Answers

Take the Chapter 08 Quiz