Integrity constraints Flashcards

Basic key concept and CODD rules for RDBMS (38 cards)

1
Q

what is Data Model ?

A

Storage technique to provide data independence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

first codd rule?

A

Data must be stored in tabular format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Attribute?

A

Attributes describe the instances in the row of a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is a tuple

A

Is nothing but a record in one coloumn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is Arity ?

A

Number if fields or attributes i.e no of column in a database table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is cardinality ?

A

Cardinality is nothing but number of records present ina database table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

domain attribute ?

A

set of possible values accepted by an attribute.

such as varchar, number, int , date etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is emp(eid,ename)

A

Its known as relational schema.. that describes structure of a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is relational instance ?

A

Record set of database (snapshot) at any instance of time. that is what is present inside the table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

rule2?of codd

A

No two records of rdbms table must be same

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Candidate key?

A

Minimal set of attributes that represent every tuple of a database table uniquely. Its come due to codd second rule.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

alternative keys ?

A

Attributes other than primary key are known as Ak

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

unknwn value are stored as ______ in rdbms table ?

A

null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

candidate key whose field values are not allowed to null,

and atmost one such key is allowed in any relational table is known as _____?

A

Primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In RDBMS table there must be atleast one Candidate key whose field value is ____?

A

not null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

candidate key with only one attribute __ ?

candidate key with more than one attribute___ ?

A

simple candidate key

compound or composite key

17
Q

Prime attribute ?

A

Attributes whoch belongs to some candidate key of relational schema.

18
Q

Super key is practical concept?T/F

19
Q

Set of attributes of relational schema which differentiate records uniquely are known as ____ ?

20
Q

Minimum possible superkey ?

A

1 … all the attributes of a relational schema is always a superkey

21
Q

Maximum possible super key?

A

2^n-1.. when each attributes of a relational schema is a candidate key.

22
Q

R(a,b,c,d,e)

how many super key in R if (a,bc ) is candidate key?

23
Q

super key which has minimal attributes

A

candidate key

24
Q

foreign key or referential key?

A

used to relate data between two tables

25
set of attributes references to primary key of another relation is____?
foreign key
26
foreign key is defined over two relation referential relation and referenced relation FK is in which relation ?
referential relation
27
Foreign key allows null values ? T/F
T
28
what is the mapping between referenced relation and referential relation ?
1:M
29
Referential Intigrity constraints referenced relation 1. insertion ____? 2.deletion a.______? b_____? c______?
1. no violation | 2. on delete no action b. on delete cascade c.ondelete set null
30
Referential integrity constraint also known as ____?
foreign key
31
what is subset dependencies ?
referential integrity constraint
32
Some integrity constraints of SQL ?
not null unique check primary key
33
______ is a predicate that we expect the database to always satisfy.
Assertion
34
syntax of assertion
create assertion assertion_name check "predicate"
35
______ used to improve quality of data entered into database
data integrity constraint
36
To add integrity constraint we use___
alter
37
syntax for alter
alter table name add constraints
38
domain constraint, Functional dependencies and referential integrity constraint are special form of ____ ?
Assertion.