Quiz Discussion

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

Course Name: SQL -Structured Query Language

  • 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
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

A foreign key is the one in which the ________ of one relation is referenced in another relation.

  • 1]

    Foreign key

  • 2]

    Primary key

  • 3]

    References

  • 4]

    Check constraint

Solution
2
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
3
Discuss

Which of the following is not an integrity constraint?

  • 1]

    Not null

  • 2]

    Positive

  • 3]

    Unique

  • 4]

    Check ‘predicate’

Solution
4
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
5
Discuss

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

  • 1]

    Foreign key

  • 2]

    Primary key

  • 3]

    Assertion

  • 4]

    Referential constraint

Solution
6
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
7
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
8
Discuss

____________ is preferred method for enforcing data integrity.

  • 1]

    Constraints

  • 2]

    Stored Procedure

  • 3]

    Triggers

  • 4]

    Cursors

Solution
9
Discuss

In order to ensure that the value of the budget is non-negative which of the following should be used? 

CREATE TABLE Manager(ID NUMERIC,Name VARCHAR(20),budget NUMERIC,Details VARCHAR(30));

 

  • 1]

    Check(budget>0)

  • 2]

    Check(budget<0)

  • 3]

    Alter(budget>0)

  • 4]

    Alter(budget<0)

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