3,115 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
5
replies
84
views
High Risk Segment Customers
As part of an interview assignment, I am supposed to answer one question about high-risk customer segments.
I am supposed to calculate DTI and check the distribution for different categories Gender, ...
Best practices
0
votes
0
replies
61
views
Materialising tables for multiple end user profiles in Redshift
Imagine there's a reporting tool for which users might have the permission 'Admin' or 'User'.
We have a dimension in our models called admin_view and if the value is true then only users with Admin ...
Best practices
0
votes
2
replies
129
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
0
answers
51
views
How can I make an "is a" correlation in an ERD where it limits one entity set?
How do I make it so the entity set, SUV, is a CAR, though the entity set CAR is not a SUV in an ERD?
1
vote
1
answer
117
views
Power BI / Microsoft Fabric Semantic Model – "Sort by column" not working
Screenshot from DAX Studio
Screenshot from Semantic Model
I’m working in a Microsoft Fabric Semantic Model (same behavior as Power BI Desktop model) and I’m trying to sort one column by another using ...
0
votes
1
answer
53
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 ...
2
votes
1
answer
55
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
55
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
vote
1
answer
279
views
Implement Slowly Changing Dimensions (SCD) - Type 2 Using DuckDB
I want to implement SCD-Type2, and keep track of historized data, I am using for this task DuckDB, but I found out that DuckDB does not support Merge Statement.
The idea I have is to have two separate ...
2
votes
0
answers
153
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
1
answer
40
views
Dimensional Modeling- How to handle Code-Name-Description lookup table
Is there a best practice to handle OLTP lookup tables( code-name-description tables) when converting to Dimension? Eg, the ACCOUNT table in OLTP has almost 15 codes (Eg: TRADING_PLATFORM_CD, ...
1
vote
2
answers
39
views
Where to store the "best-before-date" in my ER-Model
I have a model about a butcher shop. The entities refer to
"Bestellung" => "Order" (Like order to get more inventory)
"Lieferant" => "Supplier"
"...
1
vote
1
answer
66
views
Is a localField $lookup faster than a pipeline?
In MongoDB (version 8) I'm wondering about the most read-efficient way of storing a "sharing mechanism". I.e. the users can share items with other items within the same collection.
When ...
0
votes
0
answers
24
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
89
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 ...