database integrity Flashcards

1
Q

what is data integrity ?

A

it refers to the accuracy,consistency, and reliability of storing data.

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

what is the differences between staic and referential integrity?

A

static refers to the correctness and consistency of individual data check like constraints- datat type,length
attribute domains
keys
relation cardinal

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

referential integrity

A

ensure consistency between table
ensure relational link

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

referential integrity -cascade and set null

A

set to null-> set null
propagate the chnage->cascade

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

update

A

update x
set x
where m

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

cascade

A

create table s( .., k integer references R on update cascade);

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

delete

A

delete from table
where x=f;

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

types of static intergrity

A

aufzahlungtypen und wertebereichseinschränkungen

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

constraints

A

check (x)
x not null
primary ke<y(x,x)
foreign key(x) references m

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

trigger reaction

A

create trigger
cascade/no cascade
before/after
update/insert/ delete x on f(table)
referencing old as oldname new as newname
for each row
when
set

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

temporal data

A

Temporal data management involves storing, querying, and analyzing data over time. Some databases support temporal features, such as temporal tables or temporal databases, which allow for the storage and querying of temporal data. Temporal databases enable the tracking of changes to data over time, querying historical data at specific points in time, and handling temporal constraints and validity periods.

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

transaction time versionierung

A

create table studiengebühren
(x,x,x,x always as row start ,generated always as row end,
period fro sytem_time ,
)with system versioning

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

how to write recursive

A

with recursive table_name as
——————base case—————–
(select x
from tablename
where x=o)
————–union…….
select.f.x
from table name f
join table_name on e.x=e.f

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

sql injection

A

sql injection is by adding sql such as 1=1 thus jeorpardizing the integrity

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

how to improvae security

A

by using parameterised insteads of constructed
salting\hashing

16
Q
A