Data Model Integrity Flashcards
What is the primary purpose of an index in a database?
A) To enforce referential integrity
B) To store data in sorted order
C) To speed up data retrieval from tables
D) To reduce storage space
C
What happens to an index when data is inserted or updated in the database?
A) The index remains unchanged
B) The index is also updated to match the new data
C) The index is automatically deleted
D) The index becomes invalid
B
Why is it important to use indexes carefully?
A) Indexes are not supported in OutSystems
B) Indexes can speed up retrieval but may cause performance issues if overused
C) Indexes reduce the storage capacity of the database
D) Indexes can only be created automatically
B
Which of the following is not a reason to create an index?
A) To avoid duplicate data
B) To speed up data retrieval based on specific attributes
C) To increase storage space
D) To enforce uniqueness on a set of attributes
C
What is an example of a unique index mentioned in the text?
A) Ensuring only one instance of a product exists for a specific order
B) Ensuring all orders for a customer are deleted when the customer is deleted
C) Ensuring indexes are applied to all attributes
D) Ensuring a product is deleted when its category is deleted
A
What is the purpose of the Delete Rule property?
A) To prevent data from being inserted
B) To handle what happens when a record from the referenced entity is deleted
C) To enforce the uniqueness of attributes
D) To speed up the deletion process
B
What happens if the Delete Rule is set to Protect?
A) The referenced record will be deleted along with its dependent records
B) The deletion of the record will be allowed, regardless of any references
C) The referenced record cannot be deleted if related records exist
D) The record is deleted, but the reference remains
C
What does the Delete option in the Delete Rule do?
A) Prevents the deletion of a record if it is referenced
B) Ignores the relationship between entities
C) Cascades the deletion to all related records
D) Automatically creates an index on the related attributes
C
What is the result of setting the Delete Rule to Ignore?
A) The record will not be deleted
B) The deletion will be ignored, and nothing happens
C) The referenced record is deleted, but related records remain without referential integrity
D) All related records are deleted
C
Which of the following is not a consequence of using Ignore in the Delete Rule?
A) The relationship between records is not maintained
B) The related records remain without a valid reference
C) Referential integrity is guaranteed
D) Orphaned records may remain in the database
C
Which two Delete Rule options ensure referential integrity?
A) Protect and Ignore
B) Protect and Delete
C) Ignore and Delete
D) Index and Protect
B
What is the potential downside of using Delete Rules in a database?
A) They may cause performance overhead
B) They enforce uniqueness but not integrity
C) They slow down the process of data retrieval
D) They are applied automatically without developer control
A
How can developers enforce delete rules without using the database’s built-in Delete Rule property?
A) By adding custom logic in the application code
B) By creating multiple indexes
C) By using the Ignore option in the Delete Rule
D) By disabling referential integrity
A
What is the main advantage of creating a custom index on an entity attribute?
A) It automatically increases storage space
B) It speeds up retrieval of data when querying that attribute
C) It prevents all deletions in the entity
D) It enforces the Delete Rule property
B
What should be done before creating or modifying indexes in OutSystems?
A) Nothing, as indexes are created automatically
B) Perform performance testing to ensure the indexes do not slow down the system
C) Delete all existing indexes
D) Disable referential integrity in the database
B