Unit 4 - Lesson 2 - Modeling associations Flashcards

1
Q

Describe indices

A

Indices other than primary keys can be created on database tables.
Have a stereotype INDEX on the association Structs. Can be used as a key and an index to support database accesses via this key.
CREATE INDEX ACCOUNTTYPEINDEX ON BANKACCOUNT(ACFOUNTYTYPE).
No limit on number of indexes. Speed vs database size tradeoff.

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

Describe foreign keys

A

Create association between two entity classes.
* Drag the handler from the entity containing the foreign key (child) to the parent entity.
Select the attribute names in the properties tabs.

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

Describe Exit points

A

Call back function that is executed at a predefined, strategic point by the server.
4 types supported:
* Validation - perform validation before insert and modify operations.
* Pre Data Access - e.g. reinsert()
* Post Data Access - e.g. postinsert()
* On-fail - prefixed with onFail e.g. onFailinsert()
Implemented by a developer.
Parameter to the validation function is AUTOVALIDATE - standard details struct for the entity.

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

Describe Auditing

A

Supported by all stereotyped operations except NS NSMULTI BATCHINSERT BATCHMODIFY.
Provide information about the record modifications.
Operation:
* When an operation is called, infrastructure DAL automatically inserts row on the AUDITTRAIL table.
* If optimistic locking is on, data before and after the modification is written to the AUDITTRAIL table.

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

Describe Assignments

A

It is possible to use an assign between any two structs:
* Fields with the same name are matched.
* Reduces amount of code a developer needs to write.
* Can also assign at the list level.
Assign method allows developer to copy data from one struct to another without the need for modelling or much coding. Generated code will copy all details where the names of the fields match.

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

Describe Aggregations

A
Allows one type of class to be nested within another.
Structs can aggregate structs.
Structs can aggregate entities.
One-to-one.
One-to-many.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Rules for creating indeces

A
The association must be given a name - which will be given to the database index.
The names of the attributes of the struct class must be a subset of the names of the attributes of the entity.
The struct class must not aggregate any other classes.
Index names must be unique within the entire model.

Direction not important. Never explicitly reference an index.

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

Rules for creating foreign keys

A

FK associations are only allowed on entity classes
Fields referenced by a foreign key will be set to unique.
If the foreign key references the primary key of another entity, a redundant unique clause will not be generated by the Curam Generator.
Foreign keys cannot be specified on subclass entities, but can be specified between entity and extension class.
Make sure you drag association in the right way, that is, from table containing foreign key to primary key.

Fas are for enforcing referential integrity.

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

What is written to AUDITTRAIL

A

Date and time of transaction.
User ID on transaction invocation.
Table name of modified table.
Program name - FID of the function.
Transaction type - online, batch, deferred.
Operation type - create/read/update/delete.
Key info.
Details of changed data - XML format and include names of the fields referenced by the details struct, field types, new version of data, old version if OL is enabled.

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

Describe explicit field assignment

A

Selecting General properties tab for the association and specifying the field names in the role. Match for fields of different names.
Adding ASSIGNABLE association between two classes and specifying comma-separated list in the Role boxes of the General tab in the Properties view.

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

Specify a shadow type for aggregation

A

Create the aggregation
Select the Aggregation
* Select Curam tab in properties
** Change Right Shadow Class to correct type
Use the same approach for explicit assignment

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