2022 Developer Survey is open! Take survey.

Questions tagged [data-modeling]

Elaborating passive data structures based on the analysis of data requirements for the purpose of designing and implementing standardised data formats, databases and data processing systems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
81 views

How to model a ternary relationship in a graph-based paradigm?

Consider a context where we have Users saving Questions and adding personal Tags to them. In a graph-based paradigm, a first approach could be something like: (User)-[SAVES {tags}]->(Question) ...
user avatar
  • 121
1 vote
2 answers
119 views

How to document a NoSQL document-based data model?

How do you document the logical data model of a document-oriented database like MongoDB? For relational databases, Entity-Relationship diagrams or UML class diagrams are used. What is the practice for ...
user avatar
  • 121
0 votes
1 answer
60 views

Is there a difference between these two data models?

Let us say I want to store on a database a userID, their nationality and if they are from the UK their UK passport number. I could model this by having one table with userID as primary key, ...
user avatar
1 vote
4 answers
151 views

Thinking about data as object vs table row [closed]

It often happens that we have a set of structured data. Let's say our data is about charitable organizations. I could turn it into a list/set of objects/structs: struct Charity { let name: String ...
user avatar
2 votes
1 answer
245 views

How to draw an aggregation relationship in the Crow's Foot Notation?

I was stuck on a relation description and unable to model it in the Crow's Foot Notation: Each individual vehicle is a particular model of a particular brand offered by the company (e.g., the XF is a ...
user avatar
  • 123
3 votes
2 answers
365 views

What to do when putting logic into the database seems to be the only option?

I am currently working on an application that models a complex business process that consists of many steps, each having a 1:n relationship with subsequent steps. The software is written Java using ...
user avatar
  • 149
-1 votes
2 answers
81 views

How to change a data model

In my model a user entity has three attributes : ID, name, hasBoyfriend. I want now to change hasBoyfriend to boyFriendsNames which is an array of names . The user entity is used by many services. The ...
user avatar
0 votes
1 answer
265 views

Can we do domain modelling or create domain entities/models in NoSQL like Amazon DynamoDB? If yes then how?

Recently I was going through an article (link at the end) on AWS for DynamoDB NoSQL and got to know that they are suggesting to only have a single table with certain access patterns in your NoSQL ...
user avatar
6 votes
3 answers
344 views

Rebuilding a legacy application : What about the data model?

I am currently rebuilding from scratch a product catalogue (to feed a shopping website). The existing legacy system is heterogenous, Long story short : The some products are stored in a FileMaker ...
user avatar
0 votes
1 answer
31 views

Attributes at the fact table in dimensional data model

I know that a fact table in dimensional data model consists of measures and flags for an event or transaction. I also understand that it may contain date of the event. I have to design on fact table ...
user avatar
3 votes
3 answers
873 views

What is the normal form of JSON?

This is going to sound like a trivial question, but I like to think it's actually a deep one. The simple quesiton is, "What is the normal form of a typical JSON object?" For reference, I ...
user avatar
1 vote
0 answers
68 views

IoT Data Model Standards

I am currently trying to model IoT devices within buildings. I could start from scratch and develop the data model myself, but this seems like a common problem which will have been solved multiple ...
user avatar
0 votes
3 answers
973 views

Introducing "status" column to an SQL table changes its definition

I saw this pattern in multiple projects I wrote: I create an SQL model for a certain type of entities and at some point, we realize that there's a need to store multiples types of the same entities. ...
user avatar
  • 143
0 votes
1 answer
238 views

What kind of Relations should I have in my E/R Diagram

I am trying to create an Entity/Relationship Chen Diagram for a new APP. Scope is simple enough. I will have multiples types of users login through the same Login Form. What I decided to do... Is ...
user avatar
  • 117
4 votes
2 answers
442 views

Applying Domain Driven Design to an analysis driven domain

I am currently working on a domain that is fundamentally driven by analytics. I'll use a fictitious example to illustrate my question. Suppose the application is a service based on House Prices. The ...
user avatar
  • 87
1 vote
1 answer
2k views

SQL Database schema for Catering/Menu management

Background I'm building a Private Chef booking service where you can book a Chef to cook you a custom Menu. I'm having trouble creating a SQL db schema that accurately represents the domain while ...
user avatar
  • 111
2 votes
2 answers
374 views

Database Model Classes in TypeScript

I'm using Knex.js with TypeScript for database access. Table uid (UUID, auto-generated by Postgres) name (varchar) Model interface User { uid: string | null; name: string; }...
user avatar
1 vote
1 answer
4k views

Data Flow Diagram for patient information system for a hospital

I have an example for a DFD for a patient information system implemented in a certain hospital. The below figure, represents the overview diagram (level 0-diagram, if we consider that the first level ...
user avatar
  • 135
2 votes
2 answers
168 views

How to represent a data model?

Often enough, the terms data model and data format are used interchangeably, but here I disagree. Let's start with the simpler one, the data format. I don't know exact definitions, but the data format ...
user avatar
  • 237
1 vote
1 answer
159 views

How to avoid code duplication from handling "structually similar types" in Scala?

Often, when programming, you'll have different degrees of information to you in different contexts. For example, a web server may have two routes, which recieve information about a Person, one of ...
user avatar
  • 174
3 votes
2 answers
355 views

Is Excel data model as good as or better than Microsoft Access?

I'm working with several Excel worksheets and workbooks that need to consolidated or linked to each other. These workbooks will track client interactions for different team members. I did the initial ...
user avatar
0 votes
1 answer
51 views

API Request/Response Model for showing differences in JSON objects

I am writing an API to merge two different JSON Objects. Both of these objects can have same as well different number of properties. Object 1 : { "name": "Sam", "lastName": "Hanks", "...
user avatar
  • 101
2 votes
1 answer
1k views

Optional relationship on ERD diagram

Upon generating an entity-relationship diagram of my database I observed several occurrence like this: This diagram (in IDEF1X notation) shows the following: Our team's DB convention is that each ...
user avatar
-1 votes
2 answers
334 views

Correct place to store semi dynamic data

What I mean by semi dynamic data are data that are expected to be changed only with product versions. Now imagine this scenario, In version 1 of the product, I have item status : SUCCESS , FAIL In ...
user avatar
-1 votes
2 answers
932 views

When self-referencing in a table, do you prefer `parent_id = null` or `parent_id = id` for a row referencing to itself?

For the discussion, I will provide my example. But I am interested in the broad guidelines. I save in my postgres DB legislation (law texts) composed of a single header (H), paragraphs (P), sub-...
user avatar
2 votes
3 answers
135 views

Many-to-many assignments in user system

I have a few software architecture/design questions related to a technically quite simple problem. We already have all the functionality implemented properly, however from a design perspective it is ...
user avatar
  • 129
1 vote
2 answers
45 views

Best way to model assay steps with low variability?

I have to process biological data input in the format of 96-well plates. explainer for the non-biologists: These plates are basically a 2D matrix of 8 rows x 12 columns of small cups called wells. ...
user avatar
-1 votes
2 answers
129 views

Help designing a product model with vast amount of properties

I've been asked how to re-design a legacy system by a relative for a company that builds custom chairs. On their website you can customize your chair in about 30 permutations : chair type, material, ...
user avatar
  • 9
0 votes
2 answers
200 views

Creating a "pass-through" dynamic model

We have a layer that exists in our architecture that, for lack of a better term, bears the responsibility of defining the common models. In other words, when systems need to communicate, rather than ...
user avatar
  • 117
0 votes
0 answers
156 views

What kind of diagram best represents the field-level mapping from one system component to another?

In my environment, we have multiple systems developed independently by different teams. Those teams frequently recreate the wheel because they're building applications, not building blocks. As a ...
user avatar
  • 1
4 votes
3 answers
199 views

ER diagram - feasibility of a requirement

I need to model the following requirement in an Entity-Relationship diagram. "Customers place orders, which contain a list of products with their quantity and prices. A shipment is made when ...
user avatar
  • 49
0 votes
1 answer
174 views

How to create a flexible datamodel?

I'm trying to create a flexible datamodel and i'm not sure what's the right approach. My application is used by several clients (big and small). Big clients need all the seperate layers, but small ...
user avatar
  • 49
0 votes
1 answer
91 views

Lightweight data mining + organization & visualization

I'm looking to do some simple data mining that consists of going once per day to a single page and collect the following information: List of movie theaters Movies today on each theater Session times ...
user avatar
  • 11
2 votes
2 answers
640 views

Index / Unique on `deleted_at` column?

We have an Accounts table in a Postgres DB that has a unique index on user_id and product. Users can have many accounts, there's no product table. Occasionally users will create an account ...
user avatar
  • 129
2 votes
2 answers
123 views

how to model 2 objects that refer to each other in the DB

Now I have 2 objects which are "PROBLEM" and "SOLUTION", obviously "SOLUTION" is a proposed solution to a given "PROBLEM", my problem is that in my business I have the following relations: a "...
user avatar
29 votes
4 answers
7k views

Is there an industry standard for gender model other than male and female?

I am modeling a database that should be used as generic non-functional requisite for all services of the startup company, like persons, users, services and commercial data like coupons, signature ...
user avatar
  • 549
2 votes
1 answer
75 views

How to model rdbms relationships as graph relationships?

I am modeling our existing database in transition to a graph database. Currently here is how I can interpret the database a graph relationships group -have-> groups group -have-> participants ...
user avatar
2 votes
3 answers
1k views

How to store sequential timespans in a database?

How can consecutive periods of time (defined by a start and end date) be stored in a database? For example: from 2018-01-01 00:00:00+01:00 until 2018-06-01 00:00:00+02:00 from 2018-06-01 00:00:00+02:...
user avatar
  • 131
4 votes
1 answer
4k views

What is an example giving the difference between Domain Model and Data Model?

I've seen many articles describing differences between Domain Model and Data Model. However none of the articles have picture representations showing difference. https://stackoverflow.com/questions/...
user avatar
3 votes
1 answer
2k views

Handling guest users in ecommerce application

I'm currently developing an Ecommerce application and am trying to figure out how best to add a 'guest checkout' feature. The 3 main models that I am wrestling with to add this feature are Address, ...
user avatar
3 votes
3 answers
176 views

Should I use a physical units library for modelling domain properties if I don't need to perform computations on them?

I'm working on the data model of a service describing houses and flats. This involves storing quantitative physical properties of certain features of the premises, for example: Speed of the Internet ...
user avatar
  • 427
1 vote
1 answer
2k views

Proper modeling and name convention for an intermediate table between intermediates

I have 4 entities: Event, Message, Flow and Document. Event table stores a limited (seeded) number of records. Message has many events and each event can be related to many messages. The name ...
user avatar
1 vote
2 answers
122 views

Database Modeling Question

I am having a doubt while creating a DB, and I would like to know if there are objective arguments that could help me mak a better decision. Case A project that can have several revisions, so I ...
user avatar
  • 119
0 votes
2 answers
237 views

Is it acceptable to break MVC by storing data in the DOM in order to reduce load on the Database Server, ever?

I am currently using NodeJS & Express to load webpages which contain element content that is rendered via a query to MongoDB. A GET request will create Button elements, binding the MongoDB _id ...
user avatar
  • 119
-1 votes
1 answer
3k views

Tender Type vs Payment Method/Type

I'm designing the data model of a payment database. One of the domain requirement is to keep track of how the customer paid and, if applicable, what was used i.e.: Visa, Amex, etc. In the past I ...
user avatar
  • 117
3 votes
2 answers
198 views

How to model relational data that can be organized in multiple ways? [closed]

I’m working in a project that is building a system to manage data (10-20 million records) collected by a research organization. One of the challenges is that even though the data is superficially ...
user avatar
2 votes
1 answer
248 views

many to many relationships in ER Diagramme

Relational database management systems can’t have M:M relationships, so before converting a data model to a database in Access, SQL Server, mysql, or other relational DBMS, the data modeler must solve ...
user avatar
  • 396
35 votes
7 answers
13k views

Modeling first and lastname separately

Which arguments should someone consider when designing a new system and has to either store the name of a person as one field or separately as first/last name? Pros for single field: Simpler UI No ...
user avatar
1 vote
3 answers
301 views

when should data modeling be done?

I want to get your clarifications about some points: Should data modeling (e.g ERD) be ignored at the beginning of a project and then be done later after the project is complete, especially if the ...
user avatar
  • 21
2 votes
1 answer
471 views

Data modeling for NoSQL document database

Below are the common phases applied, for a real world requirement(data) map to DBMS specific schema. Conceptual models ER/EER/CODASYL/Hierarchical bridge the gap, in mapping the real world data(...
user avatar
  • 2,225