Hola a todos!!
estoy utilizando en el trabajo Mondrian que es un programa para datawarehouse y tengo problemas para dise;ar la relacion entre Region y Pais, pais que tiene como llave primaria PaisID se relaciona directamente con la factTable y Region es una clasificacion del pais y se relacionan mediante RegionID, yo quiero usar tanto la region como el pais como filtros para mis reportes; encontre un problema similar donde trabajaban con joins pero no he podido aplicarlo en este caso la forma en que las tablas estan relaconadas hacen que este tipo de dise;o se llame snowflake.
si pudieran ayudareme se los agradeceria un monton!
Kathleen

PD:el codigo que encontre es el siguiente

Cube name=\"Sales\"> ... <Dimension name=\"Product\" foreignKey=\"product_id\"> <Hierarchy hasAll=\"true\" primaryKey=\"product_id\" primaryKeyTable=\"product\"> <Join leftKey=\"product_class_id\" rightAlias=\"product_class\" rightKey=\"product_class_id\"> <Table name=\"product\"/> <Join leftKey=\"product_type_id\" rightKey=\"product_type_id\"> <Table name=\"product_class\"/> <Table name=\"product_type\"/> </Join> </Join> ... </Hierarchy> </Dimension></Cube> This defines a \"Product\" dimension consisting of three tables. The fact table joins to \"product\" (via the foreign key \"product_id\"), which joins to \"product_class\" (via the foreign key \"product_class_id\"), which joins to \"product_type\" (via the foreign key \"product_type_id\"). We require a <Join> element nested within a <Join> element because <Join> takes two operands; the operands can be tables, joins, or even queries.

The arrangement of the tables seems complex, the simple rule of thumb is to order the tables by the number of rows they contain. The \"product\" table has the most rows, so it joins to the fact table and appears first; \"product_class\" has fewer rows, and \"product_type\", at the tip of the snowflake, has least of all.



_______________________________________________
Linux-plug mailing list
[email protected]
http://www.linux.org.pe/cgi-bin/mailman/listinfo/linux-plug

Responder a