Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [data-modeling]

The tag has no usage guidance.

2
votes
1answer
48 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 ...
2
votes
2answers
105 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:...
-1
votes
1answer
147 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/...
1
vote
1answer
278 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, ...
3
votes
3answers
152 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 ...
0
votes
0answers
28 views

Designing a Data Model For Climbing Gear Checked Out at Events

I am trying to setup an internal use asp.net core 2.0 application to check gear in and out at climbing events. The Model will go something like this: Category.cs (like ice, mountain, etc...) ...
0
votes
1answer
300 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 ...
1
vote
2answers
107 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 ...
0
votes
2answers
133 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 ...
-1
votes
1answer
693 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 ...
2
votes
2answers
159 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 ...
3
votes
1answer
81 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 ...
31
votes
7answers
6k 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 ...
1
vote
3answers
173 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 ...
1
vote
1answer
327 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(...
0
votes
4answers
507 views

Efficient way to search data based on multiple attributes

We are building a system where we accumulate data from many of our internal services, process them and generate set of data called Jobs saved to database. Our client application running on client ...
3
votes
1answer
85 views

Using an array as a member variable in a class

I have a style question for designing a class to represent a real model. Let's say I have Guide that has PointsOfInterest as a member. Would I want to do something like: class Guide { public ...
4
votes
2answers
650 views

Design patterns for processing/manipulating data

Sometimes when I write a class or piece of code that has to deal with parsing or processing of data, I have to ask myself, if there might be a better solution to the problem. Example 1: In a recent ...
1
vote
2answers
615 views

How to design the datamodel of nested categories connected to a note?

I am building a personal app to store my notes in. It is not a new concept, of course, but it is giving me a great project to learn Node.JS together with trying out a graph database: Neo4j. What I am ...
4
votes
3answers
108 views

Modeling content management domain

The domain is more or less straightforward — I have an article (or rather several types of articles) that I want to edit and publish. Published article is exposed through an API to public. The thing I ...
2
votes
3answers
9k views

ERD: “many” vs “zero or many”/“one or many” crowfoot notation?

Background I saw this figure describing the different crowfoot notations used in ERD: I'm not able to find the difference between the "many" notation and the "zero or many. However I was able to find ...
1
vote
1answer
78 views

How to model shared and unique options for a family of products for a relational database?

I have a family of products that currently houses 3 product lines. All 3 product lines share the same 4 options, but on top of those, each product line has 1, 2, or 3 different options respectively, ...
5
votes
1answer
81 views

Should an entity id contain information about entity?

If an Entity doesn't have an unique ID, we usually use auto increment number to distinguish entities. But sometimes, we have to hand that ID over to people so that they can use it. So using auto ...
0
votes
1answer
124 views

How to choose a data model?

Although this question takes a very narrow, concrete form, I'm more interested in the conceptual underpinnings of justifying an approach, and how I can apply it to the next problem. Setup I'm ...
0
votes
1answer
4k views

How multi-valued and derived attributes are denoted in crow foot's notation of ERD?

In Chen notation multi-valued attributes are denoted by double eclipse(oval) and derived attributes are denoted by dotted eclipse(oval), but how they are denoted in crow foot notation? Also how ...
2
votes
3answers
307 views

Database design for changing user roles

What database design would you suggest for the following example? Example: Imagine a bus with some people inside. Every person has some attributes like name, etc. Also there are driver- and passenger-...
0
votes
4answers
367 views

Best way to model “Composite Skus”?

I have a SKU record which keeps track of raw materials used, pricing, cost, etc. An example SKU would be a Hamburger (1 bun, 1 patty, 1 oz ketchup, costs $11 make, priced at $4, etc). I need to add ...
1
vote
1answer
63 views

KPI Module structure

My plan's to develop a module for easy customer KPI handling across projects. It should consist of a small SDK to put 2-3 lines of code in the project, a "template"/model for a SQL table (code first ...
1
vote
2answers
291 views

How to update a model with dependencies

I'm having a bit of a hard time figuring this out. I have a model (which you can see in the image below) this model can be changed (it won't happen often, but it can). When it changes I do not get the ...
-1
votes
1answer
122 views

How to design and store life cycle or states for a Java entity bean?

In our application, we have a pojo mapped to some entity. One pojo refers to one entry in DB. There are multiple steps for it's life-cycle. It gets created freshly, it goes 'live', after some ...
2
votes
1answer
86 views

How to Structure Data Models as Detail or Stub in C# using Code First?

Say I have a product listing backed by a SQL table. It's a large data model (truncated here for brevity) but let's say looks like this: public class Product { public int Id { get; set; } ...
9
votes
1answer
2k views

How should I design an ordered list resource in a restful service?

I've run into this same problem over and over again and I haven't found a solution that I really felt was optimal. Say in an app, you have an ordered list and you let the user change that order by ...
1
vote
3answers
169 views

How can I model IS-A relationship on a ledger, when having different classes of products?

This is a question on how to model database entities and relationships when it comes to storing persistent data and dealing with differently-handled types of products. Use Case Company sells various ...
1
vote
3answers
375 views

DDD - modeling of similar categories with different behavior

I have a question related to modeling similar Class of objects in a DB: Suppose in the database i have a list of clients which can be in different categories - eg. Client --> can be in Category1 ... ...
4
votes
2answers
3k views

Graph database keeping historical relationships

I'm starting the modeling of the following problem: I have many clients (millions) that interact in a network forming a graph. At the highest granularity of my business problem, each realationship ...
2
votes
4answers
276 views

Data Model - How to better model this circular reference

I'm designing the data model for a project where users can create documents, save revisions of that document that can be reverted to, and publish documents. The basic data model I have right now is ...
3
votes
1answer
1k views

RESTful API/Data Modeling - How to model an subordinate resource that will only ever have one element

I'm creating an API and data model for a multi-user document-creation application and I'm having trouble with a particular part of the data model/API design. Below is my current line of thinking: ...
1
vote
5answers
894 views

How to model the database tables for calculating on peak and off peak usage data

I am using MS Sql Server and my system contains power usage data in one table as timestamp and values for KW(two columns). This data is collected at 1 hour interval. At the end of the month I need to ...
1
vote
1answer
212 views

How many vertices/nodes are too many in a graph and stop being beneficial?

Background I'm working on a project that requires me to keep track of transactions as well as the flow of items in a game. In order to do that, I'm storing those transaction in a graph db (Orient-DB)....
4
votes
3answers
93 views

Using Multiple 'Sub-types' vs a larger single type?

I have a user model in an application that I'm working on, which currently uses sub-types to encapsulate properties depending on what type of user you are - I just can't help but think that this is ...
1
vote
5answers
1k views

Designing pricing table (RDBMS agnostic)

I'm designing a price list table for my database. It will include Customer, Model, Start_date, End_date, Price, Currency, RRP When I update a new price list, which is sent every now and then (maybe ...
0
votes
1answer
73 views

Software architecture entity connections [closed]

For learning purpose I want to create an app. So I thought I will do something real easy to learn a lot about object oriented programming and modelling. After some thinking I had the idea to do a ...
3
votes
4answers
1k views

What is the best data model to represent mathematical range (in database, xml, json…)?

For example, greater or equal to 50 and smaller than 100 (>=50 && < 100) smaller than 10 or greater than 40 (<10 || >40) I have been thinking about how to represent ...
7
votes
2answers
6k views

Database Design for Inventory

I am starting to design a typical product based MySQL database but I keep running in circles on how to design the tables. I have many types of products Jeans Tshirts Dresses Which have many of the ...
1
vote
1answer
2k views

Likes / Stars / Following - same or separate data structures? [duplicate]

I am building a social network, which will have standard features of 'likes' (upvotes) for posts, 'following' between users and 'stars' for favorite posts. These might reasonably expand in the future ...
1
vote
2answers
235 views

How can I create a model to efficiently answer the question of - where to place my db-interaction code I am about to write?

I am seeking the right model for storing and retrieving data, when working with any specific class, while keeping in mind the bigger picture. Details: I have some SQL code in (one) of my classes and ...
2
votes
1answer
403 views

What happens to database design process when ORM tools are used?

I have learned about database design, including normalization during my undergraduate course. When we have to model a database for a system, we can start with an ER model and then convert it to the ...
2
votes
1answer
53 views

Converting a one-to-many xml design to a many-to-many

I have an xml file format that looks something like this: <topLevelTag> <category name="foo"> <item attrib="value">ItemName</item> <item attrib="value2">...
4
votes
1answer
571 views

Should I avoid data duplication?

I'm trying to design a relatively simple ERP system. However, there are some requirements that complicate things a little bit: It must be possible to add all sorts of contacts to the people table, ...
2
votes
2answers
148 views

Should ids be mapped to the implementation type

This is a question of model design, and hopefully some architecture nerds have strong opinions on this. I've been developing one that I will post in an answer. Typically, in every codebase I've ever ...