Many-to-many dimensions in a datawarehouse using Mondrian schema - jruby

I'm using mondrian-olap JRuby gem to query a datawarehouse using Mondrian library. I'm trying to build the OLAP schema but i'm having trouble setting a dimension composed by a many-to-many relationship.
I have a product with many categories, and so I created a table Product, a table ProductCategory and a table Category. The number of products is always increasing and so, using a single ProductCategory table seems a bit risky to me.
The Mondrian documentation was inconclusive for me, and all existing schema examples with a snowflake schema use only a single relationship table (like ProductCategory) and not a many-to-many combination of ones.
Is it possible to represent a many-to-many relationship using a Mondrian schema? Is there a better way to set this relationship?

Mondrian does not support many-to-many relationships. This is a feature that we have already started looking into, but there are no ETA as of now.

Related

MySQL Design: Seperate Schema or Table Prefixes?

I have a hobby project where I am creating my own software that will have different modules. The idea is to make the modules stackable and can be toggled off and on. I am using MySQL as the database back-end, and am wondering if it is better to have module-specific tables on their own schema, or if te tables should be prefixed. For example, let's say I have a systems module and an employees module; would putting all tables related to employees on an employee scheme be better than just prefixing the table names with something like "emp_"?
Prefixing table names is usually unnecessary clutter; the table names or the tables you are JOINing to should make it obvious what is going on. There is no performance difference between all-tables-in-one-db vs several dbs; there is a slight syntax diff.
This is kind of a moot point for MySQL, because databases and schema are interchangeable in MySQL. It would be more relevant for SQL Server.
My MySQL the keyword database was renamed into schema because they are not separated database. You can still have relationships across schemas.
In some ORM such as Laravel Eloquent you can write relationships such as:
$company->hasMany(Employee)
In this kind of relationship you will have a pivot table named company_employee. If you have two separated schemas, where do you want to put your pivot table? On the company schema or on the employee schema?
Laravel will fail to solve this question and it not trivial to create such relationship across schemas.

Does IntelliJ has a function to visualize the relationship between two specific tables in a database?

I'm working with a big mySQL database in IntelliJ.
I'm trying to join two tables which aren't in a direct key-relation to each other. Hence I have to join over multiple tables.
Because I barley know the database scheme, I can't find out these tables in a appropriate time. I know that IntelliJ has a function which can visualize all tables with their relations within the database but does it also provide a function where I can find out all tables in between two specific tables?
You can get help from Intellij partially for your task, using the visualization feature as follows-
The relationship between tables are clearly shown.
For your question, you need to check the primary and foreign keys for each table which are easy to know as they are highlighted.
Traversing them you can find the relationship.

Database designing - for vehicles application

I am trying to build vehicle application but I am confused about the table structure currently I have created those tables according to tire specifications. Would you check out the design structure and correct me if something missing. ERD Diagram uploaded with more explanation about the diagram.
I would split the "ty_tires" table into two separate tables:
"ty_model" - for tyre model
"ty_version" - for a version of a particular model
The ty_model table would need to have a many-to-one relationship with ty_season, ty_brand and ty_version. The ty_version table would need to have a many-to-one relationship with ty_width, ty_profile, ty_diameter, ty_speed, ty_load.

What's the best way to design an Entity / Relationship Model?

For example if I have 20 tables, I have to design it by section? i.e
CLIENT (id, name...) -- orders -- ODERS_DETAIL(id, products...)
.
.
.
lives --- ADDRESS(...)
Or I can use The MySQL Workbench EER Model (To me, it looks like the Pysical Model)?
Or like this: Data Modeling Levels
Well, I would not do it in code. That is for the RDBMS itself.
MySQL EER Workbench does not do true entity modeling - it is modeling tables, you are correct.
If you want true ER modeling I suggest Oracle's newly released ('Early Adopter') SQL Developer Data Modeler.
It is pretty easy to use, is free and can forward and reverse engineer models to tables. http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
When in doubt, design a table that is totally flat, and then determine where you have duplicated data, these can be considered for tables (entities).
The "ER model" defines entities unto themselves and allow the reference of entity-to-entity (table-to-table) through a separate relation. If you can remove yourself from thinking about foreign keys in your entities and focus on the relations in their own separate table.

Creating an AssociationSetMapping for MySQL with the Entity Framework Designer?

I am trying to build an Entity Framework model for my database schema using EF4 and Visual Studio 2010. Since I am stuck using MySQL as our database (for now), I pretty quickly discovered that since MYISAM tables don't support foreign key constraints, the designer does not have any way to automatically create all the associations for you. It is easy enough to go through the model and build them all manually, but I ran into a problem trying to map a pure join table.
Normally if you are using SQL Server or some other database that supports Foreign Keys, the designer will create all the mappings for you and in the case of pure join tables will create an AssociationSetMapping such that the join table is entirely hidden in the model. Instead you end up with a Many to Many mapping between two two primary entities.
However I am at a loss as to how to create this kind of mapping manually? If I create a Many to Many association between my two entities, I end up with a regular Association, not an AssociationSetMapping. There does not appear to be a way to create one of these in the designer than I can figure out, and to tell it which join table is supposed to be used at the database level.
Am I missing something, and there is a way to do this?
If not, I suppose I have to hack the XML directly, but at this point it is not clear what I need to add to the XML files and where, in order to manually create the association set mapping?
Ok, I can answer this one myself. Once you create a many to many association with the designer, you DON'T set a referential constraint on it, but rather use the Mapping Details window to tell the association what table is the join table, and which keys map to which fields in the database. Simple enough once I figured it out :) But I could not find any good documentation on this.