Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- Which data constraint ensures that all values in a specific column are different from each other?
a. Check constraint
b. Unique constraint
c. Not null constraint
d. Default constraint
Answer: b. Unique constraintibm+2 - What is the purpose of a NOT NULL constraint in data science?
a. Prevents duplicates
b. Allows null values
c. Prohibits null values
d. Sets default values
Answer: c. Prohibits null valuesred-gate+2 - Which constraint is used to limit the values that can be stored in a column based on a specific condition?
a. Primary key
b. Foreign key
c. Check constraint
d. Unique constraint
Answer: c. Check constrainttrainings.internshala+2 - What type of constraint is used to establish a link between two tables?
a. Primary key
b. Check constraint
c. Default constraint
d. Foreign key
Answer: d. Foreign keyibm+2 - Which constraint is always associated with a candidate key?
a. Domain constraint
b. Primary key
c. Default constraint
d. Not null constraint
Answer: b. Primary keyowox+2 - The main function of a default constraint is to:
a. Restrict data type
b. Provide a value if none is supplied
c. Block duplicate entries
d. Validate data format
Answer: b. Provide a value if none is suppliedred-gate+1 - Which of the following is a domain constraint?
a. Ensuring unique values
b. Restricting possible data types and formats
c. Enforcing relationship integrity
d. Generating automatic values
Answer: b. Restricting possible data types and formatsgeeksforgeeks+1 - What does a referential integrity constraint enforce?
a. Data uniqueness
b. Relationship between tables
c. Non-null values
d. Value range checking
Answer: b. Relationship between tablesgeeksforgeeks+2 - Which constraint is violated if two rows have the same primary key?
a. Foreign key constraint
b. Unique constraint
c. Not null constraint
d. Check constraint
Answer: b. Unique constraintowox+2 - In SQL, which constraint can only be applied at the table level, not the column level?
a. Domain constraint
b. Unique constraint
c. Primary key constraint
d. Foreign key constraint
Answer: d. Foreign key constraintw3schools+2 - A constraint that ensures the value in a column matches values in another table is:
a. Default constraint
b. Primary key constraint
c. Foreign key constraint
d. Not null constraint
Answer: c. Foreign key constraintibm+2 - Which constraint affects only a single column within a table?
a. Table-level constraint
b. Domain constraint
c. Column-level constraint
d. Referential constraint
Answer: c. Column-level constraintw3schools+1 - Data quality constraint “completeness” refers to:
a. All values are unique
b. No values are missing
c. All values follow a pattern
d. All values are within a range
Answer: b. No values are missingcalibo - What type of constraint ensures that the data entered matches a specific type, like integer or string?
a. Domain constraint
b. Unique constraint
c. Default constraint
d. Check constraint
Answer: a. Domain constraintgeeksforgeeks+2 - Which constraint is used to ensure that a column contains only positive numbers?
a. Primary key constraint
b. Not null constraint
c. Check constraint
d. Unique constraint
Answer: c. Check constraintcalibo+2 - _________ is a constraint that avoids entry of duplicate rows in a table.
a. Unique constraint
b. Not null constraint
c. Default constraint
d. Foreign key constraint
Answer: a. Unique constraintalooba+2 - Which constraint describes a column or set of columns that uniquely identifies each row in a table?
a. Primary key constraint
b. Foreign key constraint
c. Check constraint
d. Default constraint
Answer: a. Primary key constraintowox+2 - The constraint best used for data profiling to count distinct column values is:
a. ApproxCountDistinct
b. Default
c. Foreign key
d. PatternMatch
Answer: a. ApproxCountDistinctcalibo - A table check constraint can be used to ensure:
a. No foreign key exists
b. Values satisfy a Boolean expression
c. Data types are identical
d. Null values are presented
Answer: b. Values satisfy a Boolean expressionred-gate+1 - Which of the following is not a standard data constraint in relational databases?
a. Not null constraint
b. Floating key constraint
c. Foreign key constraint
d. Check constraint
Answer: b. Floating key constraintgeeksforgeeks+1 - A data constraint that restricts the values in a column to a specific enumerated set is called a:
a. Domain constraint
b. Unique constraint
c. Check constraint
d. Foreign key
Answer: a. Domain constraintgeeksforgeeks+1 - Which constraint in SQL is used to automatically assign a value if the data is not provided?
a. Foreign key
b. Default
c. Not null
d. Unique
Answer: b. Defaulttrainings.internshala+1 - What happens when a NOT NULL constraint is applied to a column?
a. Allows any type of value
b. Allows only distinct values
c. Disallows missing values
d. Ensures referential integrity
Answer: c. Disallows missing valuesgeeksforgeeks+2 - Which of these best describes a referential constraint?
a. A key value should be unique
b. Value must be within the domain
c. A value must exist in another table
d. Value must not be null
Answer: c. A value must exist in another tableibm+2 - Which type of constraint might use a regular expression to validate the data format?
a. Check constraint
b. Unique constraint
c. Not null constraint
d. Foreign key constraint
Answer: a. Check constraintcalibo+1 - To prevent negative numbers from being entered in a salary column, use a:
a. Unique constraint
b. Not null constraint
c. Check constraint
d. Foreign key constraint
Answer: c. Check constraintred-gate+2 - The “completeness” constraint in data quality is most closely related to which SQL constraint?
a. Check
b. Foreign key
c. Unique
d. Not null
Answer: d. Not nullcalibo - Which constraint would prohibit the entry of two employees with the same employee number?
a. Check constraint
b. Unique constraint
c. Default constraint
d. Foreign key constraint
Answer: b. Unique constraintalooba+1 - What is the main difference between a primary key and a unique constraint?
a. Primary keys are never indexed
b. Unique can allow nulls; Primary key cannot
c. Primary key allows duplicates
d. Unique is only for numbers
Answer: b. Unique can allow nulls; Primary key cannotibm+1 - Which of these is used for statistical validation of numeric data?
a. Completeness constraint
b. Statistical Value constraint
c. Foreign key constraint
d. Default constraint
Answer: b. Statistical Value constraintcalibo - If a table’s column must always reference a value present in another table, which constraint is used?
a. Default constraint
b. Check constraint
c. Foreign key constraint
d. Unique constraint
Answer: c. Foreign key constraintowox+1 - To restrict a column to contain only certain string lengths, use:
a. MaxLength/MinLength constraint
b. Default constraint
c. Unique constraint
d. Foreign key constraint
Answer: a. MaxLength/MinLength constraintcalibo - What is the role of an informational constraint?
a. Always enforced by the DBMS
b. Never enforced by the DBMS
c. Sometimes enforced
d. Related to referential integrity
Answer: b. Never enforced by the DBMSibm - Which constraint ensures the relationship between tables stays consistent after update or delete?
a. Not null constraint
b. Unique constraint
c. Referential integrity constraint
d. Domain constraint
Answer: c. Referential integrity constraintgeeksforgeeks+1 - The “distinctness” constraint in data analytics checks:
a. Data distribution
b. Data type adherence
c. Number of unique values
d. Order of values
Answer: c. Number of unique valuescalibo - Mapping cardinality is a constraint that expresses:
a. Minimum value allowed
b. Number of entities related in a relationship set
c. Data allowed in a domain
d. Data types allowed in a column
Answer: b. Number of entities related in a relationship setsanfoundry+1 - Count constraints in data profiling usually refer to:
a. Sum of all values
b. Minimum values
c. Distinct, filled, and null counts
d. Maximum number of columns
Answer: c. Distinct, filled, and null countscalibo - What does a check constraint do when a value doesn’t meet specified criteria?
a. Accepts the value
b. Converts the value
c. Rejects the value
d. Trims the value
Answer: c. Rejects the valuered-gate+1 - Which constraint can be expressed as a regular expression to match column patterns?
a. PatternMatch constraint
b. Unique constraint
c. Default constraint
d. Foreign key constraint
Answer: a. PatternMatch constraintcalibo - A “handle missing data” constraint in data quality ensures:
a. Outliers are removed
b. Duplicates are filtered
c. Null or empty values are managed
d. All values are positive
Answer: c. Null or empty values are managedcalibo - Entropy as a constraint in data analysis measures:
a. Data type
b. Value uniqueness
c. Disorder in a column
d. Statistical mean
Answer: c. Disorder in a columncalibo - If two columns in a dataset must always maintain a specific linear relationship, what constraint can be used?
a. Foreign key
b. Correlation constraint
c. Default constraint
d. Unique constraint
Answer: b. Correlation constraintcalibo - Which constraint is used to confirm that two columns are related by some information overlap?
a. Entropy constraint
b. PatternMatch constraint
c. MutualInformation constraint
d. MaxLength constraint
Answer: c. MutualInformation constraintcalibo - Check constraints can be used for which of the following?
a. Specifying minimum and maximum values
b. Validating nulls
c. Managing foreign keys
d. Setting default values
Answer: a. Specifying minimum and maximum valuesred-gate+1 - A uniqueness constraint is essential for:
a. Handling missing values
b. Assigning default values
c. Preventing duplicate entries
d. Ensuring statistical mean
Answer: c. Preventing duplicate entriesalooba+1 - The validator constraint “hasSize” confirms:
a. Data frame size
b. Null values are present
c. Minimum values exist
d. Data distribution is uniform
Answer: a. Data frame sizecalibo - Which constraint is applied to ensure each email address in a column is unique and valid?
a. Unique and PatternMatch constraints
b. Completeness constraint
c. Foreign key constraint
d. Default constraint
Answer: a. Unique and PatternMatch constraintsalooba+1 - “IsNonNegative” data quality constraint is applicable to:
a. String columns
b. Date columns
c. Numeric columns
d. Boolean columns
Answer: c. Numeric columnscalibo - What is “compliance” constraint in data profiling?
a. Ratio of rows that match given constraint
b. Data columns are not null
c. All records have unique values
d. String patterns are validated
Answer: a. Ratio of rows that match given constraintcalibo - The main purpose of constraints in data science is to:
a. Improve query performance
b. Restrict data entry to maintain quality and integrity
c. Enable distributed computing
d. Increase storage
Answer: b. Restrict data entry to maintain quality and integrityalooba+3
- https://www.ibm.com/docs/en/ias?topic=constraints-types
- https://www.alooba.com/skills/concepts/database-design-160/data-integrity-constraints/
- https://www.red-gate.com/blog/database-constraints-types
- https://www.geeksforgeeks.org/sql/sql-constraints/
- https://trainings.internshala.com/blog/different-types-of-constraints-in-sql/
- https://www.owox.com/blog/articles/key-constraints-sql
- https://www.geeksforgeeks.org/dbms/constraints-on-relational-database-model/
- https://www.w3schools.com/sql/sql_constraints.asp
- https://help.calibo.com/lazsa/content/data%20and%20analytics/data%20quality%20constraints.htm
- https://www.sanfoundry.com/database-mcqs-constraints/
- https://www.includehelp.com/mcq/dbms-constraints-multiple-choice-questions-mcqs.aspx
- https://interviewkickstart.com/blogs/articles/data-science-mcq-answers
- https://testbook.com/objective-questions/mcq-on-relational-constraints–5eea6a0939140f30f369da99
- https://www.interviewbit.com/data-science-mcq/
- https://www.sanfoundry.com/1000-data-structure-questions-answers/
- https://www.sciencedirect.com/topics/computer-science/data-constraint
- https://www.geeksforgeeks.org/quizzes/top-50-data-structures-mcqs-with-answers/
- https://www.scribd.com/document/518989385/DSBDa-mcq
- https://docs.getdbt.com/reference/resource-properties/constraints
- https://www.javaguides.net/2023/12/data-science-quiz.html