1. Home
  2. Explore
  3. Computer Science
  4. Database Design Fundamentals

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Database Design Fundamentals

  • 98Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Database Foundations

What is the broadest definition of a database presented in the content?

98 questions

  1. 1

    What is the broadest definition of a database presented in the content?

    1. A

      A server that stores only user accounts

    2. B

      A program that displays webpages

    3. C

      A spreadsheet used only for calculations

    4. D

      A system that stores data

    Correct answer
    D

    A system that stores data

    Explanation

    A database is broadly defined as something that stores data, where data can be anything that can be stored or written down.

  2. 2

    Why can a website remember a user's username and password between visits?

    1. A

      The front end permanently redraws the same login form

    2. B

      The browser converts the values into spreadsheet columns

    3. C

      The website generates a new account during every visit

    4. D

      The submitted values are stored in a back-end database

    Correct answer
    D

    The submitted values are stored in a back-end database

    Explanation

    Registration values are sent from the front end to a back-end database, which can later be checked during login.

  3. 3

    Which situation best illustrates a database being used beyond user registration?

    1. A

      Changing the color of a webpage heading

    2. B

      Formatting a paragraph in a document

    3. C

      Storing sales records for a business

    4. D

      Drawing a logo for a company website

    Correct answer
    C

    Storing sales records for a business

    Explanation

    The content identifies sales records as another example of information that can be stored in a database.

  4. 4

    What is a major advantage of a database over a spreadsheet for complex employee selection?

    1. A

      A database can query employees using multiple conditions

    2. B

      A database eliminates the need to store employee data

    3. C

      A database can only display one employee at a time

    4. D

      A database automatically gives every employee a bonus

    Correct answer
    A

    A database can query employees using multiple conditions

    Explanation

    A database can run queries such as finding employees with at least three years of service and no more than three missed days.

  5. 5

    How does a database provide more selective access than a typical spreadsheet?

    1. A

      It requires every user to receive the entire database

    2. B

      It prevents administrators from viewing any stored information

    3. C

      It stores every user in a separate spreadsheet file

    4. D

      It can return selected columns and restrict users to selected information

    Correct answer
    D

    It can return selected columns and restrict users to selected information

    Explanation

    Databases can return only selected columns and can provide different users with different views or privileges.

  6. 6

    What is the relationship between database design and programming in the introductory approach?

    1. A

      Design begins by planning how data is structured

    2. B

      Design is unnecessary when a database uses tables

    3. C

      Design begins by writing application scripts immediately

    4. D

      Design is completed only after every query is executed

    Correct answer
    A

    Design begins by planning how data is structured

    Explanation

    The content emphasizes thinking through the data, drawing plans, and understanding connections before programming the database.

  7. 7

    What does the front end of an application represent?

    1. A

      The query optimizer that searches every table

    2. B

      The physical hard drive containing database files

    3. C

      The part the user sees and interacts with

    4. D

      The private table structure used by administrators

    Correct answer
    C

    The part the user sees and interacts with

    Explanation

    The front end is the visible user-facing part, while the back end operates behind the scenes.

  8. 8

    Why are database design skills intended to apply across different relational database systems?

    1. A

      All database systems use exactly the same commands

    2. B

      General design concepts can be applied across systems

    3. C

      Relational databases do not use tables or relationships

    4. D

      Database design depends only on the chosen programming language

    Correct answer
    B

    General design concepts can be applied across systems

    Explanation

    The course focuses on general relational database design rather than a single product such as MySQL, Oracle, or SQL Server.

  9. 9

    In database terminology, what is an entity?

    1. A

      Anything about which data is stored

    2. B

      A command that changes a table

    3. C

      A single value inside a column

    4. D

      A rule restricting numeric values

    Correct answer
    A

    Anything about which data is stored

    Explanation

    An entity is anything the database stores data about, such as a person, order, customer, or comment.

  10. 10

    What is an attribute?

    1. A

      A complete collection of all database tables

    2. B

      A characteristic or piece of information stored about an entity

    3. C

      A command used to delete a row

    4. D

      A connection that always joins two databases

    Correct answer
    B

    A characteristic or piece of information stored about an entity

    Explanation

    Attributes are the things stored about an entity, such as a person's name, address, or phone number.

  11. 11

    In a relational table, what do columns generally represent?

    1. A

      Attribute types

    2. B

      Complete database systems

    3. C

      Foreign-key constraints only

    4. D

      Individual entities

    Correct answer
    A

    Attribute types

    Explanation

    Columns represent attribute types, such as username, email, or password.

  12. 12

    In a relational table, what does a row represent?

    1. A

      Only the primary key of a table

    2. B

      A collection of unrelated database commands

    3. C

      All attribute values for one entity

    4. D

      All values of one attribute across entities

    Correct answer
    C

    All attribute values for one entity

    Explanation

    A row contains the values of the attributes for one specific entity.

  13. 13

    Which term is another name for a row in a relational table?

    1. A

      Schema

    2. B

      Domain

    3. C

      Tuple

    4. D

      Field

    Correct answer
    C

    Tuple

    Explanation

    The content identifies tuple, sometimes pronounced similarly to “tupple,” as another name for a row.

  14. 14

    Which group contains equivalent terms for a column?

    1. A

      Attribute, field, and column

    2. B

      Entity, table, and file

    3. C

      Relation, record, and tuple

    4. D

      Value, row, and entry

    Correct answer
    A

    Attribute, field, and column

    Explanation

    Attribute, field, and column all refer to the column-like category of information in a table.

  15. 15

    Which group contains equivalent terms for a table?

    1. A

      Entity, domain, and schema

    2. B

      Attribute, field, and value

    3. C

      Tuple, record, and entry

    4. D

      Relation, table, and file

    Correct answer
    D

    Relation, table, and file

    Explanation

    A relation is the mathematical term used for a table, and file is also presented as an older equivalent term.

  16. 16

    What is a value in a database table?

    1. A

      A complete collection of database schemas

    2. B

      Specific information placed in a column for a row

    3. C

      A category describing every table in a database

    4. D

      A rule that connects two parent tables

    Correct answer
    B

    Specific information placed in a column for a row

    Explanation

    A value is a specific item entered into a column, such as a person's name or phone number.

  17. 17

    What does a database management system primarily do?

    1. A

      Replace every table with a spreadsheet

    2. B

      Store only the physical database hardware

    3. C

      Prevent all users from viewing database results

    4. D

      Manage data and allow users to query or change it

    Correct answer
    D

    Manage data and allow users to query or change it

    Explanation

    A DBMS manages stored data and lets users search, modify, present, and otherwise work with it.

  18. 18

    What distinguishes a relational database management system from a general DBMS?

    1. A

      It can store only unstructured text

    2. B

      It is used only for spreadsheet calculations

    3. C

      It cannot execute queries against tables

    4. D

      It is designed to manage relational databases

    Correct answer
    D

    It is designed to manage relational databases

    Explanation

    An RDBMS is a specific category of DBMS designed to work with relational databases and their tables.

  19. 19

    What is a query?

    1. A

      A column that uniquely identifies every table

    2. B

      A request that searches or operates on stored data

    3. C

      A physical device that stores database files

    4. D

      A naming convention for database objects

    Correct answer
    B

    A request that searches or operates on stored data

    Explanation

    A query searches data, changes it, or produces specific results from the database.

  20. 20

    What is SQL used for?

    1. A

      Designing only the visual appearance of webpages

    2. B

      Encrypting every password without database interaction

    3. C

      Replacing all database tables with text files

    4. D

      Communicating with and manipulating relational databases

    Correct answer
    D

    Communicating with and manipulating relational databases

    Explanation

    SQL is a general language used to communicate with relational databases, define structures, and manipulate data.

  21. 21

    Which task belongs to Data Definition Language?

    1. A

      Searching for transactions before a date

    2. B

      Updating a user's username value

    3. C

      Deleting an inactive user's row

    4. D

      Creating a table structure

    Correct answer
    D

    Creating a table structure

    Explanation

    DDL defines database structures, including creating tables and databases.

  22. 22

    Which task belongs to Data Manipulation Language?

    1. A

      Updating a value within an existing column

    2. B

      Creating the columns of a new table

    3. C

      Defining the overall database structure

    4. D

      Choosing the server on which the database runs

    Correct answer
    A

    Updating a value within an existing column

    Explanation

    DML changes or retrieves data, including inserting, updating, deleting, and searching values.

  23. 23

    Why are SQL joins important in relational database systems?

    1. A

      They change the physical storage structure permanently

    2. B

      They combine related data from separate tables into a useful result

    3. C

      They replace all foreign keys with repeated text

    4. D

      They prevent databases from using multiple tables

    Correct answer
    B

    They combine related data from separate tables into a useful result

    Explanation

    Joins allow separated tables to be combined into a new view containing related information.

  24. 24

    What is data integrity?

    1. A

      The practice of storing every value repeatedly

    2. B

      The condition in which stored data is correct and relationships remain valid

    3. C

      The process of hiding every table from administrators

    4. D

      The use of only text columns in a database

    Correct answer
    B

    The condition in which stored data is correct and relationships remain valid

    Explanation

    Data integrity means data is correct, current when appropriate, noncontradictory, and connected through valid relationships.

  25. 25

    Which situation is a data integrity problem?

    1. A

      A query returns only selected columns

    2. B

      A table contains a unique identifier for each row

    3. C

      One person's address appears differently in two rows

    4. D

      An archive preserves historical orders unchanged

    Correct answer
    C

    One person's address appears differently in two rows

    Explanation

    Repeated data can become inconsistent when one copy changes and another does not.

  26. 26

    What is an update anomaly?

    1. A

      A relationship represented by a foreign key

    2. B

      A successful query that returns selected rows

    3. C

      An unintended inconsistency caused by changing repeated data

    4. D

      A table with a properly enforced primary key

    Correct answer
    C

    An unintended inconsistency caused by changing repeated data

    Explanation

    An update anomaly occurs when repeated information is not updated consistently, producing conflicting values.

  27. 27

    What is the main purpose of database normalization?

    1. A

      To reduce anomalies and improve database structure

    2. B

      To eliminate all relationships between tables

    3. C

      To make every column contain multiple values

    4. D

      To place all information in one large table

    Correct answer
    A

    To reduce anomalies and improve database structure

    Explanation

    Normalization is a series of steps used to produce a better design with less repetition and fewer integrity problems.

  28. 28

    Which sequence correctly describes increasing database-design specificity?

    1. A

      Conceptual, physical, logical

    2. B

      Physical, conceptual, logical

    3. C

      Logical, physical, conceptual

    4. D

      Conceptual, logical, physical

    Correct answer
    D

    Conceptual, logical, physical

    Explanation

    The conceptual schema describes broad relationships, the logical schema plans tables and columns, and the physical schema addresses implementation.

  29. 29

    What does the conceptual schema primarily describe?

    1. A

      How data and entities are related in general

    2. B

      The specific SQL syntax for inserting rows

    3. C

      The exact server and storage engine configuration

    4. D

      The final physical location of every database file

    Correct answer
    A

    How data and entities are related in general

    Explanation

    The conceptual stage is a general brainstorming stage focused on relationships without implementation limitations.

  30. 30

    What does the logical schema primarily plan?

    1. A

      Only the historical records kept in an archive

    2. B

      Only the webpages shown to end users

    3. C

      Only the hardware used by the database server

    4. D

      Tables, columns, data types, and relationships

    Correct answer
    D

    Tables, columns, data types, and relationships

    Explanation

    The logical stage turns conceptual relationships into planned tables, attributes, and connections.

  31. 31

    What does the physical schema address?

    1. A

      Only the broad relationships between concepts

    2. B

      Implementation choices such as the DBMS, server, and access methods

    3. C

      Only whether a value is a string or a number

    4. D

      Only the names of real-world entities

    Correct answer
    B

    Implementation choices such as the DBMS, server, and access methods

    Explanation

    The physical stage concerns actual implementation, including the DBMS, server, access, users, views, and security.

  32. 32

    What does entity integrity require?

    1. A

      Entities or rows must be uniquely identifiable

    2. B

      Every column must contain only text

    3. C

      Every relationship must be many-to-many

    4. D

      Every table must have exactly two rows

    Correct answer
    A

    Entities or rows must be uniquely identifiable

    Explanation

    Entity integrity ensures uniqueness among entities, commonly through an identifier or key.

  33. 33

    What does referential integrity protect?

    1. A

      The number of characters in a text field

    2. B

      Valid connections between related tables

    3. C

      The alphabetical order of all rows

    4. D

      The visual layout of a database diagram

    Correct answer
    B

    Valid connections between related tables

    Explanation

    Referential integrity ensures that references such as a comment's user ID point to an existing related entity.

  34. 34

    What is a domain in database design?

    1. A

      The physical server hosting the database

    2. B

      The collection of all tables in a database

    3. C

      The parent entity in every relationship

    4. D

      The acceptable set or range of values for a column

    Correct answer
    D

    The acceptable set or range of values for a column

    Explanation

    A domain specifies what values are acceptable for a column, such as numeric ten-digit phone numbers.

  35. 35

    Why would the word “cake” violate the domain of a numeric phone-number column?

    1. A

      It is text rather than an acceptable numeric phone value

    2. B

      It refers to a user instead of an address

    3. C

      It contains fewer than eleven characters

    4. D

      It is a foreign key rather than a primary key

    Correct answer
    A

    It is text rather than an acceptable numeric phone value

    Explanation

    A phone-number domain expects numeric values of an appropriate format, so arbitrary text would violate it.

  36. 36

    What does an atomic value contain?

    1. A

      Every possible value for an entire column

    2. B

      A list of multiple independent items in one field

    3. C

      A complete set of related database tables

    4. D

      One indivisible piece of information for the intended design

    Correct answer
    D

    One indivisible piece of information for the intended design

    Explanation

    Atomicity means storing one intended item in each value rather than several independent items together.

  37. 37

    Which design best makes a person's name atomic?

    1. A

      Store the name together with every address ever used

    2. B

      Store all names in one comma-separated column

    3. C

      Separate first, middle, and last name columns

    4. D

      Store each letter of the name in a separate column

    Correct answer
    C

    Separate first, middle, and last name columns

    Explanation

    The content recommends separating first, middle, and last names when those parts need to be treated independently.

  38. 38

    Why might an address be separated into street, city, state, and ZIP columns?

    1. A

      To make every address identical in length

    2. B

      To prevent the database from storing geographic information

    3. C

      To ensure every address is stored as one long string

    4. D

      To support more specific queries about locations

    Correct answer
    D

    To support more specific queries about locations

    Explanation

    Separate address components allow queries such as finding users in a particular state or city.

  39. 39

    How should multiple email addresses for one user generally be modeled?

    1. A

      Place all emails in one comma-separated value

    2. B

      Create a separate column for every possible email

    3. C

      Duplicate the entire user row for every email

    4. D

      Store them as separate rows in a related email table

    Correct answer
    D

    Store them as separate rows in a related email table

    Explanation

    A separate related table allows multiple email rows while avoiding repeated user information.

  40. 40

    What does the first normal form primarily address?

    1. A

      Only the choice between natural and surrogate keys

    2. B

      Only the physical server used for storage

    3. C

      Atomic values and the elimination of repeating groups

    4. D

      Only transitive dependencies between non-key columns

    Correct answer
    C

    Atomic values and the elimination of repeating groups

    Explanation

    First normal form requires values to be atomic and avoids storing multiple values or repeating groups in a single structure.

  41. 41

    What is a partial dependency?

    1. A

      A foreign key references two different parent tables

    2. B

      A non-key attribute depends on only part of a composite key

    3. C

      A table has no primary key at all

    4. D

      A value contains more than one character

    Correct answer
    B

    A non-key attribute depends on only part of a composite key

    Explanation

    A partial dependency can occur when the primary key has multiple columns and another attribute depends on only one part.

  42. 42

    When is a table automatically in second normal form with respect to partial dependencies?

    1. A

      When it contains at least two foreign keys

    2. B

      When it uses a many-to-many relationship

    3. C

      When its primary key consists of only one column

    4. D

      When every value is stored as a string

    Correct answer
    C

    When its primary key consists of only one column

    Explanation

    A single-column key cannot have an attribute dependent on only part of the key.

  43. 43

    What is a transitive dependency?

    1. A

      A non-key column depends on another non-key column that depends on the key

    2. B

      A column contains one atomic value

    3. C

      A foreign key points directly to a parent key

    4. D

      A primary key directly identifies every row

    Correct answer
    A

    A non-key column depends on another non-key column that depends on the key

    Explanation

    In a transitive dependency, an attribute depends indirectly on the primary key through another non-key attribute.

  44. 44

    How is a transitive dependency typically removed?

    1. A

      Replace the primary key with a repeated text value

    2. B

      Move the dependent attributes to another table and reference it

    3. C

      Add the same dependent attributes to every row

    4. D

      Combine all related tables into one large table

    Correct answer
    B

    Move the dependent attributes to another table and reference it

    Explanation

    The content recommends moving the dependent columns to a separate table and using a foreign key to reference them.

  45. 45

    Which statement about the normal forms is correct?

    1. A

      The normal forms are unrelated independent checklists

    2. B

      A database in third normal form is also in first and second normal form

    3. C

      A database can reach third normal form without satisfying first normal form

    4. D

      Second normal form must be applied before first normal form

    Correct answer
    B

    A database in third normal form is also in first and second normal form

    Explanation

    The normal forms are cumulative: later forms assume that earlier forms have already been satisfied.

  46. 46

    What is a one-to-one relationship?

    1. A

      Every entity must relate to every entity in another table

    2. B

      Each entity is related to at most one entity on the other side

    3. C

      A relationship that cannot be represented with a key

    4. D

      One entity relates to unlimited entities while the other relates to none

    Correct answer
    B

    Each entity is related to at most one entity on the other side

    Explanation

    In a one-to-one relationship, one entity is limited to one related entity and vice versa.

  47. 47

    Which example best represents a one-to-one relationship as described?

    1. A

      A student and the many classes they take

    2. B

      A user and the many comments they post

    3. C

      A membership type and its many members

    4. D

      A person and a uniquely assigned social security number

    Correct answer
    D

    A person and a uniquely assigned social security number

    Explanation

    The content treats a person's generally unique social security number as a one-to-one relationship.

  48. 48

    How is a one-to-one relationship commonly stored when one side is simply an attribute of the other?

    1. A

      As repeated copies of the entire entity

    2. B

      As a column in the same table

    3. C

      As a mandatory many-to-many junction table

    4. D

      As an unlimited list in one column

    Correct answer
    B

    As a column in the same table

    Explanation

    A one-to-one relationship such as an account and its username can often be represented as an attribute column.

  49. 49

    When might a one-to-one relationship use two tables instead of one?

    1. A

      When the relationship is actually many-to-many

    2. B

      When the related entity has many attributes of its own

    3. C

      When repeated values are intentionally required

    4. D

      When neither entity has any data to store

    Correct answer
    B

    When the related entity has many attributes of its own

    Explanation

    If the related object, such as a card, has substantial independent information, it can receive its own table.

  50. 50

    What is a one-to-many relationship?

    1. A

      One entity can relate to many entities, while each related entity relates to one

    2. B

      Many entities can relate to many entities without an intermediary

    3. C

      No entity can have more than one related value

    4. D

      Each entity can relate to exactly one entity on both sides

    Correct answer
    A

    One entity can relate to many entities, while each related entity relates to one

    Explanation

    A user can post many comments, while each individual comment belongs to one user.

  51. 51

    How is a one-to-many relationship normally implemented?

    1. A

      Put the one side's key as a foreign key in the many-side table

    2. B

      Store all related values in one comma-separated field

    3. C

      Duplicate the one-side row for every related entity

    4. D

      Put every many-side value in separate columns of the one-side table

    Correct answer
    A

    Put the one side's key as a foreign key in the many-side table

    Explanation

    The many-side rows each contain a foreign key pointing to the primary key of the one-side parent.

  52. 52

    In a user-comments example, which table is normally the child?

    1. A

      The comments table

    2. B

      The view-definition table

    3. C

      The database server table

    4. D

      The users table

    Correct answer
    A

    The comments table

    Explanation

    A comment depends on a user who posted it, so the comment is the child and the user is the parent.

  53. 53

    What is a many-to-many relationship?

    1. A

      One entity can relate to only one entity on either side

    2. B

      Many entities relate to one entity, but not in the reverse direction

    3. C

      A relationship that cannot involve foreign keys

    4. D

      Many entities on each side can relate to many entities on the other side

    Correct answer
    D

    Many entities on each side can relate to many entities on the other side

    Explanation

    A class can have many students and a student can take many classes, which is many-to-many.

  54. 54

    Why is a many-to-many relationship not stored directly in a simple relational table design?

    1. A

      Direct storage would create repeating columns or multiple values in one field

    2. B

      A many-to-many relationship always has only one row

    3. C

      Many-to-many relationships never contain real data

    4. D

      Relational databases cannot store any foreign keys

    Correct answer
    A

    Direct storage would create repeating columns or multiple values in one field

    Explanation

    Trying to list many classes in student columns or many students in class columns creates scalability and atomicity problems.

  55. 55

    What is the standard solution for a many-to-many relationship?

    1. A

      Create an intermediary or junction table

    2. B

      Duplicate each parent table for every relationship

    3. C

      Add unlimited class columns to the student table

    4. D

      Store all related IDs in one text field

    Correct answer
    A

    Create an intermediary or junction table

    Explanation

    A junction table breaks the many-to-many relationship into two one-to-many relationships.

  56. 56

    What does a row in a student-class junction table represent?

    1. A

      All students enrolled in every class

    2. B

      One specific connection between one student and one class

    3. C

      Only the attributes of a student unrelated to classes

    4. D

      Every class available at the college

    Correct answer
    B

    One specific connection between one student and one class

    Explanation

    Each junction-table row represents one enrollment connection between a particular student and class.

  57. 57

    What determines whether a relationship is one-to-one, one-to-many, or many-to-many in an application?

    1. A

      The spelling of the table names

    2. B

      The rules and requirements of the specific application

    3. C

      The physical size of the database server

    4. D

      Whether the database uses numeric values

    Correct answer
    B

    The rules and requirements of the specific application

    Explanation

    The relationship type depends on business rules, such as whether a class may have one professor or several.

  58. 58

    What is the role of a primary key?

    1. A

      To uniquely identify rows in its table

    2. B

      To display a user-friendly version of a table

    3. C

      To store every related row from another table

    4. D

      To define only the acceptable text length

    Correct answer
    A

    To uniquely identify rows in its table

    Explanation

    A primary key identifies each entity uniquely within its table.

  59. 59

    What is the role of a foreign key?

    1. A

      To replace every primary key in the database

    2. B

      To reference a key in another table and connect related data

    3. C

      To store only values that have no relationships

    4. D

      To ensure every column contains a different data type

    Correct answer
    B

    To reference a key in another table and connect related data

    Explanation

    A foreign key stores a reference to a primary key, allowing related tables to remain connected.

  60. 60

    Which rule normally applies to a primary key?

    1. A

      It may be empty whenever the entity lacks an attribute

    2. B

      It should change whenever a relationship changes

    3. C

      It must be unique, non-null, and stable

    4. D

      It must be repeated in every row

    Correct answer
    C

    It must be unique, non-null, and stable

    Explanation

    The content emphasizes that keys should be unique, never changing, and never null.

  61. 61

    Which statement correctly compares primary and foreign keys?

    1. A

      A table may have unlimited primary keys but no foreign keys

    2. B

      A table has one primary key but may have multiple foreign keys

    3. C

      Primary keys can be empty while foreign keys cannot be empty

    4. D

      Foreign keys identify rows while primary keys only format them

    Correct answer
    B

    A table has one primary key but may have multiple foreign keys

    Explanation

    A table has one defined primary key, possibly composed of several columns, and may contain multiple foreign-key references.

  62. 62

    What is a natural key?

    1. A

      A key based on meaningful data already stored in the table

    2. B

      A key that must always contain multiple columns

    3. C

      A key that is never used to enforce uniqueness

    4. D

      A random identifier added only for database purposes

    Correct answer
    A

    A key based on meaningful data already stored in the table

    Explanation

    A username or unique email can serve as a natural key because it is already meaningful data in the table.

  63. 63

    What is a surrogate key?

    1. A

      A generated identifier added for database uniqueness

    2. B

      A foreign key that always changes with the parent

    3. C

      A column that stores several values in one field

    4. D

      A meaningful real-world value such as a username

    Correct answer
    A

    A generated identifier added for database uniqueness

    Explanation

    A surrogate key is typically an automatically generated number with no intended real-world meaning.

  64. 64

    Why might a designer prefer a surrogate key over a natural key?

    1. A

      It provides a stable, simple identifier without relying on changing real-world data

    2. B

      It removes the need for foreign-key relationships

    3. C

      It allows duplicate primary-key values

    4. D

      It guarantees that no other columns need indexes

    Correct answer
    A

    It provides a stable, simple identifier without relying on changing real-world data

    Explanation

    Surrogate keys are simple generated identifiers and are less dependent on real-world values that may change.

  65. 65

    What is a candidate key?

    1. A

      Any collection of columns, regardless of redundancy

    2. B

      A key that must be used as a foreign key

    3. C

      A generated number that has no database purpose

    4. D

      The smallest set of columns sufficient to ensure uniqueness

    Correct answer
    D

    The smallest set of columns sufficient to ensure uniqueness

    Explanation

    A candidate key is a minimal set of columns that uniquely identifies rows.

  66. 66

    What is a super key?

    1. A

      A key used only to identify parent tables

    2. B

      Only the smallest possible unique column set

    3. C

      Any set of columns that uniquely identifies every row

    4. D

      A key that can contain duplicate rows

    Correct answer
    C

    Any set of columns that uniquely identifies every row

    Explanation

    A super key can contain extra columns, as long as the combination still forces every row to be unique.

  67. 67

    What is an alternate key?

    1. A

      A duplicate value intentionally stored in a table

    2. B

      A candidate key not selected as the primary key

    3. C

      A foreign key that references two parents

    4. D

      A key that is allowed to be null

    Correct answer
    B

    A candidate key not selected as the primary key

    Explanation

    After one candidate key is selected as the primary key, the other candidate keys are alternate keys.

  68. 68

    What does a foreign-key constraint help prevent?

    1. A

      A primary key from being unique

    2. B

      A child row from referencing a nonexistent parent

    3. C

      A table from containing any rows

    4. D

      A query from returning selected columns

    Correct answer
    B

    A child row from referencing a nonexistent parent

    Explanation

    Foreign-key constraints preserve referential integrity by requiring references to valid parent keys.

  69. 69

    What does the ON DELETE CASCADE behavior generally do?

    1. A

      Prevents deletion of a parent with children

    2. B

      Deletes related child rows when the parent is deleted

    3. C

      Sets every child value to a new unrelated key

    4. D

      Deletes only the parent while preserving invalid references

    Correct answer
    B

    Deletes related child rows when the parent is deleted

    Explanation

    Cascade deletion propagates the parent's deletion to related child rows.

  70. 70

    What does a restrict behavior generally do when a referenced parent is deleted?

    1. A

      It deletes every child automatically

    2. B

      It sets all child references to an empty value

    3. C

      It changes the parent key to a new number

    4. D

      It prevents the deletion and produces an error

    Correct answer
    D

    It prevents the deletion and produces an error

    Explanation

    Restrict prevents an operation that would leave invalid child references.

  71. 71

    What does SET NULL require of a foreign-key column?

    1. A

      The column must contain only positive integers

    2. B

      The column must always be a primary key

    3. C

      The column must be part of a many-to-many relationship

    4. D

      The column must be allowed to contain null values

    Correct answer
    D

    The column must be allowed to contain null values

    Explanation

    If a deleted or updated parent causes a child reference to become null, the foreign-key column cannot be defined as not null.

  72. 72

    What is the difference between a simple key and a composite key?

    1. A

      A simple key is foreign, while a composite key is always primary

    2. B

      A simple key allows duplicates, while a composite key forbids all nulls

    3. C

      A simple key uses one column, while a composite key uses multiple columns

    4. D

      A simple key is physical, while a composite key is conceptual

    Correct answer
    C

    A simple key uses one column, while a composite key uses multiple columns

    Explanation

    A simple key consists of one column; a composite key combines two or more columns.

  73. 73

    What is a compound key in the terminology presented?

    1. A

      A key that contains no foreign-key references

    2. B

      A key used only to sort a table alphabetically

    3. C

      A single-column key generated automatically

    4. D

      A multi-column key in which the component columns are themselves keys

    Correct answer
    D

    A multi-column key in which the component columns are themselves keys

    Explanation

    The content distinguishes compound keys as multi-column keys whose individual columns are also keys, such as two foreign keys in a junction table.

  74. 74

    What is the main purpose of an index?

    1. A

      To make frequently used searches and joins faster

    2. B

      To prevent tables from being normalized

    3. C

      To guarantee that every value in a table is unique

    4. D

      To replace the database's primary keys

    Correct answer
    A

    To make frequently used searches and joins faster

    Explanation

    Indexes help the database locate relevant rows without scanning the entire table.

  75. 75

    What is a table scan?

    1. A

      Sorting a table permanently by its primary key

    2. B

      Searching rows throughout the table to find matching data

    3. C

      Creating a new table from a database view

    4. D

      Joining only two foreign-key columns

    Correct answer
    B

    Searching rows throughout the table to find matching data

    Explanation

    Without a useful index, the database may inspect rows sequentially, which is called a table scan.

  76. 76

    What is an index seek?

    1. A

      Deleting all rows that lack a foreign key

    2. B

      Reading every row from the beginning of a table

    3. C

      Changing a natural key into a surrogate key

    4. D

      Using an index to go directly toward matching data

    Correct answer
    D

    Using an index to go directly toward matching data

    Explanation

    An index seek uses the index structure to locate relevant data more efficiently than a full scan.

  77. 77

    What distinguishes a nonclustered index from a clustered index?

    1. A

      A nonclustered index is always primary, while a clustered index is always foreign

    2. B

      A nonclustered index points to data, while a clustered index organizes the data itself

    3. C

      A nonclustered index stores the table, while a clustered index stores only passwords

    4. D

      A nonclustered index cannot support searches, while a clustered index can

    Correct answer
    B

    A nonclustered index points to data, while a clustered index organizes the data itself

    Explanation

    A nonclustered index is a separate reference structure, while a clustered index determines the physical organization of the data.

  78. 78

    Why can a table generally have only one clustered index?

    1. A

      A clustered index is not associated with any table

    2. B

      The data cannot be physically organized in two conflicting orders at once

    3. C

      Clustered indexes cannot contain numeric values

    4. D

      Every clustered index must contain a foreign key

    Correct answer
    B

    The data cannot be physically organized in two conflicting orders at once

    Explanation

    Because a clustered index organizes the table's data, the table cannot simultaneously be physically ordered in multiple different ways.

  79. 79

    What is a drawback of creating many indexes?

    1. A

      Indexes prevent all queries from returning results

    2. B

      Indexes eliminate the need for database design

    3. C

      Updates require maintaining the indexes as well as the table

    4. D

      Indexes force every column to contain text

    Correct answer
    C

    Updates require maintaining the indexes as well as the table

    Explanation

    Indexes improve reads but add maintenance work when stored data changes.

  80. 80

    What is a composite index?

    1. A

      An index built from two or more columns

    2. B

      An index that physically duplicates every table

    3. C

      An index that contains no searchable columns

    4. D

      An index that can exist only on a foreign key

    Correct answer
    A

    An index built from two or more columns

    Explanation

    A composite index combines multiple columns, such as last name and first name, for searches involving those columns.

  81. 81

    Which three broad data-type categories were emphasized?

    1. A

      Conceptual, logical, and physical

    2. B

      Primary, foreign, and alternate

    3. C

      String, numeric, and date

    4. D

      Table, row, and column

    Correct answer
    C

    String, numeric, and date

    Explanation

    The content groups data types broadly into strings, numeric values, and dates or times.

  82. 82

    What is the key distinction between a character type and a variable-character type?

    1. A

      A character type cannot contain letters, while a variable-character type can

    2. B

      A character type uses a fixed length, while a variable-character type can vary in length

    3. C

      A character type stores numbers, while a variable-character type stores dates

    4. D

      A character type is always numeric, while a variable-character type is always Boolean

    Correct answer
    B

    A character type uses a fixed length, while a variable-character type can vary in length

    Explanation

    Fixed character storage uses a specified length, whereas variable-character storage uses only the length needed within its limit.

  83. 83

    What kind of data is an integer designed to store?

    1. A

      Whole numbers without fractional parts

    2. B

      Long text messages with unlimited characters

    3. C

      Dates combined with time zones

    4. D

      Only negative decimal fractions

    Correct answer
    A

    Whole numbers without fractional parts

    Explanation

    An integer stores whole numbers, such as 512512512, 282828, or −52-52−52.

  84. 84

    What is the difference between signed and unsigned numeric values?

    1. A

      Signed values are always text, while unsigned values are always dates

    2. B

      Signed values may be negative, while unsigned values cannot be negative

    3. C

      Signed values are keys, while unsigned values are foreign keys

    4. D

      Signed values use fixed length, while unsigned values use variable length

    Correct answer
    B

    Signed values may be negative, while unsigned values cannot be negative

    Explanation

    Unsigned numeric types exclude negative values; signed types allow both positive and negative values.

  85. 85

    Why might an exact decimal type be preferred over a floating-point type for some values?

    1. A

      Decimal types are used only for usernames and passwords

    2. B

      Floating-point types cannot store any numeric values

    3. C

      Decimal storage can provide more appropriate exactness for certain calculations

    4. D

      Floating-point values always require more database tables

    Correct answer
    C

    Decimal storage can provide more appropriate exactness for certain calculations

    Explanation

    The content notes that binary floating-point representation can approximate some decimal fractions, whereas decimal storage may be preferable when accuracy matters.

  86. 86

    What does a timestamp generally record?

    1. A

      The time at which an event or row was created or changed

    2. B

      The total number of rows in a database

    3. C

      The acceptable range of values in a column

    4. D

      The name of the table containing a foreign key

    Correct answer
    A

    The time at which an event or row was created or changed

    Explanation

    A timestamp records an exact point or representation of time, such as when a row was inserted or updated.

  87. 87

    What is the purpose of a view mechanism?

    1. A

      To present selected data differently without changing its internal structure

    2. B

      To remove all security restrictions from a database

    3. C

      To replace SQL with spreadsheet formulas

    4. D

      To permanently duplicate every table for each user

    Correct answer
    A

    To present selected data differently without changing its internal structure

    Explanation

    Views change the surface presentation of data while the underlying storage structure remains unchanged.

  88. 88

    How can views improve database security?

    1. A

      They can expose only the information a particular user needs

    2. B

      They require every user to see all private columns

    3. C

      They eliminate the need for authentication

    4. D

      They allow every user to modify the database structure

    Correct answer
    A

    They can expose only the information a particular user needs

    Explanation

    Different users can receive views containing only permitted columns or rows, limiting access to sensitive information.

  89. 89

    What does an inner join return?

    1. A

      Every row from the left table regardless of matches

    2. B

      Rows with matching connections in both joined tables

    3. C

      Every row from the right table regardless of matches

    4. D

      Only rows that contain null foreign keys

    Correct answer
    B

    Rows with matching connections in both joined tables

    Explanation

    An inner join returns the intersection: rows that satisfy the join condition in both tables.

  90. 90

    What does a left outer join preserve?

    1. A

      Only rows that occur in both tables

    2. B

      Only rows whose foreign keys are null

    3. C

      Every row from the left table, with matches from the right when available

    4. D

      Every row from the right table, excluding unmatched left rows

    Correct answer
    C

    Every row from the left table, with matches from the right when available

    Explanation

    A left outer join keeps all left-table rows and supplies right-table data when a match exists.

  91. 91

    What does a right outer join preserve?

    1. A

      Only rows with empty primary keys

    2. B

      Every row from the right table, with matches from the left when available

    3. C

      Every row from the left table, excluding unmatched right rows

    4. D

      Only rows found in both tables

    Correct answer
    B

    Every row from the right table, with matches from the left when available

    Explanation

    A right outer join preserves all rows of the right table and includes matching left-table data where available.

  92. 92

    Why can a right join often be rewritten as a left join?

    1. A

      Switching the table order can produce the same result more consistently

    2. B

      A left join automatically removes all unmatched rows

    3. C

      Right joins can only be used with numeric columns

    4. D

      Right joins and left joins never return related rows

    Correct answer
    A

    Switching the table order can produce the same result more consistently

    Explanation

    Reversing the table order allows a left join to preserve the same side that a right join would preserve.

  93. 93

    When joining three tables, how is the result conceptually formed?

    1. A

      Only the first and last tables participate in the join

    2. B

      All tables are physically merged before any condition is evaluated

    3. C

      The first join produces an intermediate result that is joined with the third table

    4. D

      Each table is independently displayed without matching rows

    Correct answer
    C

    The first join produces an intermediate result that is joined with the third table

    Explanation

    The content describes joining two tables to form an intermediate result, then joining that result with another table.

  94. 94

    What is an alias in SQL?

    1. A

      A permanent replacement for a primary key

    2. B

      A data type used for dates and times

    3. C

      A constraint that prevents duplicate rows

    4. D

      A temporary alternative name for a table or column

    Correct answer
    D

    A temporary alternative name for a table or column

    Explanation

    An alias gives a table or column a shorter or more user-friendly name within a query or result.

  95. 95

    Why is an alias essential in a self-join?

    1. A

      It converts a table into a primary key

    2. B

      It prevents the table from containing foreign keys

    3. C

      It distinguishes multiple uses of the same table

    4. D

      It makes every value in the table unique

    Correct answer
    C

    It distinguishes multiple uses of the same table

    Explanation

    A self-join uses the same table in different roles, so aliases identify those roles separately.

  96. 96

    What is a self-join?

    1. A

      Joining a table to a spreadsheet with identical columns

    2. B

      Joining a table to another logical use of that same table

    3. C

      Joining every table in a database at once

    4. D

      Joining only tables without primary keys

    Correct answer
    B

    Joining a table to another logical use of that same table

    Explanation

    A self-join treats one table as two logical instances, such as matching a user with the user who referred them.

  97. 97

    Why might a lookup table be used for membership statuses?

    1. A

      It centralizes allowed statuses and reduces repeated descriptive data

    2. B

      It forces every member to have a different status

    3. C

      It allows unlimited unrelated values in the status column

    4. D

      It removes the need for a membership identifier

    Correct answer
    A

    It centralizes allowed statuses and reduces repeated descriptive data

    Explanation

    A lookup table stores each allowed option once, while member rows reference it through a foreign key.

  98. 98

    What advantage results when a member table references a membership lookup table by ID?

    1. A

      Changing a status name requires updating one lookup row

    2. B

      The membership description must be repeated in every row

    3. C

      Every member must receive a unique membership type

    4. D

      The database can no longer enforce valid statuses

    Correct answer
    A

    Changing a status name requires updating one lookup row

    Explanation

    Because member rows store references rather than repeated descriptions, changing the lookup value updates its presentation consistently.

Question 1 of 98
Question 1 of 98

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent