Must join desired tables into a view before mapping the tabl

Hi,

I have several relational tables in Oracle database and the tables have corresponding keys to be linked together logically.

Now I want to map the tables into a Tamino schema. Is it a must to join the tables into a view firstly before mapping into Tamino schema?

Thanks for your help.

Andy

Hi Andy,
I don’t know exactly, whether a join is the only solution, but it should be the easiest way to have an access to your tables.
Regards,
Uli

For read access accessPredicate property can also be used. It should be defined for an element that is mapped to a table. You can specify an expression that references another node (from another table for example).

Hi Alexander,
can you guve us a more detailed information about
’ how you use the accessPREDICATE ?'. i am working
on this for some time without any success.

what i need is:
schema mapped to 2 oracle tables as there is a 1:n
relationship

thanks in advance

MichaelK

I found some extra documentation on Tamino Schema
at http://localhost/tamino/mydb/ino:collection?_xql=xs:schema

it says

Element (accessPredicate) is mixed content therefore it should contain the meta attribute mixed=“true”. Predicate to access SQL table, contains restricted SQL predicate as mixed content for this element. It can contain node parameters given by absolute XPATH expressions e.g. columnName1 = /doc/e11 and columnName2 = /doc/el2/el22

I think for mapping more than 1 table in a 1:n relationship it will probably be easier to create a view and map that.

View doesn’t allow you to create hierarchical documents.

For example, we have two tables: customers and orders.

If you create view, result documents will be flat.













With accessPredicate you can define XML document with tree structure.







If tree structure is not critical then it’s centainly easier to create a view.

But, there’re some limitations if mapping with more than 2 sql tables and duplication of elements or attribute to preserve the structure.

Just think is it good to

1. create a view of several sql tables
2. use odbc wizard
3. use xslt to convert to desired structure like stylus studio or other GUI tool.

Mullin

nil