Reference no: EM133901836
Questions
1. What is the use of Constraints in SQL Server?
a. Is used to limit the type of data that can go into a table
b. To ensure the accuracy and reliability of the data in the table
c. For data integrity and correctness
d. All of the the above
2. What is CHECK Constraint in SQL Server?
a. The CHECK constraint is used to enforce domain integrity.
b. In simple words, we can say that Domain Integrity enforces valid entries for a given column by restricting the type, the format, or the range of possible values.
c. Check constraints allow us to define an expression for a TABLE that must not evaluate to FALSE for a data modification statement to succeed.
d. All of the Above
3. To impose a FOREIGN KEY Constraint, we do require the following things.
a. We require two tables for binding with each other and those two tables must have a common column for linking the tables.
b. The common column that is present in both the tables need not have the same name but their data type must be the same.
c. The common column which is present in the child or detailed table is known as the FOREIGN key column and we need to impose a FOREIGN key constraint on the column which refers to the reference key column of the master table.
d. All of the Above
4. What is a Unique Constraint in SQL Server?
a. A UNIQUE constraint is used to avoid duplicate values but accepted null values in a column.
b. It enforces the uniqueness of the values in a set of columns, so no duplicate values are entered. The unique key constraints are used to enforce entity integrity as the primary key constraints.
c. A table can contain multiple number of UNIQUE constraints
The UNIQUE constraint will accept 1 NULL value only.
d. All of the Above
5. What is NOT NULL Constraint in SQL Server?
a. The NOT NULL Constraint is used to avoid NULL values but accepted duplicate values into a column
b. We can apply the NOT NULL constraint on any data type column such as integer, character, money, etc.
c. A table can contain any number of NOT NULL constraints
d. All of the Above
6. Which of the following transfer methods make the source database unavailable to users during the copy process of the database to another Instance?
a. Detach and attach method
b. SQL Management Object (SMO) method only
c. Backup and Restore method
d. None of the mentioned
7. Which of the following is a class of constraint in SQL Server?
a. DEFAULT
b. PRIMARY KEY AND FOREIGN KEY
c. UNIQUE
d. CHECK
e. ALL
8. Point out the correct statement
a. CHECK constraint enforce DOMAIN/RANGE integrity.
b. In a UNIQUE constraint, no two rows in the table can have the same value for the column.
d. Default constraint is used to provide a default value for a column.
e. All of the mentioned.
9. Which one of the following constraints does not enforce uniqueness?
a. Unique
b. Primary key
c. Foreign key
d. None of the mentioned
10. Constraints are applied specifically on a ___________
a. Column
b. Table
c. Row
d. All
11. How many types of constraints are present in SQL Server? Please exclude properties.
5
4
6
7
12. Which one of the constraints below can be enforced one per table?
a. Foreign Key constraint
b. Primary key constraint
c. Not Null constraint
d. Check constraint
13. Which of the following is false about PRIMARY KEY?
a. Only one per table.
b. No null value.
c. it accepts only one value.
d. Uniquely identifies each row in a table.
14. Which one of the following system databases holds temporary data?
a. Tempdb
b. Msdb
c. DBA
d. Master
15. Which one of the following stored procedures is used for to show the database object details or properties?
a. sp_helpSysObject 'Object'
b. sp_help 'object'
c. sp_helpUserObject 'Object'
d. All
16. We can impose constraints on a table in two different ways.
a. Table and Column-level imposing a constraint
b. Table level imposing a constraint
c. Column-level imposing a constraint
d. Row and Column- level imposing a constraint
17. Primary key creates _________ index by default that physically ordered the data.
a. FILTERED INDEX
b. XML-INDEX
c. NON-CLUSTERED
e. CLUSTERED
18. Unique Key constraints creates ___________index by default that logically ordered the data.
a. XML-INDEX
b. NON-CLUSTERED
c. FILTERED INDEX
d. CLUSTERED
19. What type of constraints is defined in the table below?
CREATE TABLE BRANCHDETAILS
(
CITY VARCHAR(50),
BRANCHCODE VARCHAR(10),
BRANCHLOCATION VARCHAR (30),
CONSTRAINT CITY_BC_UNIQUE UNIQUE(CITY, BRANCHCODE)
)
a. UNIQUE KEY constraint
b. COMPOSITE constraint
c. PRIMARY KEY constraint
d. CHECK KEY constraint
20. A foreign key can contain null values.
True
False
21. Which of the following columns in a table cannot be updated without setting cascade update?
a. DATE type columns in the table.
b. Columns which allows Null values in the table.
c. A primary key column which also servers as a foreign key reference in another table.
d. All of the above