Questions tagged [relationships]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
4 answers
188 views

Many-to-many modeling for microservices

I have two microservices, say "students" and "courses", they represent separate entities that are managed separately by different teams. A given student can be enrolled in multiple ...
persson's user avatar
  • 177
0 votes
1 answer
112 views

Match making algorithm respecting players' choices

I am currently developing an application in Python that has a match making functionality to form sports teams of 4 and group them by skill. The following has been implemented and works. E.g. Form ...
serge's user avatar
  • 9
-2 votes
1 answer
91 views

UML relationships

Could someone explain to me if the relation in this class diagram is a "dependency" or "association" relationship and why? I cannot edit the picture. The terms translate into ...
João Vitor Gomes's user avatar
0 votes
1 answer
237 views

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 ...
Skwiggs's user avatar
  • 117
-2 votes
1 answer
61 views

Assigning Relationships between various objects in a collection

Similarly to a sports team chemistry or even a better example would be fifa ultimate team chemistry where putting certain players in the team would improve the team's overall chemistry Say there are ...
user2921885's user avatar
1 vote
0 answers
599 views

How to handle relationships between resources in Restful API

Problem Hi, we have an API that it's pretty similar to a standard CRM. That is, we have a really big amount of resources (even our own customers can define new resources). All of these resources share ...
Antonio Gamiz Delgado's user avatar
5 votes
3 answers
197 views

UML Composition parent association end

The Wikipedia article on the Composite Design Pattern includes the following diagram: As you see, there is an association relationship which is child 0..* – 1 parent (association). However, shouldn't ...
Aldan Creo's user avatar
1 vote
2 answers
762 views

determine correct relations in ERD - Customer Orders use case

The below ERD is taken from a professional architecture reference, however I have a concern in the relation between Customer and Invoice, I believe that relation between Customer to Order , and Order ...
osama yaccoub's user avatar
2 votes
3 answers
276 views

OOPS Relationship between Soccer Field and Soccer Player

I am trying to design a simple Soccer game. To keep things simple, I am having a SoccerField to represent the field and a Player class to represent an individual. A SoccerField will contain a list of ...
SyncMaster's user avatar
0 votes
1 answer
107 views

Relationship problem between entities

I'm not sure how I should think regarding my database design. I have made this database schema below. And I'm trying to think about the relationship between the entities. I have read through online ...
user avatar
2 votes
1 answer
114 views

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 ...
BogisW's user avatar
  • 131
1 vote
2 answers
2k views

Relationship between entities in different aggregates and size of aggregate

I read a lot about DDD but few thing are still unclear. At this moment I have two dilemma The size of aggregates. How small could be an aggregate? For example we have: class Car { String colorId ...
pin54's user avatar
  • 19
0 votes
1 answer
399 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 ...
Tygreton's user avatar
  • 117
1 vote
1 answer
1k views

UML Use Case Diagrams Relationship - Required / Optional AND independent

I am learning to create Use Case diagrams using the UML specification, but I have a couple of doubts about Use Case relationships which I cannot solve on my own. My question regards two different ...
Nik Manzotti's user avatar
4 votes
1 answer
4k views

Designing a REST API resource with a non-unique ID, but unique composite ID

Is it bad for a REST API to have non-unique ID for a child resource? For example, the endpoint is: GET /parent/:parent_name/child/:child_name The :parent_name is unique, but a :child_name is only ...
peefartpoop's user avatar
9 votes
2 answers
11k views

What is the difference between containment and aggregation relationship in UML?

As it is said in ARLOW, J., AND NEUSTADT, I. UML 2 and the Unified Process, 2nd ed book, there are 7 types of relationship between different objects. Dependency Association Aggregation Composition ...
Mostafa Ghadimi's user avatar
2 votes
1 answer
2k views

How to show relationships of the component containing the interface definition when using ball/socket notation in a UML Component Diagram?

I recently found out that I have probably been using ball/socket notation in a wrong way all the time. Now I am confused by the different ways of drawing interface relationships in two regards (I ...
Phil's user avatar
  • 51
5 votes
6 answers
1k views

UML aggregation: how can the "whole" exist without its "parts"?

I understand aggregation is a "whole/part" relationship, where the "parent" class is the whole and the "child" class is the part (and this is unidirectional), and that each class exist independently (...
Floella's user avatar
  • 383
1 vote
1 answer
35 views

Approach to modeling for a new attribute to attach to exactly one of the many in a one to many relationship

Apologies for the awkward title; I wasn't quite sure how to concisely describe what I'm trying to do. My situation goes like this: We have a Product table in our database; Each Product may have 0 or ...
David Goldstein's user avatar
-1 votes
2 answers
7k views

Many to many relations in Domain Driven Design

I am new at domain driven design, and want to learn some about aggregates. For example I have a User and Role entities. public class User { public string Id {get; set;} public string Username ...
barteloma's user avatar
  • 319
18 votes
11 answers
10k views

Need Good OOP Design For World and Countries Problem

I am currently working on problem with a chicken or egg first situation. Basically, I am designing a solution which goes like this: World is a collection of countries; Each Country has a name, flag ...
csavvy's user avatar
  • 345
2 votes
1 answer
611 views

Can we have a ternary relationship together with a recursive one in E-R diagrams

I am designing an E-R Diagram for a simple system where there are some users and contests. A user can create a contest or invite other users to the contest who can decide to accept or not. I am ...
Tommy95's user avatar
  • 39
1 vote
2 answers
182 views

How to show UML component load/discovery and realization relationships

In a UML component diagram I want to show two components (among others). One is the core component that loads contents (classes) from the other. It's much like a testframework loading unit tests/test ...
Phil's user avatar
  • 51
2 votes
3 answers
144 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 ...
Fly's user avatar
  • 129
-1 votes
2 answers
2k views

How to handle many-to-many relationships with multiple incompatible relationship types in RESTful API?

Note this question is about when there are multiple relationship types. This is not the same as this question, where there is only a single member relationship. Say we have persons and organizations. ...
André Christoffer Andersen's user avatar
4 votes
3 answers
235 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 ...
holy_el's user avatar
  • 49
1 vote
3 answers
163 views

Database relation design

When I develop apps I reach situations like this frequently but I never found a best practice to solve it. Imagine: We have chats, each chat can have many message. We have tickets, each ticket can ...
Sina Sharifzade's user avatar
3 votes
1 answer
265 views

Proper way to associate data to users that are stored in external database?

I have this IdentityServer which handles authentication and authorization. It saves users, roles, claims, etc in its own database. Then, I have a web app that needs to protect some resources to ...
empz's user avatar
  • 141
4 votes
3 answers
2k views

Factory pattern or builder pattern ? which one is suited for reading Finite Element Model data from a text file?

A follow up to another question (Making a design decision about reading model data from an input file). I wish to ask another question regarding builder or factory pattern. (I read that builder is ...
Ring Zero.'s user avatar
2 votes
1 answer
2k views

Entities and polymorphic relationships

Lets say that I have a shelf on which I can put items that are shelfable (not sure if that is actually a word but you can understand my point). So I have the following: class Shelf { /** @var ...
mysubject's user avatar
4 votes
2 answers
319 views

How to represent relations between multiple objects without obvious aggregate root

Let's say we have three types of objects: Agents Calls CallsQueues They all can be linked with each other (1to1, 1toM, MtoM) or have no links, and these links change over time. Calls wait in ...
G. Kashtanov's user avatar
4 votes
1 answer
2k views

How to organize business logic which deals with different, but related objects

The task The piece of software I'm writing operates on the following object types: Agents Calls CallQueues These objects can be linked together, and each of them contains some additional ...
G. Kashtanov's user avatar
4 votes
2 answers
3k views

Best diagram to show relations between several applications

I'm currently an intern at a company. For my intermediate report I Received some feedback about displaying the relations between multiple applications. So in my image all 3D rectangles are a deployed ...
S B's user avatar
  • 149
0 votes
0 answers
1k views

Examples for bidirectional and unidirectional relationships between objects

To better demonstrate the difficulties of reading/updating objects in a multithreaded environment, I'm looking for examples for groups of objects with a bidirectional or unidirectional relationship ...
Stav Alfi's user avatar
  • 297
2 votes
1 answer
1k views

Imposing conditional entity relations

While working on an application, I am facing an issue. And I am not sure how to solve this. For explanation I have managed to come up with a simple example below: Consider a Grocery Store ...
Kishor Prakash's user avatar
2 votes
1 answer
150 views

Looking for a strategy to ensure name of child node stays unique in collection

Even though I'm programming in PHP, I'm open to reviewing language-agnostic suggestions, as they might point me to valuable directions. To remove any possible confusion I feel some comments appear to ...
Decent Dabbler's user avatar
3 votes
3 answers
235 views

How can I mark one of a 1:n relation as the "default"?

I have an "easy" question, but since I am not a very experienced programmer I would like to hear what some of you have to say. If I have for example a Db called MyDb with many tables. Two of them are ...
R. Gomez's user avatar
  • 275
0 votes
1 answer
280 views

What are best practices to maintain a list in the database in Rails?

I have list boxes and model relationships in the database. I'm doing the following migrations to maintain lists, rename items, and add items: def up Fund.create min: 0, max: 1_000_000 ...
Chloe's user avatar
  • 438
2 votes
3 answers
2k views

UML : is it okay to use only Association in a class diagram ?

I feel confused about the three relationships Association, Aggregation and Composition in UML. I need to finish a project soon, until it became less unclear in my head, is it okay to use only ...
snoob dogg's user avatar
23 votes
4 answers
78k 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 ...
KingBoomie's user avatar
1 vote
1 answer
156 views

Can the has-a relation in OOP become ambiguous or difficult to know?

Assume I have the following code. class D { static Integer i1 = 42; } Is it true that D has an Integer? Or is it only for instance variable that we can have a has-a relation? I also wonder about ...
Niklas Rosencrantz's user avatar
3 votes
4 answers
253 views

Hierarchical structure that needs to enforce availability

The project I am working on has deep parent/child relationships that needs to enforce availability. Imagine we are a large Worldwide Electronic Seller (Best Buy) and selling mobile phones We have ...
Gonzales Gokhan's user avatar
6 votes
2 answers
2k views

Specifying a bi-directional unique constraint on a join table in Postgres [closed]

Problem description I have a situation where I want to enforce that a relationship can only be defined once and I want to solve it on database (Postgres) level. The following situation I consider ...
Dynom's user avatar
  • 169
4 votes
2 answers
182 views

Designing my classes with relationships

I need to build a UI for entering values to the database. I am stuck with my class design to achieve it. I need a UI where I am able to enter the name of the system. Each system can have many options....
Vini's user avatar
  • 216
0 votes
0 answers
73 views

How to model relationships in scenario where every product can (don't have to) be associated to only one category

This one still occupies my mind. How do you model 1:N relationships. Consider having a category and product (typical e-commerce scenario). Every product can (don't have to) be associated to only one ...
František Maša's user avatar
0 votes
2 answers
2k views

Database design for linking parent & child relationship

Currently i have requirement saying user from an UI creates there own forms which has types textbox,choicegroup etc.. Does anyone have a any idea on how to architect the database to store all data? ...
AdminS's user avatar
  • 3
1 vote
1 answer
2k views

Laravel relationships and database schema

I am playing around with Laravel and came across something in the documentation for defining 1 to 1 relationships between tables that I would like to get feedback on. The example in the docs is ...
shauno's user avatar
  • 11
2 votes
2 answers
1k views

Is composition and aggregation really a type of association relationship?

From Wikipedia: There are four different types of association: bi-directional, uni-directional, Aggregation (includes Composition aggregation) and Reflexive. From what I know: Composition ...
cpx's user avatar
  • 379
1 vote
1 answer
99 views

How to associate both a collection and one item of this collection to an entity

I'm working on a project in which I have an entity, we may call Users and another entity Address. I want to define the entity User in a way that an user would have a collection of addresses (...
ibi0tux's user avatar
  • 241
1 vote
4 answers
435 views

Domain model associations that do not required the behaviour of the associated object. How to model?

I've been struggling with this question for a while. I'm specifically thinking within the object orientated domain model. Let's say I have two entities. A supplier and a customer. There is a ...
GWed's user avatar
  • 3,125