M_D
(M D)
1
Hi All,
We have Oracle Star Schema. Can we migrate this Star Schema into Mongo DB ?
We have 1 Fact table and 15 dimension tables and almost all queries perform inner joins. Data in these tables are very huge.
Any pointers to blog and/or experience is highly appreciated.
slava
(Slava)
2
‘Table of rows’ in SQL Databases equivalent to ‘Collection of documents’ in MongoDB. And Star Data Model can be represented as document with nested properties, like this:
{
_id,
totalA,
totalB,
dimentionA: {
_id,
dataA1,
dataA2,
....
},
dimentionB: {
_id,
dataB1,
dataB2,
....
}
}
To put simply, your fact document will contain dimension documents as nested objects.
With this structure, you will not need to use any joins ($lookups), because every dimension is already joined to the fact data.
This scheme will be a perfect fit, only if the total size of such document will not exceed 16MB.
Check this OracleDB and MongoDB Comparison for more detailed overview.
Franck_Pachot1
(Franck Pachot (MongoDB Developer Advocate))
3
Hi, I’ve put an example moving a star schema from Oracle to MongoDB, same model but using one Search Index to replace the many bitmap indexes:
https://dev.to/franckpachot/mongodb-with-search-indexes-queried-as-kimballs-star-schema-with-facts-and-dimensions-k1