Data modeling in Datomic

I've been looking into Datomic, and it looks really interesting. But while there seems to be very good information on how Datomic works technically, I have not seen much on how one should think about data modeling.What are some best practices for data modeling in Datomic? Are there any good resources on the subject?...Read more

data modeling - Optimizing Dax & model for "where date between" type queries

I am building a model to allow reporting on two seperate datasets, for this example we'l say a Students dataset & a Staff dataset.The datasets are pretty seperate and the only real link between the two is Date, so from a model perspective, there is a Students star schema & a Staff Star Schema.The data displayed is snapshot type data, answering questions like:- For a selected date, show all active employees- for a selected date, show all enrolled studentsThis means that when a single date is selected, the model then finds all employees w...Read more

business intelligence - In Microsoft BI how do you model a fact table when user selecting data between two times

I have a modelling issue regarding selecting all data for a duration (between a start and end time).I will probably end up using Tabular/PowerPivot for this but it could also be PowerBI or excel querying the database directly.Summary:I have a fact table (Fact_Session) with a StartDateTime & EndDateTime column. Users need to see data between a start and end Time.There is a second fact table (fact_Products) that lists Products scanned by a user with a specific device and the time it was scanned at.Requirement:When a user selects a start &...Read more

data modeling - DAX Calculated column based on two columns from other table

I need to write a DAX statement which is somewhat complex from a conceptual/logical standpoint- so this might be hard to explain. I have two tables. On the first table (shown below) I have a list of numeric values (Wages). For each value I have a corresponding date range. I also have EmployeeID and FunctionID. The purpose of this table is to keep track of the hourly Wages paid to employees performing specific functions during specific date ranges. Each Function has it's own Wage on the Wage table, BUT each employee might get paid a different Wa...Read more

data modeling - How to make Date dimension common to fact and another dimension

I want to design a star schema for an analytical project. This analytics revolves around "customer" dimension. I'm having a hard time modelling the tables. These are the two tables I've come up with: I'll ask my concerns one-by-one: How can I create date dimension so that it's common to fact(invoice_date) and customer(date_of_joining)? I mean, the end-user can have select a date so that he can see how many users got joined on that particular date as well as the total sales amount? Is this a good design? I mean the "location", "cashier", and...Read more

data modeling - How to relate a product dimension with a sales fact

I have been studying datawarehouse in the last couple days, particularly, i have been reading The Data Wharehouse Toolkit - The Definitive Guide to Dimensional Modeling by Kimball and Ross.Uppon that reading, i came to the 1st exapmle where there is a sales fact and it related to a product dimension, as you can see in the bellow image:I think i can grasp the gist of how this relationship allows us to rotate the "cube" slicing and dicing data, however this is where i get lost:In this example and many others on the web product is a one-to-one rel...Read more

data modeling - Star schema, normalized dimensions, denormalized hierarchy level keys

Given the following star schema tables.fact, two dimensions, two measures.# geog_abb time_date amount value#1: AL 2013-03-26 55.57 9113.3898#2: CO 2011-06-28 19.25 9846.6468#3: MI 2012-05-15 94.87 4762.5398#4: SC 2013-01-22 29.84 649.7681#5: ND 2014-12-03 37.05 6419.0224geography dimension, single hierarchy, 3 levels in hierarchy.# geog_abb geog_name geog_division_name geog_region_name#1: AK Alaska Pacific West#2: AL Alabama East South Central Sou...Read more

data warehouse - why using sequence number against version number in dimension table by datawarehouse modeling

In the context of dimension modeling, as typical case, it is great to have surrogate key in dimension table to track the change of rows(http://www.kimballgroup.com/2006/07/design-tip-81-fact-table-surrogate-key/).There are three common ways to realize surrogate key 1) sequence number 2) version number 3) hash key (used by data vault)My question is: why sequence number is preferred in most of dimension modeling I have seen. Thanks a lot...Read more

data modeling - Using a source surrogate key in a Dimension Table

Fairly new to data modelling and have the scenario below and am unsure on how to proceed with the designI have a source table with a combination of natural keys and a surrogate key called MED_key, a simple example below:--Table_MedicationsMED_Key | Medication Name | Medication Desc | Class Lvl One | Class Lvl Two-----------------------------------------------------------------------------759456123 | Med_ABC1 | Medication for ABC 1 - Long Descriptive Text Here | Calcium | Calcium Type A781456113 | Med_ABC1 | Medication for ABC 1 - Long Descripti...Read more

data modeling - Dimensions without any link to the fact table

I am currently designing a dimensional model where there are dimensions like orders, product, shipment, returns, items.My goal is to calculate metrics at day level and populate the fact table. The metrics are count of orders per day, total gross sales per day, total net sales per day. I have designed the dimensions and the problem I am facing is how to design my fact table. As I only need these three metrics, I want my fact table to have the below four fields in my fact table to have a better performance.But thing is I am worried about is wil...Read more

data modeling - Snowflake schema dimension

This is the first time i'm working on a BI project and Pentaho products are not yet familiar to me, so i needed to know if the following models are correct and that i won't face difficulties later when creating hierarchies on the BI Server !Thank you.Time dimension :Complication dimension, every complication can have sub-complications :...Read more

data warehouse - BI multi-dimensional modeling: How to turn measures into dimensions?

so here´s what i plan to do: Let´s say we have a typical sales fact table with typical columns like:Date, SalesRep, Product, Region, Units, AmountNow, simple enough, I can sum over the Amount and roll it up against the Region like this:Region Sum of Revenue------ --------------North 56,234 $South 48,788 $East 38,787 $West 15,334 $But what if I want to have it another way, like this:Revenue range Region------------- ------>50,000 North>25,000 South East>10,000 ...Read more

data modeling - How can I identify users who have a performed an action X times? [keen-io]

We plan to use Keen as our tracking core, but combining requests and extracting data is a big deal for us.If we have for example one collection named pageviews, with a user as a property of it (like so : {"name": "pageviews", "properties":{"user":{"id":"4242"},"url":"https://keen.io/"}}), and another collection named purchases with the same user property inside :How can we get the number of unique users who have visited at least 3 times one url and that have completed one other event "purchases" ?How can we extract those persons ? Is it possibl...Read more

How would I model data that is heirarchal and relational in a document-oriented database system like RavenDB?

Document oriented databases (particularly RavenDB) are really intriguing me, and I'm wanting to play around with them a bit. However as someone who is very used to relational mapping, I was trying to think of how to model data correctly in a document database.Say I have a CRM with the following entities in my C# application (leaving out unneeded properties):public class Company{ public int Id { get; set; } public IList<Contact> Contacts { get; set; } public IList<Task> Tasks { get; set; }}public class Contact{ public in...Read more