Fundamentals of Database Final Exam Reviewer PDF
Document Details
Uploaded by ElatedCalcium
Tags
Summary
This document is a final exam reviewer for a database course. It contains multiple-choice questions about database concepts and relational algebra. The questions cover topics like database types, data models, and SQL commands.
Full Transcript
Fundamentals of Database Final Exam Reviewer Test I – Multiple Choice 1. What is a database? A collection of files and folders B. An organized collection of data stored and accessed electronically C. A computer program for editing text D. A hardware dev...
Fundamentals of Database Final Exam Reviewer Test I – Multiple Choice 1. What is a database? A collection of files and folders B. An organized collection of data stored and accessed electronically C. A computer program for editing text D. A hardware device for storing information Answer: B 2. Which of the following is not a function of a Database Management System (DBMS)? A. Data storage and retrieval B. Data security and integrity C. Managing hardware resources D. Supporting multi-user access Answer: C 3. Which term refers to a characteristic or property of a database entity? A. Record B. Attribute C. Schema D. Tuple Answer: B 4. Which type of database organizes data into tables with rows and columns? A. NoSQL database B. Relational database C. Graph database D. Key-value store Answer: B 5. What is a primary feature of NoSQL databases? A. Data is always stored in tables B. They are optimized for structured data only C. They support flexible, schema-less data models D. They do not support high scalability Answer: C 6. Which of the following is an example of a NoSQL database? A. MySQL B. MongoDB C. PostgreSQL D. SQLite Answer: B 7. MySQL is classified as which type of database? A. Relational database B. Document-oriented database C. Key-value store D. Graph database Answer: A 8. Which of the following is a key feature of MySQL? A. No fixed schema B. Support for relational data models C. Does not allow multi-user access D. Lacks SQL support Answer: B 9. What is the purpose of the MySQL Workbench? A. To write Python code for databases B. To provide a graphical interface for managing MySQL databases C. To host databases on the cloud D. To back up data automatically Answer: B 10. Which command is used to start the MySQL server on the command line? A. mysql server start B. service mysql start C. run mysql D. mysql --run Answer: B 11. What is the primary goal of data modeling? A. To design a program's user interface B. To create a logical structure for storing data C. To test database performance D. To manage server connections Answer: B 12. Which of the following represents a real-world entity in data modeling? A. Attribute B. Entity C. Relationship D. Schema Answer: B 13. What term describes the attributes that uniquely identify a record in a database table? A. Foreign Key B. Candidate Key C. Primary Key D. Composite Key Answer: C 14. In ER modeling, what does a "relationship" represent? A. A set of attributes in an entity B. A connection between two or more entities C. A database query D. A schema design Answer: B 15. What is the term for the number of entities that participate in a relationship? A. Attribute count B. Degree of relationship C. Cardinality D. Entity set Answer: B 16. What type of relationship exists when one entity is related to exactly one instance of another entity? A. One-to-One B. One-to-Many C. Many-to-Many D. Self-referential Answer: A 17. What shape is typically used to represent an entity in an ER diagram? A. Rectangle B. Ellipse C. Diamond D. Circle Answer: A 18. In an ER diagram, which shape represents attributes? A. Rectangle B. Ellipse C. Diamond D. Triangle Answer: B 19. What symbol in an ER diagram represents the primary key of an entity? A. Underlined attribute B. Bolded rectangle C. Double diamond D. Italicized text Answer: A 20. Which of the following is not a key step in designing an ER diagram? A. Identifying entities and attributes B. Defining relationships between entities C. Writing SQL queries D. Determining primary and foreign keys Answer: C 21. What is the primary structure used to store data in the relational model? A. File B. Table C. Graph D. Document Answer: B 22. Which term refers to a single row in a relational table? A. Attribute B. Tuple C. Schema D. Domain Answer: B 23. What is the term for a set of allowable values for an attribute in the relational model? A. Tuple B. Domain C. Relation D. Cardinality Answer: B 24. Which of the following is a basic operation in relational algebra? A. JOIN B. UNION C. SELECT (σ) D. All of the above Answer: D 25. In relational algebra, what does the SELECT (σ) operation do? A. Combines rows from two tables B. Retrieves rows that meet specific conditions C. Projects specific columns from a table D. Removes duplicates from a table Answer: B 26. What relational algebra operation is used to combine columns from two tables? A. UNION B. CARTESIAN PRODUCT (×) C. PROJECT (π) D. INTERSECTION Answer: B 27. How is a one-to-one relationship typically mapped to a relational schema? A. By creating a single table for both entities B. By creating two tables and using a foreign key in either table C. By creating a new table to represent the relationship D. By ignoring the relationship Answer: B 28. What happens when a many-to-many relationship is mapped to a relational schema? A. A foreign key is added to one table B. A new table is created to represent the relationship C. All entities are merged into one table D. The relationship is ignored Answer: B 29. How are attributes of a relationship represented when mapping to a relational schema? A. As columns in the new table for the relationship B. As rows in one of the entity tables C. As separate tables D. As part of the primary key of the relationship table Answer: A 30. When mapping an ER model, what is the rule for a weak entity? A. It is ignored in the schema B. It becomes a separate table with its own primary key C. It becomes a table with a foreign key referring to its strong entity D. It is merged with its strong entity table Answer: C 31. What does SQL stand for? A. Structured Query Language B. Sequential Query Language C. Simple Query Language D. Standard Query Logic Answer: A 32. Which of the following is not a feature of SQL? A. Data retrieval B. Defining data structures C. Sending emails D. Modifying data Answer: C 33. Which SQL command is used to create a new table? A. INSERT B. CREATE C. UPDATE D. ALTER Answer: B 34. What does the ALTER command in SQL do? A. Deletes data from a table B. Modifies the structure of an existing table C. Creates a new database D. Queries data from a table Answer: B 35. What happens when the DROP command is used on a table? A. The table is emptied but remains in the database B. The table and all its data are permanently deleted C. Only the table structure is deleted D. The table is renamed Answer: B 36. Which SQL command is used to add a new row to a table? A. INSERT B. UPDATE C. DELETE D. SELECT Answer: A 37. What does the UPDATE command do in SQL? A. Adds new rows to a table B. Changes existing data in a table C. Deletes a table from the database D. Selects specific columns from a table Answer: B 38. How is data removed from a table using SQL? A. REMOVE B. DELETE C. DROP D. TRUNCATE Answer: B 39. What is the purpose of the SELECT statement in SQL? A. To delete data from a table B. To retrieve data from a database C. To modify data in a table D. To create new tables Answer: B 40. In a basic SQL query, which clause is used to specify the table from which to retrieve data? A. WHERE B. FROM C. SELECT D. JOIN Answer: B 41. What is the primary goal of database normalization? A. To increase the size of the database B. To reduce data redundancy and improve data integrity C. To create as many tables as possible D. To increase the complexity of database queries Answer: B 42. Which of the following is a characteristic of a normalized database? A. Repeated groups of data B. Reduced redundancy C. Complex relationships between tables D. Large single tables with all data Answer: B 43. What is a key requirement for a table to satisfy First Normal Form (1NF)? A. It must have a primary key B. It must not have any repeating groups or arrays C. It must eliminate all transitive dependencies D. It must remove all partial dependencies Answer: B 44. A table is in Second Normal Form (2NF) if: A. It is in 1NF and has no partial dependencies B. It is in 1NF and has no transitive dependencies C. It has only one column D. It contains duplicate rows Answer: A 45. Which condition is required for a table to be in Third Normal Form (3NF)? A. It must be in 2NF and have no transitive dependencies B. It must eliminate all foreign keys C. It must have at least three attributes D. It must use denormalization techniques Answer: A 46. BCNF is a stricter version of which normal form? A. 1NF B. 2NF C. 3NF D. 4NF Answer: C 47. A table violates BCNF when: A. It has no primary key B. It has non-prime attributes that depend on part of a composite key C. A non-trivial functional dependency exists where a determinant is not a candidate key D. It contains duplicate rows Answer: C 48. What is the purpose of denormalization in a database? A. To reduce the number of tables by combining them B. To ensure all data is stored in a single table C. To reduce data redundancy and improve data integrity D. To eliminate the need for foreign keys Answer: A 49. Which of the following is a disadvantage of denormalization? A. Increased data redundancy B. Simplified queries C. Improved read performance D. Reduced table count Answer: A 50. Which scenario is most suitable for applying denormalization? A. When write performance is critical B. When read performance is critical C. When the database is too small D. When there are no relationships between tables Answer: B Test II INSTRUCTIONS: 1. Read the data management situation/problem below and design the necessary ER Diagram model using either Crow’s Foot Notation or Chen. Determine the possible entities and attributes based on the present situation. 2. The designed model should define the following: a. Relationships b. Cardinalities c. Referential Integrity 3. Identify the following in each entity: a. Superkeys – if applicable b. Candidate Keys c. Primary Keys d. Foreign Keys e. Composite Keys SITUATION/PROBLEM Employees work in five (5) different centers. Each center includes One(1) Manager, One(1) Deputy Manager, Three(3) Social Workers. Aside from the five(5) centers, a separate center for administrators is also active. Each center manages 3 children assigned to each social worker. Tasking: Manager – is responsible for monitoring the work/activities done by the social workers. Submit reports Form1, Form2, Form3, & Form4 duly verified. Deputy Manager – in the absence of the Manager, the deputy manager is in-charge. Submit reports Form1, Form2, Form3, & Form4 duly verified in the absence of the manager. Social Workers – Assigned to a specific child. Logs In in the morning and Logs Out in the afternoon. Do work routines in breakfast time, lunch time, and dinner time. Monitors the every activity of the designated child such as time woke-up, breakfast ate, time took a bath, child’s behavior in every activity, etc. Administrator – Receives reports, assigns manager, deputy manager, or social workers to a particular center. Transfers center staff from one center to another if necessary. Activate or deactivate center staff accounts.