Quiz Discussion

Which of the following is not an integrity constraint?

Course Name: SQL -Structured Query Language

  • 1]

    Not null

  • 2]

    Positive

  • 3]

    Unique

  • 4]

    Check ‘predicate’

Solution
No Solution Present Yet

Top 5 Similar Quiz - Based On AI&ML

Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api

# Quiz
1
Discuss

To include integrity constraint in an existing relation use :

  • 1]

    Create table

  • 2]

    Modify table

  • 3]

    Alter table

  • 4]

    Any of the above

Solution
2
Discuss

Which of the following is the right syntax for assertion?

  • 1]

    Create assertion 'assertion-name' check 'predicate';

  • 2]

    Create assertion check 'predicate' 'assertion-name';

  • 3]

    Create assertions 'predicates';

  • 4]

    All of the mentioned

Solution
3
Discuss

Data integrity constraints are used to

  • 1]

    Control who is allowed access to the data

  • 2]

    Ensure that duplicate records are not entered into the table

  • 3]

    Improve the quality of data entered for a specific property (i.e., table column)

  • 4]

    Prevent users from changing the values stored in the table

Solution
4
Discuss

____________ is preferred method for enforcing data integrity.

  • 1]

    Constraints

  • 2]

    Stored Procedure

  • 3]

    Triggers

  • 4]

    Cursors

Solution
5
Discuss

Drop Table cannot be used to drop a table referenced by a _________ constraint.

  • 1]

    Local Key

  • 2]

    Primary Key

  • 3]

    Composite Key

  • 4]

    Foreign Key

Solution
6
Discuss

Which of the following can be addressed by enforcing a referential integrity constraint?

  • 1]

    All phone numbers must include the area code

  • 2]

    Certain fields are required (such as the email address, or phone number) before the record is accepted

  • 3]

    Information on the customer must be known before anything can be sold to that custome

  • 4]

    When entering an order quantity, the user must input a number and not some text (i.e., 12 rather than ‘a dozen’)

Solution
7
Discuss
CREATE TABLE Employee(Empid NUMERIC NOT NULL, Name VARCHAR(20) , dept_name VARCHAR(20), Salary NUMERIC UNIQUE(Empid,Name));
INSERT INTO Employee VALUES(1002, Ross, CSE, 10000)
INSERT INTO Employee VALUES(1006,Ted,Finance, );
INSERT INTO Employee VALUES(1002,Rita,Sales,20000);

What will be the result of the query?

  • 1]

    All statements executed

  • 2]

    Error in create a statement

  • 3]

    Error in insert into Employee values(1006,Ted,Finance, );

  • 4]

    Error in insert into Employee values(1008,Ross,Sales,20000);

Solution
8
Discuss

Domain constraints, functional dependency and referential integrity are special forms of  _______

  • 1]

    Foreign key

  • 2]

    Primary key

  • 3]

    Assertion

  • 4]

    Referential constraint

Solution
9
Discuss

Which of the following is the right syntax for the assertion?

  • 1]

    Create assertion ‘assertion-name’ check ‘predicate’;

  • 2]

    Create assertion check ‘predicate’ ‘assertion-name’;

  • 3]

    Create assertions ‘predicates’;

  • 4]

    All of the mentioned

Solution
10
Discuss

Which of the following is used to delete the entries in the referenced table when the tuple is deleted in the course table?

CREATE TABLE course
( ...
FOREIGN KEY (dept name) REFERENCES department
... );

 

  • 1]

    Delete

  • 2]

    Delete cascade

  • 3]

    Set null

  • 4]

    All of the mentioned

Solution
# Quiz