BORING EDUCATION — LIVE EXPERIMENTProduct is live. Experiments are running. Feedback is being collected. Improvements are underway.Welcome to Boring Education. We're glad you're here while we're figuring out how to make learning better.
BORINGEDUCATION

1.3aFree

Databases: one copy of the truth

Your guide: Miss HiraExplains computers with chai, cricket and your phone.

The problem

Ali changes his phone number. He tells the fee office, which updates its file. The library and the exam branch keep their own files, still with the old number. Next week his roll number slip goes to a phone that no longer exists.

A database fixes this by bringing logically related files together, so one fact is kept once and every program uses that one copy.

A database is a collection of logically related data sets or files: a computerized record-keeping system that keeps information available at any time. Its three objectives are data integration, data integrity and data independence.

Step 1 / 7

Notes, short questions and MCQs

Read the full notes: key terms, model answers and MCQs with answers

The problem

Ali changes his phone number. He tells the fee office, which updates its file. The library and the exam branch keep their own files, still with the old number. Next week his roll number slip goes to a phone that no longer exists.

A database fixes this by bringing logically related files together, so one fact is kept once and every program uses that one copy.

A database is a collection of logically related data sets or files: a computerized record-keeping system that keeps information available at any time. Its three objectives are data integration, data integrity and data independence.

Key terms

Database facilities
Add new blank files; insert new data; retrieve data; update data; delete data; remove whole files, empty or not.
Four components
Data (the information); hardware (storage, I/O devices, controllers, channels, processors, memory); software (programs and utilities); personnel (programmers and analysts, end users, database administrators).
Data integrity
If an item is kept in several files, all of them must be updated when it changes. A database keeps only one copy, so the data stays consistent.
Data independence
Traditionally, changing a file's format means changing every program that uses it. A database lets the data's organization change without re-programming, and programs change without reorganizing data.

Short questions with model answers

  1. Q1. Name the component of a database system: (a) the hard disk, (b) the database administrator, (c) backup utilities, (d) students' marks.

    • (a) hardware
    • (b) personnel
    • (c) software (d) data

    hardware · personnel · software · data

  2. Q2. Name the facility: (a) starting an empty file for a new session, (b) entering new admissions, (c) printing one student's details, (d) dropping an old, unused file.

    • (a) adding a new blank file
    • (b) inserting data (c) retrieving data
    • (d) removing a file

    add file · insert · retrieve · remove file

  3. Q3. Which objective does each show? (a) Fee and exam data stored on two campuses but used as one. (b) A student's CNIC kept once. (c) The disk layout changes and no program is rewritten.

    • (a) data integration
    • (b) data integrity
    • (c) data independence

    integration · integrity · independence

Common mistakes

  • ✗ Writing “data interdependence” as an objective.

    ✓ The book prints “interdependence”, but the idea described is data independence: data and programs can change without forcing each other to change.

  • ✗ Defining a database as one big file.

    ✓ A database is a collection of logically related files, often of different nature and purpose, managed as one system.

  • ✗ Treating “deleting data” and “removing files” as the same facility.

    ✓ Deleting removes data from an existing file. Removing takes a whole file out of the database, empty or otherwise.

MCQs

  1. 1. A collection of logically related data sets or files is a:

    1. (a) record
    2. (b) field
    3. (c) database
    4. (d) transaction file
    Show answer

    (c) That is the book's definition of a database.

  2. 2. Database administrators belong to which component?

    1. (a) data
    2. (b) hardware
    3. (c) software
    4. (d) personnel
    Show answer

    (d) Personnel: programmers/analysts, end users and database administrators.

  3. 3. Keeping only one copy of each data item mainly supports:

    1. (a) data integrity
    2. (b) data integration
    3. (c) data independence
    4. (d) evolvability
    Show answer

    (a) With one copy, no file can disagree with another, so data stays consistent.

  4. 4. Changing how data is organized without re-programming is:

    1. (a) data integrity
    2. (b) data independence
    3. (c) data integration
    4. (d) data capturing
    Show answer

    (b) This is data independence (printed as “interdependence” in 1.3.1).

  5. 5. Taking an entire unused file out of the database is:

    1. (a) deleting data
    2. (b) removing a file
    3. (c) retrieving data
    4. (d) updating data
    Show answer

    (b) Removing works on whole files, empty or otherwise; deleting works on data inside a file.

Quick revision

  • A database is a collection of logically related files, managed as one computerized record-keeping system.
  • A database system has four components: data, hardware, software and personnel.
  • Its objectives are data integration, data integrity (one copy, consistent data) and data independence.