Q1
True / FalseIn PostgreSQL, a surrogate key is typically an auto-incremented integer.
A surrogate key is often implemented as an auto-incremented integer that uniquely identifies each row in a table.
Q2
True / FalseIn PostgreSQL, a surrogate key has no business meaning.
A surrogate key is an artificial identifier with no inherent meaning in the business context, used solely for uniquely identifying rows.
Q3
True / FalseIn PostgreSQL, a table with a surrogate key cannot have any other candidate keys.
A table with a surrogate key can have other candidate keys, which are alternative unique identifiers that have business meaning.
Q4
True / FalseIn PostgreSQL, using a surrogate key simplifies updates to the database schema.
Surrogate keys are stable and do not change, which simplifies updates to the schema and prevents issues with changing business keys.
Q5
True / FalseIn PostgreSQL, a surrogate key can be used as a foreign key in other tables.
Surrogate keys are often used as foreign keys in related tables to maintain referential integrity.
Q6
True / FalseIn PostgreSQL, a surrogate key must always be an integer.
While surrogate keys are often integers, they can also be UUIDs or other types of unique identifiers.
Q7
True / FalseIn PostgreSQL, using a surrogate key can prevent duplication of data.
Surrogate keys uniquely identify rows, but they do not inherently prevent data duplication; constraints and careful data design are required to prevent duplicates.
Q8
True / FalseIn PostgreSQL, surrogate keys can improve the performance of join operations.
Surrogate keys, being typically numeric and indexed, can improve the performance of join operations compared to complex natural keys.
Q9
True / FalseIn PostgreSQL, a surrogate key can be used in combination with a natural key for indexing purposes.
A surrogate key can be the primary key, while a natural key can be indexed to provide faster access based on meaningful data.
Q10
True / FalseIn PostgreSQL, a surrogate key should always be preferred over a natural key for primary key usage.
While surrogate keys have advantages, the choice between a surrogate key and a natural key depends on the specific requirements and context of the database design. Both have their own pros and cons.