Database Design Fundamentals
- 98Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the broadest definition of a database presented in the content?
What is the broadest definition of a database presented in the content?
98 questions
- 1
What is the broadest definition of a database presented in the content?
- A
A server that stores only user accounts
- B
A program that displays webpages
- C
A spreadsheet used only for calculations
- D
A system that stores data
Correct answer
DA 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.
- A
- 2
Why can a website remember a user's username and password between visits?
- A
The front end permanently redraws the same login form
- B
The browser converts the values into spreadsheet columns
- C
The website generates a new account during every visit
- D
The submitted values are stored in a back-end database
Correct answer
DThe 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.
- A
- 3
Which situation best illustrates a database being used beyond user registration?
- A
Changing the color of a webpage heading
- B
Formatting a paragraph in a document
- C
Storing sales records for a business
- D
Drawing a logo for a company website
Correct answer
CStoring sales records for a business
Explanation
The content identifies sales records as another example of information that can be stored in a database.
- A
- 4
What is a major advantage of a database over a spreadsheet for complex employee selection?
- A
A database can query employees using multiple conditions
- B
A database eliminates the need to store employee data
- C
A database can only display one employee at a time
- D
A database automatically gives every employee a bonus
Correct answer
AA 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.
- A
- 5
How does a database provide more selective access than a typical spreadsheet?
- A
It requires every user to receive the entire database
- B
It prevents administrators from viewing any stored information
- C
It stores every user in a separate spreadsheet file
- D
It can return selected columns and restrict users to selected information
Correct answer
DIt 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.
- A
- 6
What is the relationship between database design and programming in the introductory approach?
- A
Design begins by planning how data is structured
- B
Design is unnecessary when a database uses tables
- C
Design begins by writing application scripts immediately
- D
Design is completed only after every query is executed
Correct answer
ADesign begins by planning how data is structured
Explanation
The content emphasizes thinking through the data, drawing plans, and understanding connections before programming the database.
- A
- 7
What does the front end of an application represent?
- A
The query optimizer that searches every table
- B
The physical hard drive containing database files
- C
The part the user sees and interacts with
- D
The private table structure used by administrators
Correct answer
CThe 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.
- A
- 8
Why are database design skills intended to apply across different relational database systems?
- A
All database systems use exactly the same commands
- B
General design concepts can be applied across systems
- C
Relational databases do not use tables or relationships
- D
Database design depends only on the chosen programming language
Correct answer
BGeneral 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.
- A
- 9
In database terminology, what is an entity?
- A
Anything about which data is stored
- B
A command that changes a table
- C
A single value inside a column
- D
A rule restricting numeric values
Correct answer
AAnything about which data is stored
Explanation
An entity is anything the database stores data about, such as a person, order, customer, or comment.
- A
- 10
What is an attribute?
- A
A complete collection of all database tables
- B
A characteristic or piece of information stored about an entity
- C
A command used to delete a row
- D
A connection that always joins two databases
Correct answer
BA 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.
- A
- 11
In a relational table, what do columns generally represent?
- A
Attribute types
- B
Complete database systems
- C
Foreign-key constraints only
- D
Individual entities
Correct answer
AAttribute types
Explanation
Columns represent attribute types, such as username, email, or password.
- A
- 12
In a relational table, what does a row represent?
- A
Only the primary key of a table
- B
A collection of unrelated database commands
- C
All attribute values for one entity
- D
All values of one attribute across entities
Correct answer
CAll attribute values for one entity
Explanation
A row contains the values of the attributes for one specific entity.
- A
- 13
Which term is another name for a row in a relational table?
- A
Schema
- B
Domain
- C
Tuple
- D
Field
Correct answer
CTuple
Explanation
The content identifies tuple, sometimes pronounced similarly to “tupple,” as another name for a row.
- A
- 14
Which group contains equivalent terms for a column?
- A
Attribute, field, and column
- B
Entity, table, and file
- C
Relation, record, and tuple
- D
Value, row, and entry
Correct answer
AAttribute, field, and column
Explanation
Attribute, field, and column all refer to the column-like category of information in a table.
- A
- 15
Which group contains equivalent terms for a table?
- A
Entity, domain, and schema
- B
Attribute, field, and value
- C
Tuple, record, and entry
- D
Relation, table, and file
Correct answer
DRelation, table, and file
Explanation
A relation is the mathematical term used for a table, and file is also presented as an older equivalent term.
- A
- 16
What is a value in a database table?
- A
A complete collection of database schemas
- B
Specific information placed in a column for a row
- C
A category describing every table in a database
- D
A rule that connects two parent tables
Correct answer
BSpecific 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.
- A
- 17
What does a database management system primarily do?
- A
Replace every table with a spreadsheet
- B
Store only the physical database hardware
- C
Prevent all users from viewing database results
- D
Manage data and allow users to query or change it
Correct answer
DManage 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.
- A
- 18
What distinguishes a relational database management system from a general DBMS?
- A
It can store only unstructured text
- B
It is used only for spreadsheet calculations
- C
It cannot execute queries against tables
- D
It is designed to manage relational databases
Correct answer
DIt is designed to manage relational databases
Explanation
An RDBMS is a specific category of DBMS designed to work with relational databases and their tables.
- A
- 19
What is a query?
- A
A column that uniquely identifies every table
- B
A request that searches or operates on stored data
- C
A physical device that stores database files
- D
A naming convention for database objects
Correct answer
BA request that searches or operates on stored data
Explanation
A query searches data, changes it, or produces specific results from the database.
- A
- 20
What is SQL used for?
- A
Designing only the visual appearance of webpages
- B
Encrypting every password without database interaction
- C
Replacing all database tables with text files
- D
Communicating with and manipulating relational databases
Correct answer
DCommunicating with and manipulating relational databases
Explanation
SQL is a general language used to communicate with relational databases, define structures, and manipulate data.
- A
- 21
Which task belongs to Data Definition Language?
- A
Searching for transactions before a date
- B
Updating a user's username value
- C
Deleting an inactive user's row
- D
Creating a table structure
Correct answer
DCreating a table structure
Explanation
DDL defines database structures, including creating tables and databases.
- A
- 22
Which task belongs to Data Manipulation Language?
- A
Updating a value within an existing column
- B
Creating the columns of a new table
- C
Defining the overall database structure
- D
Choosing the server on which the database runs
Correct answer
AUpdating a value within an existing column
Explanation
DML changes or retrieves data, including inserting, updating, deleting, and searching values.
- A
- 23
Why are SQL joins important in relational database systems?
- A
They change the physical storage structure permanently
- B
They combine related data from separate tables into a useful result
- C
They replace all foreign keys with repeated text
- D
They prevent databases from using multiple tables
Correct answer
BThey 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.
- A
- 24
What is data integrity?
- A
The practice of storing every value repeatedly
- B
The condition in which stored data is correct and relationships remain valid
- C
The process of hiding every table from administrators
- D
The use of only text columns in a database
Correct answer
BThe 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.
- A
- 25
Which situation is a data integrity problem?
- A
A query returns only selected columns
- B
A table contains a unique identifier for each row
- C
One person's address appears differently in two rows
- D
An archive preserves historical orders unchanged
Correct answer
COne person's address appears differently in two rows
Explanation
Repeated data can become inconsistent when one copy changes and another does not.
- A
- 26
What is an update anomaly?
- A
A relationship represented by a foreign key
- B
A successful query that returns selected rows
- C
An unintended inconsistency caused by changing repeated data
- D
A table with a properly enforced primary key
Correct answer
CAn unintended inconsistency caused by changing repeated data
Explanation
An update anomaly occurs when repeated information is not updated consistently, producing conflicting values.
- A
- 27
What is the main purpose of database normalization?
- A
To reduce anomalies and improve database structure
- B
To eliminate all relationships between tables
- C
To make every column contain multiple values
- D
To place all information in one large table
Correct answer
ATo 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.
- A
- 28
Which sequence correctly describes increasing database-design specificity?
- A
Conceptual, physical, logical
- B
Physical, conceptual, logical
- C
Logical, physical, conceptual
- D
Conceptual, logical, physical
Correct answer
DConceptual, logical, physical
Explanation
The conceptual schema describes broad relationships, the logical schema plans tables and columns, and the physical schema addresses implementation.
- A
- 29
What does the conceptual schema primarily describe?
- A
How data and entities are related in general
- B
The specific SQL syntax for inserting rows
- C
The exact server and storage engine configuration
- D
The final physical location of every database file
Correct answer
AHow data and entities are related in general
Explanation
The conceptual stage is a general brainstorming stage focused on relationships without implementation limitations.
- A
- 30
What does the logical schema primarily plan?
- A
Only the historical records kept in an archive
- B
Only the webpages shown to end users
- C
Only the hardware used by the database server
- D
Tables, columns, data types, and relationships
Correct answer
DTables, columns, data types, and relationships
Explanation
The logical stage turns conceptual relationships into planned tables, attributes, and connections.
- A
- 31
What does the physical schema address?
- A
Only the broad relationships between concepts
- B
Implementation choices such as the DBMS, server, and access methods
- C
Only whether a value is a string or a number
- D
Only the names of real-world entities
Correct answer
BImplementation 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.
- A
- 32
What does entity integrity require?
- A
Entities or rows must be uniquely identifiable
- B
Every column must contain only text
- C
Every relationship must be many-to-many
- D
Every table must have exactly two rows
Correct answer
AEntities or rows must be uniquely identifiable
Explanation
Entity integrity ensures uniqueness among entities, commonly through an identifier or key.
- A
- 33
What does referential integrity protect?
- A
The number of characters in a text field
- B
Valid connections between related tables
- C
The alphabetical order of all rows
- D
The visual layout of a database diagram
Correct answer
BValid connections between related tables
Explanation
Referential integrity ensures that references such as a comment's user ID point to an existing related entity.
- A
- 34
What is a domain in database design?
- A
The physical server hosting the database
- B
The collection of all tables in a database
- C
The parent entity in every relationship
- D
The acceptable set or range of values for a column
Correct answer
DThe 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.
- A
- 35
Why would the word “cake” violate the domain of a numeric phone-number column?
- A
It is text rather than an acceptable numeric phone value
- B
It refers to a user instead of an address
- C
It contains fewer than eleven characters
- D
It is a foreign key rather than a primary key
Correct answer
AIt 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.
- A
- 36
What does an atomic value contain?
- A
Every possible value for an entire column
- B
A list of multiple independent items in one field
- C
A complete set of related database tables
- D
One indivisible piece of information for the intended design
Correct answer
DOne indivisible piece of information for the intended design
Explanation
Atomicity means storing one intended item in each value rather than several independent items together.
- A
- 37
Which design best makes a person's name atomic?
- A
Store the name together with every address ever used
- B
Store all names in one comma-separated column
- C
Separate first, middle, and last name columns
- D
Store each letter of the name in a separate column
Correct answer
CSeparate first, middle, and last name columns
Explanation
The content recommends separating first, middle, and last names when those parts need to be treated independently.
- A
- 38
Why might an address be separated into street, city, state, and ZIP columns?
- A
To make every address identical in length
- B
To prevent the database from storing geographic information
- C
To ensure every address is stored as one long string
- D
To support more specific queries about locations
Correct answer
DTo support more specific queries about locations
Explanation
Separate address components allow queries such as finding users in a particular state or city.
- A
- 39
How should multiple email addresses for one user generally be modeled?
- A
Place all emails in one comma-separated value
- B
Create a separate column for every possible email
- C
Duplicate the entire user row for every email
- D
Store them as separate rows in a related email table
Correct answer
DStore them as separate rows in a related email table
Explanation
A separate related table allows multiple email rows while avoiding repeated user information.
- A
- 40
What does the first normal form primarily address?
- A
Only the choice between natural and surrogate keys
- B
Only the physical server used for storage
- C
Atomic values and the elimination of repeating groups
- D
Only transitive dependencies between non-key columns
Correct answer
CAtomic 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.
- A
- 41
What is a partial dependency?
- A
A foreign key references two different parent tables
- B
A non-key attribute depends on only part of a composite key
- C
A table has no primary key at all
- D
A value contains more than one character
Correct answer
BA 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.
- A
- 42
When is a table automatically in second normal form with respect to partial dependencies?
- A
When it contains at least two foreign keys
- B
When it uses a many-to-many relationship
- C
When its primary key consists of only one column
- D
When every value is stored as a string
Correct answer
CWhen its primary key consists of only one column
Explanation
A single-column key cannot have an attribute dependent on only part of the key.
- A
- 43
What is a transitive dependency?
- A
A non-key column depends on another non-key column that depends on the key
- B
A column contains one atomic value
- C
A foreign key points directly to a parent key
- D
A primary key directly identifies every row
Correct answer
AA 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.
- A
- 44
How is a transitive dependency typically removed?
- A
Replace the primary key with a repeated text value
- B
Move the dependent attributes to another table and reference it
- C
Add the same dependent attributes to every row
- D
Combine all related tables into one large table
Correct answer
BMove 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.
- A
- 45
Which statement about the normal forms is correct?
- A
The normal forms are unrelated independent checklists
- B
A database in third normal form is also in first and second normal form
- C
A database can reach third normal form without satisfying first normal form
- D
Second normal form must be applied before first normal form
Correct answer
BA 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.
- A
- 46
What is a one-to-one relationship?
- A
Every entity must relate to every entity in another table
- B
Each entity is related to at most one entity on the other side
- C
A relationship that cannot be represented with a key
- D
One entity relates to unlimited entities while the other relates to none
Correct answer
BEach 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.
- A
- 47
Which example best represents a one-to-one relationship as described?
- A
A student and the many classes they take
- B
A user and the many comments they post
- C
A membership type and its many members
- D
A person and a uniquely assigned social security number
Correct answer
DA 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.
- A
- 48
How is a one-to-one relationship commonly stored when one side is simply an attribute of the other?
- A
As repeated copies of the entire entity
- B
As a column in the same table
- C
As a mandatory many-to-many junction table
- D
As an unlimited list in one column
Correct answer
BAs 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.
- A
- 49
When might a one-to-one relationship use two tables instead of one?
- A
When the relationship is actually many-to-many
- B
When the related entity has many attributes of its own
- C
When repeated values are intentionally required
- D
When neither entity has any data to store
Correct answer
BWhen 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.
- A
- 50
What is a one-to-many relationship?
- A
One entity can relate to many entities, while each related entity relates to one
- B
Many entities can relate to many entities without an intermediary
- C
No entity can have more than one related value
- D
Each entity can relate to exactly one entity on both sides
Correct answer
AOne 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.
- A
- 51
How is a one-to-many relationship normally implemented?
- A
Put the one side's key as a foreign key in the many-side table
- B
Store all related values in one comma-separated field
- C
Duplicate the one-side row for every related entity
- D
Put every many-side value in separate columns of the one-side table
Correct answer
APut 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.
- A
- 52
In a user-comments example, which table is normally the child?
- A
The comments table
- B
The view-definition table
- C
The database server table
- D
The users table
Correct answer
AThe comments table
Explanation
A comment depends on a user who posted it, so the comment is the child and the user is the parent.
- A
- 53
What is a many-to-many relationship?
- A
One entity can relate to only one entity on either side
- B
Many entities relate to one entity, but not in the reverse direction
- C
A relationship that cannot involve foreign keys
- D
Many entities on each side can relate to many entities on the other side
Correct answer
DMany 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.
- A
- 54
Why is a many-to-many relationship not stored directly in a simple relational table design?
- A
Direct storage would create repeating columns or multiple values in one field
- B
A many-to-many relationship always has only one row
- C
Many-to-many relationships never contain real data
- D
Relational databases cannot store any foreign keys
Correct answer
ADirect 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.
- A
- 55
What is the standard solution for a many-to-many relationship?
- A
Create an intermediary or junction table
- B
Duplicate each parent table for every relationship
- C
Add unlimited class columns to the student table
- D
Store all related IDs in one text field
Correct answer
ACreate an intermediary or junction table
Explanation
A junction table breaks the many-to-many relationship into two one-to-many relationships.
- A
- 56
What does a row in a student-class junction table represent?
- A
All students enrolled in every class
- B
One specific connection between one student and one class
- C
Only the attributes of a student unrelated to classes
- D
Every class available at the college
Correct answer
BOne specific connection between one student and one class
Explanation
Each junction-table row represents one enrollment connection between a particular student and class.
- A
- 57
What determines whether a relationship is one-to-one, one-to-many, or many-to-many in an application?
- A
The spelling of the table names
- B
The rules and requirements of the specific application
- C
The physical size of the database server
- D
Whether the database uses numeric values
Correct answer
BThe 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.
- A
- 58
What is the role of a primary key?
- A
To uniquely identify rows in its table
- B
To display a user-friendly version of a table
- C
To store every related row from another table
- D
To define only the acceptable text length
Correct answer
ATo uniquely identify rows in its table
Explanation
A primary key identifies each entity uniquely within its table.
- A
- 59
What is the role of a foreign key?
- A
To replace every primary key in the database
- B
To reference a key in another table and connect related data
- C
To store only values that have no relationships
- D
To ensure every column contains a different data type
Correct answer
BTo 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.
- A
- 60
Which rule normally applies to a primary key?
- A
It may be empty whenever the entity lacks an attribute
- B
It should change whenever a relationship changes
- C
It must be unique, non-null, and stable
- D
It must be repeated in every row
Correct answer
CIt must be unique, non-null, and stable
Explanation
The content emphasizes that keys should be unique, never changing, and never null.
- A
- 61
Which statement correctly compares primary and foreign keys?
- A
A table may have unlimited primary keys but no foreign keys
- B
A table has one primary key but may have multiple foreign keys
- C
Primary keys can be empty while foreign keys cannot be empty
- D
Foreign keys identify rows while primary keys only format them
Correct answer
BA 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.
- A
- 62
What is a natural key?
- A
A key based on meaningful data already stored in the table
- B
A key that must always contain multiple columns
- C
A key that is never used to enforce uniqueness
- D
A random identifier added only for database purposes
Correct answer
AA 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.
- A
- 63
What is a surrogate key?
- A
A generated identifier added for database uniqueness
- B
A foreign key that always changes with the parent
- C
A column that stores several values in one field
- D
A meaningful real-world value such as a username
Correct answer
AA generated identifier added for database uniqueness
Explanation
A surrogate key is typically an automatically generated number with no intended real-world meaning.
- A
- 64
Why might a designer prefer a surrogate key over a natural key?
- A
It provides a stable, simple identifier without relying on changing real-world data
- B
It removes the need for foreign-key relationships
- C
It allows duplicate primary-key values
- D
It guarantees that no other columns need indexes
Correct answer
AIt 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.
- A
- 65
What is a candidate key?
- A
Any collection of columns, regardless of redundancy
- B
A key that must be used as a foreign key
- C
A generated number that has no database purpose
- D
The smallest set of columns sufficient to ensure uniqueness
Correct answer
DThe smallest set of columns sufficient to ensure uniqueness
Explanation
A candidate key is a minimal set of columns that uniquely identifies rows.
- A
- 66
What is a super key?
- A
A key used only to identify parent tables
- B
Only the smallest possible unique column set
- C
Any set of columns that uniquely identifies every row
- D
A key that can contain duplicate rows
Correct answer
CAny 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.
- A
- 67
What is an alternate key?
- A
A duplicate value intentionally stored in a table
- B
A candidate key not selected as the primary key
- C
A foreign key that references two parents
- D
A key that is allowed to be null
Correct answer
BA 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.
- A
- 68
What does a foreign-key constraint help prevent?
- A
A primary key from being unique
- B
A child row from referencing a nonexistent parent
- C
A table from containing any rows
- D
A query from returning selected columns
Correct answer
BA child row from referencing a nonexistent parent
Explanation
Foreign-key constraints preserve referential integrity by requiring references to valid parent keys.
- A
- 69
What does the
ON DELETE CASCADEbehavior generally do?- A
Prevents deletion of a parent with children
- B
Deletes related child rows when the parent is deleted
- C
Sets every child value to a new unrelated key
- D
Deletes only the parent while preserving invalid references
Correct answer
BDeletes related child rows when the parent is deleted
Explanation
Cascade deletion propagates the parent's deletion to related child rows.
- A
- 70
What does a restrict behavior generally do when a referenced parent is deleted?
- A
It deletes every child automatically
- B
It sets all child references to an empty value
- C
It changes the parent key to a new number
- D
It prevents the deletion and produces an error
Correct answer
DIt prevents the deletion and produces an error
Explanation
Restrict prevents an operation that would leave invalid child references.
- A
- 71
What does
SET NULLrequire of a foreign-key column?- A
The column must contain only positive integers
- B
The column must always be a primary key
- C
The column must be part of a many-to-many relationship
- D
The column must be allowed to contain null values
Correct answer
DThe 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.
- A
- 72
What is the difference between a simple key and a composite key?
- A
A simple key is foreign, while a composite key is always primary
- B
A simple key allows duplicates, while a composite key forbids all nulls
- C
A simple key uses one column, while a composite key uses multiple columns
- D
A simple key is physical, while a composite key is conceptual
Correct answer
CA 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.
- A
- 73
What is a compound key in the terminology presented?
- A
A key that contains no foreign-key references
- B
A key used only to sort a table alphabetically
- C
A single-column key generated automatically
- D
A multi-column key in which the component columns are themselves keys
Correct answer
DA 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.
- A
- 74
What is the main purpose of an index?
- A
To make frequently used searches and joins faster
- B
To prevent tables from being normalized
- C
To guarantee that every value in a table is unique
- D
To replace the database's primary keys
Correct answer
ATo make frequently used searches and joins faster
Explanation
Indexes help the database locate relevant rows without scanning the entire table.
- A
- 75
What is a table scan?
- A
Sorting a table permanently by its primary key
- B
Searching rows throughout the table to find matching data
- C
Creating a new table from a database view
- D
Joining only two foreign-key columns
Correct answer
BSearching 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.
- A
- 76
What is an index seek?
- A
Deleting all rows that lack a foreign key
- B
Reading every row from the beginning of a table
- C
Changing a natural key into a surrogate key
- D
Using an index to go directly toward matching data
Correct answer
DUsing 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.
- A
- 77
What distinguishes a nonclustered index from a clustered index?
- A
A nonclustered index is always primary, while a clustered index is always foreign
- B
A nonclustered index points to data, while a clustered index organizes the data itself
- C
A nonclustered index stores the table, while a clustered index stores only passwords
- D
A nonclustered index cannot support searches, while a clustered index can
Correct answer
BA 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.
- A
- 78
Why can a table generally have only one clustered index?
- A
A clustered index is not associated with any table
- B
The data cannot be physically organized in two conflicting orders at once
- C
Clustered indexes cannot contain numeric values
- D
Every clustered index must contain a foreign key
Correct answer
BThe 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.
- A
- 79
What is a drawback of creating many indexes?
- A
Indexes prevent all queries from returning results
- B
Indexes eliminate the need for database design
- C
Updates require maintaining the indexes as well as the table
- D
Indexes force every column to contain text
Correct answer
CUpdates require maintaining the indexes as well as the table
Explanation
Indexes improve reads but add maintenance work when stored data changes.
- A
- 80
What is a composite index?
- A
An index built from two or more columns
- B
An index that physically duplicates every table
- C
An index that contains no searchable columns
- D
An index that can exist only on a foreign key
Correct answer
AAn 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.
- A
- 81
Which three broad data-type categories were emphasized?
- A
Conceptual, logical, and physical
- B
Primary, foreign, and alternate
- C
String, numeric, and date
- D
Table, row, and column
Correct answer
CString, numeric, and date
Explanation
The content groups data types broadly into strings, numeric values, and dates or times.
- A
- 82
What is the key distinction between a character type and a variable-character type?
- A
A character type cannot contain letters, while a variable-character type can
- B
A character type uses a fixed length, while a variable-character type can vary in length
- C
A character type stores numbers, while a variable-character type stores dates
- D
A character type is always numeric, while a variable-character type is always Boolean
Correct answer
BA 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.
- A
- 83
What kind of data is an integer designed to store?
- A
Whole numbers without fractional parts
- B
Long text messages with unlimited characters
- C
Dates combined with time zones
- D
Only negative decimal fractions
Correct answer
AWhole numbers without fractional parts
Explanation
An integer stores whole numbers, such as 512, 28, or −52.
- A
- 84
What is the difference between signed and unsigned numeric values?
- A
Signed values are always text, while unsigned values are always dates
- B
Signed values may be negative, while unsigned values cannot be negative
- C
Signed values are keys, while unsigned values are foreign keys
- D
Signed values use fixed length, while unsigned values use variable length
Correct answer
BSigned 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.
- A
- 85
Why might an exact decimal type be preferred over a floating-point type for some values?
- A
Decimal types are used only for usernames and passwords
- B
Floating-point types cannot store any numeric values
- C
Decimal storage can provide more appropriate exactness for certain calculations
- D
Floating-point values always require more database tables
Correct answer
CDecimal 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.
- A
- 86
What does a timestamp generally record?
- A
The time at which an event or row was created or changed
- B
The total number of rows in a database
- C
The acceptable range of values in a column
- D
The name of the table containing a foreign key
Correct answer
AThe 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.
- A
- 87
What is the purpose of a view mechanism?
- A
To present selected data differently without changing its internal structure
- B
To remove all security restrictions from a database
- C
To replace SQL with spreadsheet formulas
- D
To permanently duplicate every table for each user
Correct answer
ATo present selected data differently without changing its internal structure
Explanation
Views change the surface presentation of data while the underlying storage structure remains unchanged.
- A
- 88
How can views improve database security?
- A
They can expose only the information a particular user needs
- B
They require every user to see all private columns
- C
They eliminate the need for authentication
- D
They allow every user to modify the database structure
Correct answer
AThey 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.
- A
- 89
What does an inner join return?
- A
Every row from the left table regardless of matches
- B
Rows with matching connections in both joined tables
- C
Every row from the right table regardless of matches
- D
Only rows that contain null foreign keys
Correct answer
BRows with matching connections in both joined tables
Explanation
An inner join returns the intersection: rows that satisfy the join condition in both tables.
- A
- 90
What does a left outer join preserve?
- A
Only rows that occur in both tables
- B
Only rows whose foreign keys are null
- C
Every row from the left table, with matches from the right when available
- D
Every row from the right table, excluding unmatched left rows
Correct answer
CEvery 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.
- A
- 91
What does a right outer join preserve?
- A
Only rows with empty primary keys
- B
Every row from the right table, with matches from the left when available
- C
Every row from the left table, excluding unmatched right rows
- D
Only rows found in both tables
Correct answer
BEvery 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.
- A
- 92
Why can a right join often be rewritten as a left join?
- A
Switching the table order can produce the same result more consistently
- B
A left join automatically removes all unmatched rows
- C
Right joins can only be used with numeric columns
- D
Right joins and left joins never return related rows
Correct answer
ASwitching 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.
- A
- 93
When joining three tables, how is the result conceptually formed?
- A
Only the first and last tables participate in the join
- B
All tables are physically merged before any condition is evaluated
- C
The first join produces an intermediate result that is joined with the third table
- D
Each table is independently displayed without matching rows
Correct answer
CThe 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.
- A
- 94
What is an alias in SQL?
- A
A permanent replacement for a primary key
- B
A data type used for dates and times
- C
A constraint that prevents duplicate rows
- D
A temporary alternative name for a table or column
Correct answer
DA 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.
- A
- 95
Why is an alias essential in a self-join?
- A
It converts a table into a primary key
- B
It prevents the table from containing foreign keys
- C
It distinguishes multiple uses of the same table
- D
It makes every value in the table unique
Correct answer
CIt distinguishes multiple uses of the same table
Explanation
A self-join uses the same table in different roles, so aliases identify those roles separately.
- A
- 96
What is a self-join?
- A
Joining a table to a spreadsheet with identical columns
- B
Joining a table to another logical use of that same table
- C
Joining every table in a database at once
- D
Joining only tables without primary keys
Correct answer
BJoining 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.
- A
- 97
Why might a lookup table be used for membership statuses?
- A
It centralizes allowed statuses and reduces repeated descriptive data
- B
It forces every member to have a different status
- C
It allows unlimited unrelated values in the status column
- D
It removes the need for a membership identifier
Correct answer
AIt 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.
- A
- 98
What advantage results when a member table references a membership lookup table by ID?
- A
Changing a status name requires updating one lookup row
- B
The membership description must be repeated in every row
- C
Every member must receive a unique membership type
- D
The database can no longer enforce valid statuses
Correct answer
AChanging 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.
- A

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