in Databases recategorized
651 views
0 votes
0 votes

Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t.the examples of integrity constraints?

  1. An instructor Id. No. cannot be null, provided Instructor  Id No. being primary key.
  2. No two citizens have same Adhar-ld.
  3. Budget of a company must be zero.
  1. a, b and c are true.
  2. a false, b and c are true.
  3. a and b are true; c false.
  4. a,b and c are false.
in Databases recategorized
651 views

3 Answers

2 votes
2 votes
Best answer

Intergrity means something like 'be right' and consistent. The data in a database must be right and in good condition.
There are the domain integrity, the entity integrity, the referential integrity and the foreign key integrity constraints.

Domain intgrity means the definition of a valid set of values for an attribute. You define 
- data type, 
- lenght or size
- is null value allowed
- is the value unique or not

The entity integrity constraint states that primary keys can't be null. There must be a proper value in the primary key field.

The referential integrity constraint is specified between two tables and it is used to maintain the consistency among rows between the two tables.

 An instructor Id. No. cannot be null, provided Instructor Id. No. being the primary key. - is valid

No two citizens have same Adhar-Id. - is valid

but,  The budget of a company must be zero. --- is not a valid integrity constraint

so

option 3

selected by

1 comment

yes it should  be greater  than  zero and not only zero
1
1
1 vote
1 vote
option C is correct.
0 votes
0 votes

Primary key, every table have at least one attribute as “primary key". No primary key should ever have null values or same
Statement-1: TRUE: Here, instructor ID is primary key. So, they mentioned it is not null.
Statement-2: TRUE: No two citizens have same Adhaar-Id. It is clear example of primary key.
Statement-3: FALSE: Budget of a company must be zero. We cant say or it is not necessarily true
So, option (C) is  not correct. Budget of a company must be zero. It is violated constraint of “not null”. Because entity integrity constraints should not accept not null but referential integrity constraints will accept null value.

Answer:

Related questions