Database [3i Infotech Placement]: Sample Questions 149 - 150 of 294

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 149

Statement True-False▾

It is very difficult to grant and manage common privileges needed by different groups of database users using the roles.

Choices

Choice (4)

a.

False

b.

True

c.

None of the above

d.

All of the above

Edit

Answer

a.

Explanation

Define User System Privileges
  • Oracles allows controlling privileges to users using roles.
  • Grant system privileges to roles- then use the roles to manage system privileges.
    • Privileges grant access to perform a particular action or to perform an action on any schema objects of a particular type.
    • Ex. , the privileges to create table spaces and to delete the rows of any table in a database are system privileges.
    • When multiple users access database objects, authorization can be controlled to these objects with privileges.
  • A user can modify an object owned by another user.

Question 150

Question MCQ▾

Why is it better to use an INTEGRITY CONSTRAINT to validate data in a table than to use a STORED PROCEDURE?

Choices

Choice (4)

a.

Because a stored procedure creates more network traffic than a integrity constraint definition

b.

Because an integrity constraint is automatically checked while data is inserted into or updated in a table while a stored procedure has to be specifically invoked

c.

Because the stored procedure occupies more space in the database than a integrity constraint definition

d.

All of the above

Edit

Answer

b.

Explanation

  • Automatically checked when a data is inserted or updated in a table while a stored procedure was specifically invoked.
  • To define certain data quality requirements in the database.

Basically 5 types of integrity constrain in oracle

  • Not null
    • A column in a table specified not null.
    • it՚s not possible to insert a null in a column.
    • The default is null.
  • Unique key
    • A primary key combines of a unique key and a not null constraint
  • Primary key
    • A primary key combines of a unique key and a not null constraint.
  • Foreign key
    • A foreign key constraint on a column ensures that the value in that column is found in the primary key of another table.
  • Check
    • A check constraint allows stating a minimum requirement for the value in a column.
5 Types of Integrity Constrain in Oracle