Integrity constraints Flashcards

Basic key concept and CODD rules for RDBMS

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

A

F

19
Q

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

A

Super key

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?

A

20

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
Q

set of attributes references to primary key of another relation is____?

A

foreign key

26
Q

foreign key is defined over two relation referential relation and referenced relation FK is in which relation ?

A

referential relation

27
Q

Foreign key allows null values ? T/F

A

T

28
Q

what is the mapping between referenced relation and referential relation ?

A

1:M

29
Q

Referential Intigrity constraints
referenced relation
1. insertion ____?
2.deletion a.______? b_____? c______?

A
  1. no violation

2. on delete no action b. on delete cascade c.ondelete set null

30
Q

Referential integrity constraint also known as ____?

A

foreign key

31
Q

what is subset dependencies ?

A

referential integrity constraint

32
Q

Some integrity constraints of SQL ?

A

not null
unique
check
primary key

33
Q

______ is a predicate that we expect the database to always satisfy.

A

Assertion

34
Q

syntax of assertion

A

create assertion assertion_name check “predicate”

35
Q

______ used to improve quality of data entered into database

A

data integrity constraint

36
Q

To add integrity constraint we use___

A

alter

37
Q

syntax for alter

A

alter table name add constraints

38
Q

domain constraint, Functional dependencies and referential integrity constraint are special form of ____ ?

A

Assertion.