Explain the following violation with an illustration.
i)Domain constraint
ii)Key constraint
iii)Referential integrity
iv)entity integrity
¡) Domain constraint :-
-- Domain constraint simply defines the domain or set of values for an attribute.
--It says the value of the attribute must be available in the corresponding domain.
-- If the attribute datatype is an integer then attribute values must be in integer.
Let's take an example:
Student_id | Name | Age |
101 | Rahul | 19 |
102 | Ajay | C |
B | Santosh | 19 |
Here , value ‘B’ is not allowed since only integer values can be taken by the "Student_id" attribute.
And ,value 'C' is not allowed since only integer values can be taken by the "Age" attribute.
¡¡) Key Constraint:-
-- keys are simply an entity set which are used to identify an entity within its set uniquely.
-- Key Constraint says that all the values of primary key must be UNIQUE.
--And , the values of the primary key must not be a NULL value.
Let's take an example :
Student_id | Name | Age |
101 | Rahul | 19 |
102 | Ajay | 18 |
101 | Santosh | 19 |
Here, Student_id is the primary key and this relation does not satisfy the key constraint as here all the values of primary key are not unique.
¡¡¡) Referential Integrity :-
-- Referential Integrity Constraint is specified between two tables.
-- It specifies that all the values taken by the foreign key must either be available in the relation of the primary key or be null.
Let's take an example :
Table -1:
Student_id | Name | Age | Phone_no |
101 | Rahul | 19 | 1234 |
102 | Ajay | 18 | 5236 |
103 | Santosh | 19 | 9876 |
Here , Phone_no is a foreign key.
Table-1 relationships with Table-2 .
Table -2:
Phone_no | Address |
1234 | kurnool |
5236 | ongole |
-- Here , Phone_no is the primary key.
-- Here , in Table-1 9876 is not allowed as Phone_no 9876 is not defined as a Primary key of Table-2 and in Table-1 Phone_no is a foreign key defined.
¡v) Entity Integrity :-
-- Entity integrity constraint specifies that no attribute of primary key must contain a null value in any relation.
--This is because the presence of null value in the primary key violates the uniqueness property.
Let's take an example :
Student_id | Name | Age |
101 | Rahul | 19 |
102 | Ajay | 18 |
Santosh | 19 |
-- This relation does not satisfy the entity integrity constraint as here the primary key contains a NULL value.
Explain the following violation with an illustration. i)Domain constraint ii)Key constraint iii)Referential integrity iv)entity integrity
In class we have discussed four types of Integrity Constraints: Domain Constraint, Key Constraint, Entity Integrity Constraint and Referential Integrity Constraint. Suppose that each of the following data change operations is applied directly to our COMPANY database, whose schema and instance are shown in Figures and 2 respectively. Identify all the integrity constraints (if any) that will be violated if we perform the following operations. If a constraint is violated (a) explain briefly why this happens, and (b) suggest all...
Match the following words and explanations Domain Integrity Entity integrity Referential Integrity Explanations: A: All values in a single column belong to the same scope of meaning B: Each primary key value must have a matching value in the Foreign Key C: The table has a primary key, which may be NULL D: Each Foreign Key value must have a matching value in the Primary key E: The table has a Primary key, which is never NULL
a) Identify the foreign keys in this schema. Explain how the entity and referential integrity rules apply to these relations. b) Produce some sample tables for these relations that observe the relational in- tegrity rules. Suggest some general constraints that would be appropriate for this schema.
Which of the following describes referential integrity? A. A Primary Key of a relational table must not contain a null value B. One fact must not be in multiple places C. The value for a foreign key attribute must either be null or match the one of the data value of that attribute in the table in which the attribute is a primary key D. Referential Integrity is a principle that prevents the use of redundancy, avoids null values and...
Arrange the indicated protons by acidity, most acidic first: H I II III IV IV>II> III >I OI>IV>III > II OIV >I> III > II I> IV > II > III What product is expected from the following reaction? но 1. LiAIH ether 2. H,00 Оно он он н Arrange the indicated protons by acidity, most acidic first: H I II III IV IV>II> III >I OI>IV>III > II OIV >I> III > II I> IV > II > III...
19. Which of the following molecules are achiral? A) II, III B) I, II C) I, IV D) III, IV 20. How many stereogenic centers are present in ephedrine, a bronchodilator and decongestant? ephedrine A) 0 B) 1 C) 2 D) 3 21. Rank the following groups in order of decreasing priority according to the Cahn-Ingold- Prelog system. -NH2 -NHCH3 -CH2NH2 CH2NHCH3 п V . A) B) I>II> III > IV II >I>IV > III II C II >I> III...
Rank the following compounds from lowest to highest heat of hydrogenation: I, II, III, IV IV, III, II, I II, III, IV, I I, IV, III, II none of these choices
Explain the following; I. Issued Shares II. Preference Shares III. Ordinary Shares IV. Debentures
And explain why? 3. Which pair of the following compounds are constitutional isomers? III IV I and II II and III III and IV I and IV
5. Which one of the following is nonaromatic? III IV I II A. IV B. I C. II D. III E. None 6. Which is the correct bond order for the C-C bonds in benzene? 1.0 20 1.25 1.75 1.5 1.5 20 10 A. III B. C. IV D. II E. None