• No se han encontrado resultados

CAPÍTULO III .EL BIEN JURÍDICO Y SU ANÁLISIS CON RESPECTO AL BIEN

3. EL BIEN JURÍDICO VIDA

0 = { Oo , 01 , 02 , 03 , 04 , Os , 06 , 01 , Oh, , ... , Ohp , Oi, , ok, , . . . , ok. , oh , . . . , o1, }

Markus Kirchberg

.. . ,

11 the ROOT c o L L ec t i on, whi ch cont ains a L L s chema co L L ec t i ons , is the o n L y 1 1 POS o b j e c t t h a t h a s a pre-a L L o c at ed DID, i . e . 00

Oo = { 01 }

11 s chema c o L L e c t i ons -- each cont ains further co L L e c t i on o b j e c t s that represent

11 a L L c L ass-co L L e c t ions of the part i cu L ar s ch ema; the onLy s chema c o L L ec t i on

11 shown here corresponds t o the Universitycc fragment

01 = { 02 , 03 , 04 , Os , 06 }

11 c L ass-co L L ec t i ons -- each cont ains a L L o b j e c ts that are ins tances of the 11 p art i cu L ar c L ass ; the five c L asses L is t ed c orrespond t o PersonC , StudentC , 11 AcademicCcc , StudentAcademicCcc , and DepartmentCcc resp e c t ive Ly

o2 { oh, , . . . , ohp }

o3 { oi, , . . . , oiq }

04 { 0)1 ' 0 0 0 ' ojr }

Os { Ok" Ok. }

o6 { oh , o1, }

11 regu L ar s t orage o b j e c t s : PersonC ins tances

oh, < )

ohp

11 regu L ar s t orage o b j e c t s : StudentC ins t ances oi, < )

oiq < )

11 regu L ar s t orage o b j e c t s : AcademicCcc ins t ances

Oh = ( 584 , ( [ " Prof . " , "Dr . " ] , "Klaus-Dieter" , "Schewe " ) , ( ( "PN 3 1 1 , Massey University , Privat e Bag 1 1 222 " , "" ) ,

" Palmerston North" , 4412 ) , " Database Concepts" , Ot, ,

{ oi,3 , oi43 , ois4 , oi,34 , oi332 , ok, , ok33 } ) 0}2 ( )

Ojr

11 regu L ar s torage o bj e c ts : StudentAcademicCcc ins t ances

Ok, = ( 653 , ( [ " Mr . " ] , " Markus " , "Kirchberg" ) , ( ( "Rugby Street " , "78" ) , "Palmerston North " , 441 2 ) , 99003525 , Ot, , Ot12 , Oj, , " Database Systems " ,

Ot, , { Oi23 , Ois3 , Oi1 12 } )

ok2 )

ok. )

11 regu L ar s t orage o bj e c ts : DepartmentCcc ins tances

Oh ( "Department of Informat ion Systems " , " City Centre " ,

{ " 0800 DEPT IS " , " 06 350 5799 " } , Oj, , { . . . } , { . . . } , { . . . } )

012 ( )

)

R will be comprised of at least two sets of references: R = < R1 , R2 > where R1 is a set of embedded references between storage objects and R2 is a set of explicit

5 .2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg

references between collection storage objects only. While the former captures object references, the latter models the inheritance forest.

StudentC - supervisor ---:l•� AcademiaC

• � •

§. I ll c ..., o· ll c ..., 6 supervises -

H � t

Departmen tC minor- I -11111(---staftMemberOf- I I S tudentAcademi aC

Per s one X - attr ----)loo- Y embedded reference

( attr , X , Y ) F ig. 5.2. Overview of Embedded References Between Instances of Classes of the Universitycc

Schema Fragment as Considered in Example 5.3.

R1 { . . . refer t o Figure 5 . 2; it indi c a t es whi ch o b je c t references are

c ap t ured in t h i s set ... }

R2 { ( " ! sA" , StudentC , PersonC ), ( " !sA" , AcademicCcc , PersonC ), ( " !sA" , StudentAcademicCcc , StudentC ) ,

( " !sA" , StudentAcademicCcc , AcademicCcc ) }

- I may be empty or include associative index structures defined on this schema fragment. Let us assume that we only have one index, i.e. I = { 07 } . The indexed class is PersonC with index key = ( addr . c ity, addr . street ) . To capture all corresponding objects, all instances of its sub-classes must be included in the index too. R2 can be used to determine the respective sub-classes.

11 Dens e index on a L L ins t ances of PersonC (and i ts sub - c L asses) o1 = { oh, , ... , ohp , oi, , ... , oi. , oh , ... , oj. , ok, , ... , ok. }

We will later refine this example by outlining how storage objects (together with type information and additional cardinalities) are mapped to internal data structure. This is required to demonstrate how simple operations, such as selections involving base types only, may be passed to POS. On the contrary, the internal representation and organisation of index structures are not of interest to this thesis. A well-defined interface u tilising these structures will be sufficient.

5.2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg

Access Methods. Apart from storing storage objects and retrieving storage objects by identifier (i.e. direct access), POS offers associative and navigational access to storage objects.

A ssociative Access. Associative access allows to retrieve a subset of storage objects that

satisfy a certain condition from a collection. Conditions are applied to attribute values and include the following basic algebraic operators: < , < = , = = , ! =, >=, and > . As a

result, a set of references to all storage objects in the collection satisfying the condition is returned.

Considering ODBMSs, associative access structures are similar to those commonly used in ORDBMSs. Examples include Single-Class (SC) and Class-Hierarchy (CH) indices, H-tree, hierarchy class Chain (hcC) tree, Class-Division (CD) index, nested, path and multi indices, access support relations, and Nested-Inherited index (NIX) . The majority of these approaches are modifications of ORDBMS indices (such as B+ trees and join indices) and can be used efficiently to implement associative access methods.

Navigational Access. Navigational access allows the retrieval of storage objects that are

connected to a given storage object via references or inverse references. For instance, if there is a reference from storage object 01 to storage object 02 or vice versa, we say that 01 and 02 are connected. If 01 is connected to 02 and 02 is connected to 03 , 01 is also connected to 03 . If there is a reference from 01 to 02 , we call it a direct reference. Each direct reference defines an inverse reference implicitly, e.g. from 02 to 0 1 .

Navigation can also b e restricted by specifying a condition. Conditions contain path expressions specifying a minimum and / or maximum number of (direct or inverse) references (i.e. the navigation depth) to be followed or a list of allowed or disallowed paths to be or not to be followed.

Examples for ODBMSs include navigation index, ring and spider structures, join index hierarchies, triple-node hierarchies, and Matrix-Index Coding (MIC) . In [70] , it is suggested that the navigation index and MIC can be generalised by making them independent from the coding technique used, i.e. any appropriate coding technique (e.g. data compression techniques) can be selected to guarantee optimal performance in different prevailing data and request patterns.

The Architecture of POS. POS implements the basic services outlined above while

meeting the general requirements of data persistence, concurrent access support, sup­ port of multi-level transactions, and support of checkpointing and recovery procedures. The basic architecture of POS is shown in Figure 5.3. A request manager is instanti­ ated for each higher-level request. The collection manager maintains access structures that are required for associative access. The navigation manager maintains structures that support efficient navigation. Both managers are singletons, which are shared by all request manager instances.

Request managers use the services of the caching module's record interface (i.e. to access DB objects) , while the collection manager and the navigation manager use the services of the caching module's page interface (i.e. to ensure persistence for associated and navigational access structures) . Before proceeding with an operation, a request

5.2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg

TMS

(Concurrency Control and Recovery)

DBMS Component Processing Evaluation Plans

�I V ,---�/�c_C_,

I ' · ' I Record Interface V .:Shared :· .. :· . p ·. .: Storage ·· 1 'I i. 1 ", I ' I ', Collection Manager � - Administration Manager . . . ... ' .... . - . - - . - . - - Caching Module Page Interface

Fig. 5 . 3 . Architecture of the Persistent Object Store.

� - :

manager consults with the transaction management system to ensure that (conflict­ ) serialisability and recoverability is ensured. The operation proceeds only if permission is granted.

Object access results in a collection of in-memory references being returned to the higher-level requester. Persistent, shared objects are made available in the shared mem­ ory area. To do so, each request is accompanied by an Object Store Access Control Block

(OSA CB). This OSACB control block (refer to Section 5.2. 1 ) contains the transaction identifier assigned to the high-level operation, a pointer to an empty, uninitialised POS collection object and variables used for request and object access synchronisation. Upon completion of a request, the corresponding request manager attaches the result to the OSACB control block's result collection and signals success (or failure) .

The administration manager assists with checkpointing, recovery and maintenance of associative and navigational access structures.

The Service Interface. Higher-level DBMS components communicate with POS

through a well-defined service interface. This interface exposes operations that support all three types of object access. In addition, POS supports the evaluation of simple expressions. A description of the supported operations and related concepts is provided next.

5.2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg

Operator Operand p Operand q Description

fwdNavLen min NAT max NAT specifies minimum and maximum forward navigation depths

bckNavLen min NAT max NAT specifies minimum and maximum backward navigation

depths

navLen max NAT max NAT specifies maximum navigation depths; p and q refer to

forward navigation and backward navigation respectively

f wdNavPath max NAT E PATH [] specifies a maximum forward navigation depth and restricts

the paths to be followed

bckNavPath max NAT E PATH [] specifies a maximum backward navigation depth and restricts the paths to be followed

path E PATH [] rf_ PATH [] restricts the paths to be followed; p and q refer to lists of

allowed path names and disallowed path names respectively

Table5.3. (Binary) Path-Operators that are Supported by POS.

Types. POS supports primitive types (i.e. CHAR, BDDL, NAT, INT and REAL) , a type DID that generates globally unique identifiers for storage objects DBJ, the reference-type REF, the record type REC and various collection types (including L IST, SET and BAG ) .

Algebraic Operators. A number of basic algebraic operators are supported by POS.

These are: <, <=, ==, ! = , >=, and > . Such operators are defined in the usual

manner for any primitive data type. In addition, == and ! = are also defined for the DID type.

Path- Operators. A PATH is a list of String values. POS supports a number of basic path-operators. Table 5.3 summarises these path expressions.

The OBJ and REF Data Structures. POS accepts objects of type OBJ and always returns collections of in-memory references to objects of type DBJ) . The prototype system of the POS component is implemented in the programming language C. Corresponding data type definitions are as follows:

- A storage object is implemented as a doubly-linked list. The first element iden­ tifies the list and refers to the first attribute. All subsequent elements of the list correspond to attributes.

typedef struct objBody_struct { struct obj Body_struct * prev ;

POS_Obj Type type ;

int char * union {

card ; name ;

11 typ e of this 'value ' or sub -obje c t

11 c ardina l i ty ; us e d for c o l l e c t i on objec ts on ly

11 externa l name CHAR * NAT INT REAL BOO LEAN DID char Atom ; natAtom ; intAtom ; realAtom ; boo lA tom ; oid ;

5 .2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg

struct obj Body_struct * attr ; } value ;

struct obj Body_struct * next ; } Obj Body ;

typedef struct obj Head_struct {

11 s t orage o b j e c t v a Lue

DID oid ; POS_Obj Type type ;

int card ;

char * name ; Obj Body * value ;

11 uni qu e , immutab L e o bject ident ifi er

11 refers to the orig i n a L co L L e c t i on t ype

11 cardina L i ty

1 1 ext ern a L name

I I (nes t e d) o bject vaLue that mat ches the spe c ifi ed type

} OBJ ;

- A reference between two storage objects is defined as follows:

typedef struct ref_st ruct { char * name ;

DID oidl ;

DID oid2 ;

} REF ;

1 1 reference name

1 1 identifi e r of the s t ar t ing s t orage o b j e c t

1 1 identifier o f t h e t ermina L s t o rage o b j e c t

Additional Data Structure. Two special-purpose data structures are supported by POS,

which are defined as follows:

- POS supports the evaluation of simple conditions. Such conditions have to be spec­ ified in the following format:

typedef struct cond_struct {

Operator op ; I I a Lg ebraic op erat o r ; OR mat ching s emantics for operand arrays Operand val l [] ;

Operand val2 [] ; } Condit ion ;

typedef union operand_def { CHAR * name ; INT pos ; CHAR * const ; PATH * path ; } Operand ; /1 array of 1 s t op erands

11 array of 2nd op erands or (null ) if unary operator

11 String va Lue or String pat t ern

11 pos i t i o n , e . g . 2nd at tri b u t e

11 cons t an t v a Lue

I I p a th - An OSACB control block has the following format:

typedef struct osAccCB_struct {

TRANSID transld ; OBJ * result ; POS_RequStatus status ; MUTEX mutex ; COND_VAR condVar ; } OSACB ; 11 transac t i on i d e n t if i er

11 res erved po i n t er for resu L t v a Lue

1 1 s tatus of re ques t execut ion

EXAMPLE 5 . 4 . Let us revisit the object store presented in Example 5.3. Regular storage objects and collections storage objects are represented internally as follows:

5.2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg

11 the ROOT co � � ec t i on, whi ch contains a � � sch ema co � � e c t i on s ; i t is the on�y 11 POS object that has a pre-a � � oc a t ed DID, i . e . 00

00 O : SET : 1 : "RDDT" ---7 D ID : O : " Universitycc " : 1 - 1 - 2 -3 -4 - 5 - 6 - 7 - s - g

11 - 1 t o -5 refer t o memb ers o f t h e DBJ s t ruc ture , whi � e - 6 t o -g correspond t o 11 the Obj Body s truc ture . Details are a s f ollows :

I I - 1 e:. DID oid - 6 e:. POS_Obj Type type

11 - 2 e:. POS_Obj Type type -7 e:. INT card

I I -3 e:. INT card

11 -4 e:. CHAR * name

11 - 5 e:. Obj Body * value

CHAR *

DID

11 � (refer below) represents a doubly linked list

name value . oid

11 s chema c o � � e c t ions -- each contains further c o � � e c t ion o b J"e cts that represent

11 a � � c � ass-co � � e c t i ons of the par t i cu � ar schema; the on � y schema co � � ec t ion

11 shown here corresponds to the Universitycc fragment

01 1 : SET : 5 : "Un iversitycc" ---7 O ID : O : "PersonC " : 2 +-* OID : O : " StudentC" : 3 +-* D ID : O : "AcademicCcc" : 4 � D ID : O : " StudentAcademicCcc" : 5 �

D ID : 0 : "DepartmentCcc" : 6

11 c � ass-co � � e c t i ons -- e ach cont ains a � � o bj e c t s that are ins t ances of the

11 p art i cu � ar c � as s ; the five c � asses � i s t e d correspond t o PersonC , StudentC , 11 AcademicCcc . StudentAcademicCcc , and DepartmentCcc resp e c t iv e � y

02 2 : SET : p : "PersonC" ---7 DID : 0 : "PersonC" : h1 � . . . +-* DID : 0 : "PersonC" : hp

03 3 : SET : q : "StudentC" ---7 O ID : O : "StudentC " : i1 +-* . . . � O ID : O : " StudentC " : iq

04 4 : SET : r : "AcademicCcc" ---7 DID : 0 : " AcademicCcc" : j1 +-* . . . � DID : 0 : "AcademicCcc" : jr 05 5 : SET : s : "StudentAcademicCcc" ---7 DID : 0 : "StudentAcademicCcc" : k1 � . . . �

DID : 0 : " StudentAcademicCcc" : ks

06 6 : SET : t : "DepartmentCcc" ---7 O ID : O : "DepartmentCcc" : h +-* . . . +-* DID : 0 : " DepartmentCcc" : lt

11 regu � ar s t orage o b je c t s : We res tri c t ours e �ves to the two ins t ances fu � �y

11 d e t ai � e d in Examp � e 5 . 3

Oj, = j1 : REC : 6 : " AcademicCcc" ---7 NAT : O : "personid" : 584 +-* REC : 3 : " name" ---7

LIST : 2 : "title s " ---7 CHAR : 6 : : "Prof . " � CHAR : 4 : : "Dr . " �

CHAR : 13 : " f irstname " : "Klaus-Dieter" � CHAR : 7 : " lastname " : "Schewe" � REC : 3 : "addr " ---7 REC : 2 : street ---7

CHAR : 46 : "name " : "PN 3 1 1 , Massey University , Private Bag 1 1 222" � CHAR : O : "number" : � CHAR : 1 7 : " city" : "Palmerston North " B

NAT : O : "zip code " : 44 1 2 B CHAR : 18 : " spec ialisation" : "Database Concepts " � D ID : O : " staffMemberOf" : Oh B SET : 7 : " supervises " ---7 D ID : O : "StudentC" : 0;13 � DID : 0 : " StudentC" : 0;43 � D I D : 0 : " StudentC" : 0;84 +-* DID : 0 : " StudentC" : 0;,34 +-* DID : 0 : "StudentC " : 0;332 � DID : 0 : " StudentAcademicCcc" : Ok, +-*

DID : 0 : " StudentAcademicCcc" : Ok33

Ok, k1 : REC : 10 : " StudentAcademicCcc" ---7 NAT : 0 : "personid" : 653 +-* REC : 3 : " name" --+ LIST : 1 : " t itles " ---7 CHAR : 4 : : "Mr . " +-* CHAR : 7 : "firstname " : "Markus" �

CHAR : 10 : " lastname " : "Kirchberg" � REC : 3 : " addr" ---7 REC : 2 : street ---7 CHAR : 46 : "name " : " Rugby Street " B CHAR : O : " number " : " 78 " B

CHAR : 17 : " c ity" : "Palmerston North" +-* NAT : O : "zipcode " : 4412 B

NAT : O : " student id" : 99003525 +-* D ID : O : " maj or " : Oh +-* D ID : O : "minor" : 0t,2 +-* D ID : O : " supervisor " : O]I � CHAR : 17 : " specialisat ion" : "Database Syst ems " +-*

5.2. DBS COMPONENT INTERFACE DEFINITIONS Markus Kirchberg D ID : O : " staf fMemberDf " : Oz, f-+ SET : 3 : " supervises" -+ D ID : O : "StudentC" : Oi23 f-+

DID : 0 : " StudentC" : 0i53 f-+ D I D : 0 : " StudentC" : 0i112

The representation of the remaining storage objects is analogous. References are rep­

resented using the REF structure as outlined above. 0

Interface Signatures. POS enables higher-level modules to access, insert, update, and

delete storage objects and corresponding references through the following collection of operations:

- void Retrieve ( DSACB * oac , DID oid , BDDL is a ) . . . locates the storage ob­

ject that corresponds to the given storage object identifier oid.

If the isa value is TRUE (which only makes sense for collection storage objects) , not only the given object identifier is considered but also its associated sub-collections. Thus, explicit references are utilised.

In addition, each attribute (with a value not equal to (nul l ) ) that forms a part of an embedded reference is checked against R. If there is no corresponding reference in R (i.e. the referenced object has been deleted previously) the attribute value is set to (null ) .

Arguments:

oac - a pointer to an OSACB control block in POS's shared memory area.

oid - the storage object identifier of the storage object to be retrieved.

isa - a boolean value indicating whether or not the inheritance (i.e. sub- and super-class information added as explicit references) relation should be taken into consideration.

Effects:

The storage objects with identifier oid wrapped in a collection object or, in the event that no such object exists, the (null) pointer is assigned to the OSACB control block's result pointer.

- vo i d FindFromCo llect ion ( DSACB * o ac , DID c id , BDDL i s a , Cond

obj Cond ) ; . . . determines a subset of objects that belong to the collection type storage object with identifier c id. All objects in the subset must meet the condition ob j Cond.

First, the collection type storage object (say 02 from Example 5.3) with identifier

c id is located. If the isa value is TRUE, all objects that can be reached using only forward navigation over explicit references (i.e. 03, 04 and 05 in Example 5.3) are also considered. Each of these collection type storage objects contain attributes of type DID, i.e. all attribute values correspond to storage object identifiers. Subsequently, the condition obj Cond is applied to all storage objects that belong to the located collections (i.e. 02 , 03, 04, and 05) . Objects that satisfy the condition are added to the result list. If no condition is specified all objects that belong to these collections are added to the result list.

Arguments:

5.2. DBS C OM PONENT INTERFACE DEFINITIONS Markus Kirchberg

c id - the identifier of a (collection type) storage object.

Documento similar