Docsity

Computer Science — Database Systems. Database Design, SQL, Normalization, Transaction/SECU, Exams of Computer Science

Toggle sidebar
bg1
DATABASE SYSTEMS PRACTICE EXAMINATION.
Database Design, SQL, Normalization, Transactions, and
Security.
Computer Science — Database Systems.
Questions and Answers
1. What is a database?
Answer: A database is an organized collection of related data that can be stored,
accessed, managed, updated, and analyzed.
2. What is a database management system?
Answer: A database management system is software used to define, create, store,
retrieve, update, secure, and manage data in a database.
3. State two limitations of traditional file-processing systems.
Answer: File-processing systems may cause data duplication, inconsistency,
difficult data access, weak security, poor sharing, and program-data dependence.
4. What is data redundancy?
Answer: Data redundancy is unnecessary duplication of the same data in multiple
locations.
5. What is data inconsistency?
Answer: Data inconsistency occurs when duplicate copies of data contain different
or conflicting values.
6. What is data independence?
Answer: Data independence is the ability to change the database schema at one
level without requiring changes at higher levels or application programs.
7. What are the three levels of database architecture?
pf3
pf4
pf5

Partial preview of the text

Download Computer Science — Database Systems. Database Design, SQL, Normalization, Transaction/SECU and more Exams Computer Science in PDF only on Docsity!

DATABASE SYSTEMS PRACTICE EXAMINATION.

Database Design, SQL, Normalization, Transactions, and

Security.

Computer Science — Database Systems.

Questions and Answers

  1. What is a database? Answer: A database is an organized collection of related data that can be stored, accessed, managed, updated, and analyzed.
  2. What is a database management system? Answer: A database management system is software used to define, create, store, retrieve, update, secure, and manage data in a database.
  3. State two limitations of traditional file-processing systems. Answer: File-processing systems may cause data duplication, inconsistency, difficult data access, weak security, poor sharing, and program-data dependence.
  4. What is data redundancy? Answer: Data redundancy is unnecessary duplication of the same data in multiple locations.
  5. What is data inconsistency? Answer: Data inconsistency occurs when duplicate copies of data contain different or conflicting values.
  6. What is data independence? Answer: Data independence is the ability to change the database schema at one level without requiring changes at higher levels or application programs.
  7. What are the three levels of database architecture?

Answer: The three levels are the external or view level, conceptual or logical level, and internal or physical level.

  1. What is the external level? Answer: The external level describes individual user views of the database.
  2. What is the conceptual level? Answer: The conceptual level describes the overall logical structure of the entire database. 10.What is the internal level? Answer: The internal level describes how data is physically stored and accessed. 11.What is an entity? Answer: An entity is a distinct real-world object, person, place, event, or concept about which data is stored. 12.What is an attribute? Answer: An attribute is a property or characteristic describing an entity. 13.What is an entity-relationship diagram? Answer: An entity-relationship diagram represents entities, attributes, relationships, and cardinalities in a database design. 14.What is a relationship? Answer: A relationship is an association between two or more entities. 15.What is cardinality? Answer: Cardinality specifies how many instances of one entity may or must be associated with instances of another entity. 16.What is a one-to-one relationship?

25.What is a candidate key? Answer: A candidate key is a minimal attribute set capable of uniquely identifying each row in a relation. 26.What is a foreign key? Answer: A foreign key is an attribute or set of attributes that references a key in another table to establish a relationship. 27.What is referential integrity? Answer: Referential integrity requires every foreign-key value to match a referenced key value or be null where permitted. 28.What is relational algebra? Answer: Relational algebra is a procedural query language using operations such as selection, projection, union, difference, product, and join. 29.What does the selection operation do? Answer: Selection filters rows according to a specified condition. 30.What does the projection operation do? Answer: Projection selects particular columns from a relation and may remove duplicate rows. 31.What is SQL? Answer: SQL, or Structured Query Language, is used to define, manipulate, query, control, and manage relational databases. 32.What is the purpose of the SQL SELECT statement? Answer: SELECT retrieves specified data from one or more tables or views. 33.What is a SQL JOIN? Answer: A JOIN combines rows from two or more tables using a related column or condition.

34.What is the difference between an inner join and an outer join? Answer: An inner join returns matching rows, while an outer join can also return unmatched rows from one or both tables. 35.What is the purpose of GROUP BY in SQL? Answer: GROUP BY groups rows with common values so aggregate functions can be applied to each group. 36.Name four common SQL aggregate functions. Answer: COUNT, SUM, AVG, MIN, and MAX are common aggregate functions. 37.What is a subquery? Answer: A subquery is a query nested inside another SQL statement. 38.What is a view? Answer: A view is a virtual table defined by a query and based on one or more underlying tables. 39.What is a functional dependency? Answer: A functional dependency exists when one attribute or set of attributes determines the value of another attribute or set of attributes. 40.What is normalization? Answer: Normalization organizes tables to reduce redundancy, prevent anomalies, and improve data integrity. 41.What is first normal form? Answer: A relation is in first normal form when each field contains atomic values and repeating groups are removed. 42.What is second normal form? Answer: A relation is in second normal form when it is in first normal form and every non-key attribute depends on the whole candidate key.