Questions tagged [relational-modelling]

Data structures that focus on the relationships between entities in the system, as opposed to attributes within an entity, or phases in a process, for example. Relational databases are popular application of relational modelling.

Relational modelling covers data structures that focus on the relationships between entities in the system, as opposed to attributes within an entity, or phases in a process, for example. Relational databases are popular application of relational modelling.

18 questions
10
votes
10 answers

Is there any benefit to a separate table that is one-to-one with the primary data table?

I've inherited a system with an Oracle relational database with a couple of tables modeled like I've sketched below, where there's an entire child table that only stores a single status code in a one-to-one relationship with its parent. Here's a…
4
votes
1 answer

What is the canonical pattern for database design with MongoDB?

When it comes to laying out tables in transact SQL databases, like SQL-Server and Sybase, the classic approach to relational modelling is well established. (The authority being Halpin's book) Establish your use cases Establish your…
hawkeye
  • 4,819
  • 3
  • 24
  • 35
2
votes
1 answer

Best notation to store/read/compute complex relationships

I have created an application in which users and tasks can be entered. A task should be be assigned to one or more users. If more users can do a task, the task should be assigned in such a way that it can be done by person A OR person B, or that…
1
vote
1 answer

Implementing shared content in a system with several users

I am working on a system that allows users to track their musical practice. The system allows users to create 'exercises' that store a few pieces of information like name, description and external links. These exercises are created by the user and…
1
vote
4 answers

Thinking about data as object vs table row

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 let yearFounded: Int let volunteerCount:…
1
vote
2 answers

Class-diagram dependencies between classes

Can requirements be expressed in class-diagrams? For example: A student can enroll in a class. There are different classes. Some classes have dependencies, e.g. you can't go to Spanish III before you went to Spanish II and Spanish I. How to model…
jkbx
  • 137
  • 3
1
vote
1 answer

What are good ways to encode order between records of a relational table

For example, when an issue tracker offers the functionality to users to keep a prioritized backlog of tasks and used a relational database for persisting this information, what are effective ways to encode this information? Of course one could…
wirrbel
  • 3,018
  • 2
  • 21
  • 33
1
vote
4 answers

The Open/Closed Principle, how does it work for adding entities?

I'm not even sure how to ask this, but here goes: Let's say I have a Web application that incorporates Teachers, Courses and Students in such a way that I can do things like this (pseudocode): teacherQuery = new TeacherQuery; teacher =…
0
votes
1 answer

Decoupling modules of a monolith

As part of an migration from .NET Framework to .NET Core we're looking to decouple elements of our monolith into more manageable modules. Ideally following a clean architecture/DDD/microservice approach dependant on each module. Two major elements…
0
votes
1 answer

Architecture for storing generic data

(I am facing this issue with code written in Swift, but would appreciate any high-level pseudocode solution, just so that I may wrap my head around the architecture) I need to find an architecture that would allow me to store generic data into…
0
votes
1 answer

Designing a model for a small business which provides multiple services which generate documents

I am designing a system for a company which provides multiple services to users, all of which generate a document. The documents all have a validity period. Some of the services can be grouped, and their documents have the same length of validity.…
0
votes
0 answers

Modelling DropDowns in ef core

Im working on an application which essentially fills a giant government/court form. Lets say i have an an Entity Unemployment and Unemployment has a ... thing "Reason why" and there are 6 possible reasons. "quit himself", "terminated by employer",…
0
votes
1 answer

Confused over qualification association in conceptual schema UML

I am getting confused at qualification association. I perform qualification when I need to remove many-to-many relationship or when the PK of a particular table is not able to be uniquely identify a row - in this case I make a composite key by…
Sunny J
  • 11
  • 2
0
votes
1 answer

eCommerce data modeling - is it common to duplicate product properties in line items?

Suppose I have the following entities in a commerce data model: BaseProduct (PK id, price, name) LineItem (PK id, FK product_id, price, name) Order (PK id, line_items) An Order includes one or many LineItems. A LineItem includes a reference to a…
0
votes
2 answers

How to use strict schema with seemingly fluid data type

Our company is trying to find a good generic way to have Many-to-One data for an entity. For example, a user might have 1 primary email, but many other emails also attached to their account. So we have a users table (1 row maps to 1 user): | id …
1
2