Quiz Discussion

To include integrity constraint in an existing relation use :

Course Name: SQL -Structured Query Language

  • 1]

    Create table

  • 2]

    Modify table

  • 3]

    Alter table

  • 4]

    Any of the above

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

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

____________ is preferred method for enforcing data integrity.

  • 1]

    Constraints

  • 2]

    Stored Procedure

  • 3]

    Triggers

  • 4]

    Cursors

Solution
3
Discuss

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

  • 1]

    Foreign key

  • 2]

    Primary key

  • 3]

    Assertion

  • 4]

    Referential constraint

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

Which of the following is not an integrity constraint?

  • 1]

    Not null

  • 2]

    Positive

  • 3]

    Unique

  • 4]

    Check ‘predicate’

Solution
9
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
10
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
# Quiz