Mapping objects to relational db_Referential integrity (RI) Flashcards

1
Q

What is Referential integrity (RI)?

A

concept about entities references

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

Formulate Referential integrity concept

A

if one entity references another then that other entity actually exists

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

Where can you implement business logic?

A

in database and in application code

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

What is Multiple Entity Representation?

A

entity can be represented in different ways

(For example, customer data can be displayed on an HTML page, be used to create a customer object that resides on an application server, and be stored in the database.)

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

Not obvious issue with representation of object in several schemas is …

A

cross schema referential integrity

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

Common technique to ensure referential integrity is …

A

to use triggers to implement cascades

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

what is database trigger?

A

special stored procedure that is run

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

When does db trigger run?

A

when specific actions occur within adatabase

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

What is cascade?

A

situation when trigger create action in another table

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

Where can cascade exist?

A

db and object

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

What are the types of db cascades?

A

delete, insert, update

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

What are the types of object cascades?

A

delete, read, save

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

You can implement cascades in db, objects or …

A

both

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

What is lazy reads?

A

performance enhancing technique

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

How does lazy reads work?

A

attributes are defined at the time they are needed

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

What is cache?

A

location where copies of entities are temporarily kept

17
Q

Types of cache are db, object, …

A

client data

18
Q

The principle advantage of caches is …

A

performance improvement.

19
Q

The principle advantage of caches is …

A

performance improvement.

20
Q

Which is the data appropriate for cache?

A

that is unlikely to change very often

21
Q

Why can work with cache be complex?

A

additional logic required

refresh of cache and handling of collisions

22
Q

What is the risk you run when working with cache?

A

risk of not committing changes to your database

23
Q

Can inheritance be factor of RI?

A

no, it provides RI rules for related objects

24
Q

How does RI relates to business logic?

A

RI is part of business logic

25
Q

Where should RI be implemented?

A

Objects, db or both

26
Q

How to choose RI and business logic options?

A

it’s depends on purposes

there isn’t totally correct answer but there are general strategies how to implement business logic

27
Q

What do you need to implement RI in your app?

A

RI and business logic options to choose