3,113 questions
Best practices
0
votes
2
replies
120
views
How to model and persist entities whose state changes over time
I’m designing a domain model where some entities evolve over time, and I need to keep a historical record of their state that can be retrieved later.
A simplified example:
A Credit Line represents a ...
0
votes
1
answer
412
views
Why is the type of inheritance required to be primary key (PK) for relationship types in SERM (ERM) modeling? [closed]
The Structured ERM (SERM) is an extension of the ERM.
There are two types of inheritance--how dependent entities/relationships inherit the primary key from the superior entity:
"PK": For ...
0
votes
1
answer
42
views
How to model a many-to-many relationship in DynamoDB with composite keys and enforce unique (id, ruleId) pairs?
I have a DynamoDB table defined as follows:
Partition key: id (string)
Sort key: ruleId (string)
Example item:
{
"id": "123",
"ruleId": "abc"
}
What I want is ...
-1
votes
3
answers
103
views
What business folks have to understand about database design [closed]
A business team is asking me to explain database design. I'm thinking of:
what a RDBMS is.
what a table is, what constraints are and why we need them.
what a transaction is and what ACID properties ...
0
votes
2
answers
2k
views
Arcs - data modeling
I am reading this post about arcs from data modeling.
This example says:
Arcs are a way to represent mutually exclusive relationships in the
ERD.
This arc represents the exclusive OR relationship – ...
2
votes
1
answer
47
views
Query based on fields from 2 different Collections in MongoDB
I am developing web application using Gin and MongoDB. I have defined models for user like,
type User struct {
Id nftdb.ObjID `bson:"_id,omitempty"`
Tenant string
...
1
vote
0
answers
48
views
How to show "PAST" (before today) + next 12 months with MMM X-axis labels
I'm trying to build a bar chart in Power BI where the X-axis shows the following:
A "PAST" bucket representing all data before today
The next 12 months, displayed as 3-letter month names ...
-1
votes
2
answers
174
views
A schema with 10 Fact Tables and 1 Dimension Table
Is it normal / best practice to have multiple fact tables but only minimal dimension table(s).
I am new to data modelling and trying to create the best / most efficient data model and it always seems ...
2
votes
0
answers
141
views
Is it possible to create true sentinel values in Rust?
Say I have some simple struct, eg:
struct SomeStruct {
things: Vec<usize>
recent_thing: Option<usize>
}
I'm trying to assert some invariant on this struct. For example, maybe we want ...
0
votes
2
answers
2k
views
universal data models and domain model implementations [closed]
One universal data model author I am reading contends that in his experience, 50% of all enterprise systems are 'universal' in their need to deal with Parties, Work Efforts, etc, 25% is universal ...
0
votes
2
answers
569
views
Horizontal vs Vertical SQL with Custom Column Headers
I'm struggling finding the most efficient way to approach this DB design. This is for a client who wants to manage their contacts. The Software currently is Horizontal which allows each client to ...
0
votes
0
answers
23
views
Database based upon schema.org or MS Common Data Model
I want to start picking up modern development so I’m looking at writing a simple web app for CRM / contact management.
I’ve seen the likes of https://schema.org and also Microsoft’s Common Data Model, ...
0
votes
1
answer
88
views
a confusion about schema design for storing store's profits and how to retrieve them in mongoose [closed]
For displaying the (daily-weekly-monthly-annual) total profits for the store's dashboard.
I want to store the data in an array for each store to not have multiple docs for the same store but different ...
2
votes
3
answers
4k
views
DBT(Data Build Tools) - drop the default database prefix that gets added to each model on deployment
In DBT, whenever we deploy the models, the database name gets prefixed to each deployed model in the sql definition in database.
I need to configure the dbt project in a way that it doesn't prefix ...
-1
votes
1
answer
114
views
How to draw an ER diagram where there are 2 entities with exactly same attributes
Each appliance is classified as either: Kitchen appliances, Entertainment appliances, and it’s important to keep track of their type.
Kitchen appliances and Entertainment appliances have details about ...
0
votes
1
answer
82
views
Power BI matrix - get data into correct format
I'm usually quite good with Power BI, but weirdly stuck on this matrix, that I'm trying to create. I just can't seem to get the data in the right format to produce the below chart. Can anybody help?
...
0
votes
0
answers
41
views
Why do sales (fact) without charges (fact) not show up in table visual when using a bridge table to model M:M relation using bidirectional relation?
I have 2 fact tables: FactSales and FactCharges.
The sales is a header detail (order header and details) level of granularity (OrderDetId), whereas Charges are at the order header level of granularity ...
0
votes
1
answer
52
views
Time Dimension: loading date
I have a simple question that it may be very easy for those Business Intelligence Architects, but I am struggling to find out the correct way.
I have a fact-table with 2 or more potential date (let's ...
1
vote
1
answer
110
views
power query design for performance of queries (using SOAP connector) for Power BI/Excel
I need to manage a large dataset of approx 100.000 records per year over many years.
The data is retrieved with SOAP connectors using custom query's.
Each records has 'basic info' and 'historic info' ...
0
votes
1
answer
151
views
How to Create a Generic Semantic Data Model in Tabular Editor for Power BI Reports with Separate Datasets?
I’m working on a Proof of Concept (POC) to create a generic semantic data model using Tabular Editor that connects to multiple datasets for Power BI reports. The goal is to have one centralized ...
0
votes
1
answer
45
views
Obtain avg number of monthly active customers on the web over the past 6 months. An active cust is one that has purchased within the prior 12 mnths
I am seeking help with a complex data modelling problem I am trying to solve. Was wondering if any kind soul with a good SQL expertise is able to help me.
The question is: obtain the average number of ...
1
vote
1
answer
69
views
Optimizing low-level structure for CPU memory performance in my game simulator [closed]
I am writing a world simulator for a turn-based game. The key feature is that there will be many NPCs with detailed psychology modelling, perhaps 20,000 - 30,000 of them. I want all NPCs to make their ...
0
votes
1
answer
92
views
How to sort by date column if there are other clustering keys that ensure the uniqueness of the record
I am writing a test project in the subject area "Password storage system".
create table users
(
login text primary key,
access_token text,
...
-1
votes
1
answer
74
views
Kimball Model Design - When to Snow or Star
I have data model for a Kimball style data warehouse. Regarding the whole Star vs Snowflake schema conundrum when it comes to dimensional tables and their ownership.
Scenario: A bunch of IoT Devices ...
0
votes
1
answer
178
views
DynamoDB Hot Paritions Key Prefix and Overloading GSIs
I'm trying to implement a single table design in DynamoDB and I've seen recommendations to use prefixes for partition keys to identify entities. For example, a car's record might have a partition key ...