# Recent questions tagged referential-integrity

1 vote
1
Following table has two attributes Employee_id and Manager_id, where Employee_id is a primary key and manager_id is a foreign key referencing Employee_id with on-delete cascade: ... $(30, 35)$ and $(35, 20)$ only $(35, 20)$ only $(40, 45)$ and $(25, 40)$ only
1 vote
2
How to represent referential integrity constraint in ER model? pls explain with diagram
3
The following table has two attributes $X$ and $Y$ where $X$ is the primary key and $Y$ is the foreign key referencing $X$ ... $(4,3)$ and $(6,4)$ $(2,4)$ and $(7,2)$ $(3,2)$ and $(9,5)$ $(3,4), (4,5)$ and $(6,4)$
4
I've some elementary doubts regarding Foreign keys (referential integrity) : Can a foreign key consist of a collection of attributes - ie. can two or more columns collectively form a foreign key? If foreign key refers to a column within the same ... that has either: Multiple candidate keys Composite candidate keys Overlapping candidate keys If possible, please provide an example. Thank You.!
5
Referencing to this gate ques- https://gateoverflow.in/16095/gate2004_13-let-and-two-relation-schema-where-the-primary-key Let R1 (A, B, C) and R2 (D, E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 ... foreign key, subtracting entities of D from C can still have null and other values(those were duplicate). So, how will it get empty set?
6
Consider the join of a relation R with a relation S. If R has 100 tuples and S has 9 tuples then the maximum and minimum sizes of the join respectively under referential integrity constraint: 9 and 0 9 and 9 9+100 and 0 9*100 and 9
1 vote
7
select the correct statement from the following on referential integrity Select one: a. referential integrity constraints check whether the primary key, values are unique b. referential integrity constraints check whether an attribute values lies in the ... specified between two relations in a schema d. referential integrity constraints are specified between entities having recursive relationship
8
Consider the join of a relation R with a relation S. If R has 100 tuples and S has 9 tuples then the maximum and minimum sizes of the join respectively under referential integrity constraint:- (A) 9 and 0 (B) 9 and 9 (C) 9+100 and 0 (D) 9*100 and 9
1 vote
9
Let R (ABCD) and S(DEF). D is the foreign key in R that references primary key in S. Which of the following will not violation? a. Insertion in R b. Insertion in S c. Deletion from R d. Deletion from S
1 vote
10
Explain recursive foreign key with suitable example..
1 vote
11
12
Consider a relation geq which represents "greater than or equal to" that is (x,y) belongs to geq only if y>=x: (create table geq lb integer NOT NULl, ub integer NOT NULL, primary key lb Foreign key (ub) references geq on delete cascade); Which of the following is possible if a tuple (x, ... . b) A tuple (z,w) with z>x is deleted. c) A tuple (z,w) with w<x is deleted. d) the deletion is prohibited.
13
Consider the following tables $T1$ and $T2.$ ... cascade. In order to delete record $\langle 3, 8 \rangle$ from the table $T1,$ the number of additional records that need to be deleted from table $T1$ is _______
14
We can convert any weak entity set to a strong entity set by simply adding appropriate attributes. Why, then, do we have weak entity sets at all? $1)$ We want to avoid the data duplication and consequent possible inconsistencies caused by duplicating the key of the strong entity $2)$ Weak entities reflect the ... reasons from the above: $A)1$ and $2$ $B)2$ and $3$ $C)1$ and $3$ $D)1,2$ and $3$
15
What is on delete no action,on delete cascade, on delete set null action?? explain through some eg??
16
1 vote
17
____ constraints ensure that a value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation. Logical Integrity Referential Integrity Domain Integrity Data Integrity
18
Purpose of 'Foreign Key' in a table is to ensure Null Integrity Referential Integrity Domain Integrity Null and Domain Integrity
19
Consider the LIBRARY relational database schema shown in the figure below .Choose the appropriate action (reject, cascade, set to NULL, set to default) for each referential integrity constraint, both for the deletion of a referenced tuple and for the update of primary key attribute value in a referenced tuple.Justify your choices
20
Consider the database shown below ,Whose schema is also shown below .What are the referential integrity constraints that should hold on the schema ? Write appropriate $SQL$ $DDL$ statements ... Course_number Credit_hours Department PREREQUISITE Course_number Prerequisite_number SECTION Section_identifier Course_number Semester year Instructor GRADE_REPORT Student_number Section_identifier Grade
21
what is the advantage of keeping the Foreign Key null as we know if we make the Foreign Key null we cant reference it again so thats a disadvantage ......so there must be some advantage which outweighs this disadvantage so whats that advantage
1 vote
22
When , then the cost of computing is (A) the same as R S (B) greater the R S (C) less than R S (D) cannot say anything
Let $R (a, b, c)$ and $S(d, e, f)$ be two relations in which $d$ is the foreign key of $S$ that refers to the primary key of $R$. Consider the following four operations $R$ and $S$ Insert into $R$ Insert into $S$ Delete from $R$ Delete from $S$ Which of the following can cause violation of the referential integrity constraint above? Both I and IV Both II and III All of these None of these
The following table has two attributes $A$ and $C$ where $A$ is the primary key and $C$ is the foreign key referencing $A$ ... $(5, 2)$ and $(7, 2)$ $(5, 2), (7, 2)$ and $(9, 5)$ $(3, 4), (4, 3)$ and $(6, 4)$