• No se han encontrado resultados

MERCADO COMÚN.- Es un grado de integración más alto y complejo, ya que establece un sistema que permite la libre

DESVENTAJAS DE LA GLOBALIZACIÓN ECONÓMICA

4) MERCADO COMÚN.- Es un grado de integración más alto y complejo, ya que establece un sistema que permite la libre

Any number of linked tables can be attached to property map to allowing to join domain table and range tables (attached to domain and range class maps) through intermediate tables for object property map. For data property map linked tables allows to specify a value expression based on columns in linked tables.

Denote by opm a row of object_property_map table and tl(i), i=1,2,... the rows of table_link table linked to opm: opmtl(1) tl(2)... tl(n). This schema introduces:

source table: omp.source_class_map_idclass_mapdb_table.table_name for each i: mid_table(i)=tl(i).mid_table_iddb_table.table_name

target table: omp.target_class_map_idclass_mapdb_table.table_name The tables are linked in chain:

source_table

mid_table(1) mid_table(2)...  mid_table(n) target_table

The tables are joined (see Figure 51 ) by conjunction (and) of conditions:

opm.source_column_expr=tl(1).source_column_expr tl1(1).target_column_expr=tl2.source_column_expr tl1(2).target_column_expr=tl3.source_column_expr ... tl1(n-1).target_column_expr=tl(n).source_column_expr tl1(n).target_column_expr=opm.source_column_expr

We use naming convention for aliases t_domain, mid1, mid2, ...,t_range for source_table, mid_table(1), mid_table(2), ..., target_table respectively. Users can specify s for t_domain and t for t_range for brevity.

If the chain of table link has some link pair that cannot be linked on equality of column expressions but on Boolean expression including columns from both tables then filter_expr column is used:

opm.filter_expr contain condition to join source_table with mid_table(1) tl(1).filter_expr contain condition to join mid_table(1) with mid_table(2) tl(2).filter_expr contain condition to join mid_table(2) with mid_table(3) ...

tl(n-1).filter_expr contain condition to join mid_table(n-1) with mid_table(n) tl(n).filter_expr contain condition to join mid_table(n) with target_table.

Each filter_expr can refer to columns in both linked tables prefixing by s columns in the first table and by t columns in the second. For example if

105

tl(2).filter_expr=

s.full_name in (t.name || t.surname, t.surname || t.name)

then full_name is taken from mid_table(2) but name and surname columns from mid_table(3) table.

For data property maps linked tables are attached similarly as described above for object property maps. The difference is that there is no range class map for data property maps, therefore no target_table and no last link from mid_table(n) to target_table. Value expression for data property value (object part generation of RDF triples) can reference columns in all linked tables by appropriate aliases: s (or t_domain) for domain table, mid1, mid2, ... for intermediate tables.

Linked table usage for data property is shown below for far link example [2.3.2]

Table 28. OWL class maps to database tables for far link example class_

map_ id

OWL class

(rdf_id) table_name filter_expr id_column_expr instance_ uri_ prefix

1 Something TABLE1 table1_id Something

Table 29. OWL class instance RDF tripples for far ling example

Subject Predicate Object

<lumii #Something1> <type> <lumii#Something> <lumii #Something2> <type> <lumii#Something >

The table below shows data property mappings in table datatype_property_map and referenced rows in class_map, db_table and owl_datatype_property.

Table 30. OWL datatype property class mappings far link example class_

map_id

OWL_datatype_ property.rdf_id

table_name column_expr source_

column_expr table_ link_id

1 localName TABLE1 s.name

1 farName TABLE1 mid4.name table2_id 1

2 farPath TABLE1 s.name

|| ‘ ‘ || mid1.name || ‘ ‘ || mid2.name || ‘ ‘ || mid3.name

table2_id

The table below shows table link information in rows of table table_link and referenced rows (mid_table_name=mid_table_iddb_table.table_name) .

Table 31. table_link table data for far link example mid_

table_id mid_table_name source_ column_expr target_ column_expr next_table_link_id

1 TABLE2 table2_id table3_id 2

2 TABLE3 table3_id table4_id 3

106

Note a naming convention for table column aliases SQL expressions: by s. prefixing columns in table linked to domain class map of the property; by t. prefixing columns in table linked to range class map of the property; by mid1, mid2, … prefixing column names in linked tables. In SQL commands that generate RDF triples prefix s is changed to t_domain and prefix t to t_range.

We have such SQL to generate RDF triples for farPath property values (simplified by not adding xsd:datatype information)

SELECT

'<lumii#Something'

+ CAST(t_domain.STUDENT_ID AS varchar) + '>' as subject, '<lumii#farPath>' as predicate, t_range.name || ' ' || mid1.name || ' ' || mid2.name || ' ' || mid3.name as object FROM TABLE1 t_domain INNER JOIN TABLE2 mid1

ON t_domain.table2_id = mid1.table2_id INNER JOIN TABLE3 mid2

ON mid2.table3_id = mid3.table3_id INNER JOIN TABLE4 mid3

ON mid3.table4_id = mid4.table4_id

SQL for the other two properties are similar to this one (simpler expression for object part).

Table 32. OWL datatype property instance RDF triples for far link example

Subject Predicate Object

<lumii# Something1> <lumii#localName> table1 row1

<lumii# Something2> <lumii#localName> table1 row2

<lumii# Something1> <lumii#farName> table4 row1

<lumii# Something2> <lumii#farName> table4 row2

<lumii# Something1> <lumii#forPath> table1 row1 table2 row1 table3 row1

table4 row1

<lumii# Something2> <lumii#farPath> table1 row2 table2 row2 table3 row2

table4 row2

Documento similar