Data Processing Second Term Examination SS 2 Questions

DATA PROCESSING SS 2 SECOND TERM EXAMINATION

OBJECTIVE QUESTIONS

  1. In a database, data is organized into simple ___
    a) Tables
    b) Rows
    c) Columns
    d) Type

  2. A data model is a ___ representation of the data structure required by a database.
    a) Logical
    b) Conceptual
    c) Physical
    d) Dynamic

  3. The following is NOT a step in the design process:
    a) Planning
    b) Logical design
    c) Survey
    d) Implementation

  4. In a database, data is stored in ___
    a) File system
    b) Database structure
    c) Sequential files
    d) Flat files

  5. A table design consists of how many fields?
    a) One field
    b) Two fields
    c) Three fields
    d) Multiple fields

  6. Creating a Query, you choose the following from the New Query dialog box:
    a) Creating query wizard
    b) Design view
    c) Simple query wizard
    d) None of the above

  7. To select all fields to be added to a generated form, click:
    a) >>
    b) <
    c) >
    d) <<

  8. To create a new table in design view, choose the following menu item:
    a) Table ; New table
    b) View ; New table
    c) Insert ; New table
    d) All of the above

  9. Which of the following is NOT an option in database view?
    a) Table
    b) Query
    c) Form view
    d) None of the above

  10. Foreign key is a field in a relational table that matches a ___ of another table.
    a) Candidate key
    b) Row
    c) Field
    d) None of the above

  11. Each value of the primary key uniquely identifies one ___ of the table.
    a) Column
    b) Row
    c) Field
    d) None of the above

  12. The ___ the normal form applicable to a table, the less vulnerable it is to inconsistencies and anomalies.
    a) Better
    b) Lower
    c) Higher
    d) None of the above

  13. A set of tools and procedures for applying the tools that specify the notation used within the organization is called ___.
    a) Database
    b) Database Management System
    c) Database Design
    d) None of the above

  14. To transform a relationship into an entity on an ERD, we use a special symbol called ___.
    a) Entity
    b) Attribute
    c) Associative entity
    d) None of the above

  15. A database can be represented as an ERD (Entity Relationship Diagram).
    a) True
    b) False

  16. An ERD is a diagram that shows all the entities, relationships, and attributes in a database system.
    a) True
    b) False

  17. To define or create an attribute, we must first define a table.
    a) True
    b) False

  18. The primary function of a foreign key in a relational database is to ___.
    a) Ensure data consistency
    b) Increase speed of the database
    c) Remove duplicate records
    d) Act as a primary key

  19. A candidate key is a ___.
    a) Unique identifier of a record
    b) Column that contains duplicate values
    c) Foreign key
    d) Non-unique field

  20. Which clause is used to filter records in a database query?
    a) SELECT
    b) ORDER BY
    c) WHERE
    d) FROM

  21. The ORDER BY clause in SQL is used to ___.
    a) Filter results
    b) Sort query results
    c) Join tables
    d) Update a record

  22. A table consists of ___.
    a) Rows and columns
    b) Keys and values
    c) Databases and queries
    d) None of the above

  23. The process of designing a database involves ___.
    a) Normalization
    b) Fragmentation
    c) Decryption
    d) Compilation

  24. Which of the following is NOT an entity type?
    a) Student
    b) Teacher
    c) Database
    d) Class

  25. What is an associative entity?
    a) A weak entity
    b) A relationship with attributes
    c) A derived entity
    d) A key constraint

  26. Which data type is used for storing text in a database?
    a) Integer
    b) Varchar
    c) Float
    d) Boolean

  27. A composite key is ___.
    a) A single column used as a key
    b) A combination of two or more columns
    c) An alternative key
    d) A foreign key

  28. The process of structuring data to minimize redundancy is called ___.
    a) Data cleaning
    b) Normalization
    c) Indexing
    d) Query optimization

  29. A view in a database is ___.
    a) A virtual table
    b) A physical table
    c) A stored function
    d) A database constraint

  30. The purpose of indexing in a database is to ___.
    a) Store more records
    b) Speed up query processing
    c) Secure data
    d) Generate reports


PART B – THEORY QUESTIONS (Evaluation Questions)

  1. Define a standard data model and give two examples.

  2. Explain the process of designing a data model in database management.

  3. List and explain the steps involved in designing a data model.

  4. What is a primary key and why is it important in a database?

  5. Explain the use of foreign keys in relational databases.

  6. Define candidate keys and explain how they differ from primary keys.

  7. What is a query in database management? Provide an example.

  8. What elements can we break a SELECT statement into in SQL?

  9. Differentiate between the WHERE Clause and the ORDER BY Clause in SQL queries.

  10. Define the following terms:
    a) Entities
    b) Attributes
    c) Associative entities


DATA PROCESSING SS2 SECOND TERM EXAMINATION

OBJECTIVE QUESTIONS EXPLAINED ANSWERS

  1. In a database, data is organized into simple ___
    Answer: (a) Tables
    Explanation: Data in a database is structured into tables, which consist of rows (records) and columns (fields). Tables help in organizing and retrieving data efficiently.

  2. A data model is a ___ representation of the data structure required by a database.
    Answer: (a) Logical
    Explanation: A data model provides a logical structure of how data should be stored, organized, and accessed in a database.

  3. The following is NOT a step in the design process:
    Answer: (c) Survey
    Explanation: The design process includes planning, logical design, and implementation. Surveying is not typically a direct step in database design.

  4. In a database, data is stored in ___
    Answer: (b) Database structure
    Explanation: Data is stored in a structured format within a database, ensuring efficient retrieval and management.

  5. A table design consists of how many fields?
    Answer: (d) Multiple fields
    Explanation: A table consists of multiple fields (columns), each representing a specific data attribute.

  6. Creating a Query, you choose the following from the New Query dialog box:
    Answer: (c) Simple query wizard
    Explanation: The Simple Query Wizard helps users create queries quickly by selecting fields from tables.

  7. To select all fields to be added to a generated form, click:
    Answer: (a) >>
    Explanation: The >> button in form creation selects all available fields from the table.

  8. To create a new table in design view, choose the following menu item:
    Answer: (a) Table ; New table
    Explanation: In most database systems, creating a new table starts from the “Table” menu, selecting “New Table.”

  9. Which of the following is NOT an option in database view?
    Answer: (d) None of the above
    Explanation: All the options—Table, Query, and Form View—are part of database views.

  10. Foreign key is a field in a relational table that matches a ___ of another table.
    Answer: (a) Candidate key
    Explanation: A foreign key references a candidate key in another table, ensuring relational integrity.

  11. Each value of the primary key uniquely identifies one ___ of the table.
    Answer: (b) Row
    Explanation: A primary key uniquely identifies each row (record) in a table.

  12. The ___ the normal form applicable to a table, the less vulnerable it is to inconsistencies and anomalies.
    Answer: (c) Higher
    Explanation: Higher normal forms (such as 3NF and BCNF) reduce data redundancy and improve data integrity.

  13. A set of tools and procedures for applying the tools that specify the notation used within the organization is called ___.
    Answer: (c) Database Design
    Explanation: Database design involves creating the structure, relationships, and constraints for an efficient database.

  14. To transform a relationship into an entity on an ERD, we use a special symbol called ___.
    Answer: (c) Associative entity
    Explanation: An associative entity is used to convert a relationship into an entity in an ER diagram.

  15. A database can be represented as an ERD (Entity Relationship Diagram).
    Answer: (a) True
    Explanation: ERDs visually represent database entities and relationships.

  16. An ERD is a diagram that shows all the entities, relationships, and attributes in a database system.
    Answer: (a) True
    Explanation: ERDs provide a clear structure of database relationships.

  17. To define or create an attribute, we must first define a table.
    Answer: (a) True
    Explanation: Attributes (columns) belong to tables; thus, a table must exist before attributes can be defined.

  18. The primary function of a foreign key in a relational database is to ___.
    Answer: (a) Ensure data consistency
    Explanation: A foreign key maintains data consistency by enforcing relationships between tables.

  19. A candidate key is a ___.
    Answer: (a) Unique identifier of a record
    Explanation: A candidate key can uniquely identify a record and can be chosen as a primary key.

  20. Which clause is used to filter records in a database query?
    Answer: (c) WHERE
    Explanation: The WHERE clause is used in SQL to filter records based on conditions.

  21. The ORDER BY clause in SQL is used to ___.
    Answer: (b) Sort query results
    Explanation: The ORDER BY clause sorts query results in ascending or descending order.

  22. A table consists of ___.
    Answer: (a) Rows and columns
    Explanation: Tables store data in a structured format with rows (records) and columns (fields).

  23. The process of designing a database involves ___.
    Answer: (a) Normalization
    Explanation: Normalization helps in structuring data to minimize redundancy and improve consistency.

  24. Which of the following is NOT an entity type?
    Answer: (c) Database
    Explanation: Entities represent real-world objects (e.g., Student, Teacher, Class), while a database is a collection of entities.

  25. What is an associative entity?
    Answer: (b) A relationship with attributes
    Explanation: An associative entity represents a relationship that contains attributes.

  26. Which data type is used for storing text in a database?
    Answer: (b) Varchar
    Explanation: The VARCHAR data type stores text of variable length.

  27. A composite key is ___.
    Answer: (b) A combination of two or more columns
    Explanation: A composite key consists of multiple columns that together uniquely identify a record.

  28. The process of structuring data to minimize redundancy is called ___.
    Answer: (b) Normalization
    Explanation: Normalization reduces data duplication and ensures data integrity.

  29. A view in a database is ___.
    Answer: (a) A virtual table
    Explanation: A view is a stored query that acts as a virtual table.

  30. The purpose of indexing in a database is to ___.
    Answer: (b) Speed up query processing
    Explanation: Indexing improves the speed of data retrieval operations.


PART B – THEORY QUESTIONS WITH EXPERT EXPLANATIONS

  1. Define a standard data model and give two examples.

    • A standard data model is a structured framework that defines how data is stored, organized, and manipulated in a database system.
    • Examples:
      1. Relational Data Model – Organizes data into tables with relationships between them.
      2. Hierarchical Data Model – Organizes data in a tree-like structure.
  2. Explain the process of designing a data model in database management.

    • Identify business requirements.
    • Define entities, attributes, and relationships.
    • Draw an Entity-Relationship Diagram (ERD).
    • Normalize data to reduce redundancy.
    • Implement the schema in a Database Management System.
  3. List and explain the steps involved in designing a data model.

    • Requirement analysis – Understand what data needs to be stored.
    • Conceptual design – Create an ERD.
    • Logical design – Define tables and relationships.
    • Normalization – Remove redundancy.
    • Physical design – Implement the database.
  4. What is a primary key and why is it important?

    • A primary key uniquely identifies each record in a table.
    • Importance: Ensures data integrity and prevents duplicate records.
  5. Explain the use of foreign keys in relational databases.

    • A foreign key links records between tables to maintain relationships and ensure referential integrity.
  6. Define candidate keys and explain how they differ from primary keys.

    • A candidate key is any column that can be a primary key.
    • The primary key is the chosen candidate key.

7. What is a query in database management? Provide an example.

A query is a request to retrieve or manipulate data in a database. It allows users to filter, sort, and update records efficiently.

Example (SQL Query to retrieve all employees with a salary above 50,000):

sql
SELECT * FROM Employees WHERE Salary > 50000;

8. What elements can we break a SELECT statement into in SQL?

  1. SELECT – Specifies columns to retrieve.
  2. FROM – Identifies the table.
  3. WHERE – Filters records based on conditions.
  4. ORDER BY – Sorts the results.
  5. GROUP BY – Groups records based on a column.

Example:

sql
SELECT Name, Salary FROM Employees WHERE Salary > 50000 ORDER BY Salary DESC;

9. Differentiate between the WHERE Clause and the ORDER BY Clause in SQL queries.

Feature WHERE Clause ORDER BY Clause
Purpose Filters records Sorts records
Usage Specifies conditions Defines sorting order
Example WHERE Salary > 50000 ORDER BY Name ASC

Example Query:

sql
SELECT * FROM Employees WHERE Salary > 50000 ORDER BY Name ASC;

10. Define the following terms:

a) Entities:

Entities are objects or things in a database that store information.
Example: Students, Employees, Cars.

b) Attributes:

Attributes are characteristics or properties of an entity.
Example: A Student Entity has attributes like Name, Age, Grade.

c) Associative Entities:

An associative entity is a relationship that has attributes. It is used in many-to-many relationships.
Example:

  • A “Course Registration” entity linking Students and Courses in a university database.

Conclusion

This examination covers core database concepts, ensuring students understand data modeling, normalization, SQL queries, and relational database principles.