Quiz Discussion

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

Course Name: SQL -Structured Query Language

  • 1]

    Local Key

  • 2]

    Primary Key

  • 3]

    Composite Key

  • 4]

    Foreign Key

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

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

Which of the following is not an integrity constraint?

  • 1]

    Not null

  • 2]

    Positive

  • 3]

    Unique

  • 4]

    Check ‘predicate’

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

____________ is preferred method for enforcing data integrity.

  • 1]

    Constraints

  • 2]

    Stored Procedure

  • 3]

    Triggers

  • 4]

    Cursors

Solution
7
Discuss

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

  • 1]

    Foreign key

  • 2]

    Primary key

  • 3]

    Assertion

  • 4]

    Referential constraint

Solution
8
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
9
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
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