Questions tagged [multiplicity]

In mathematics, the multiplicity of a member of a multiset is the number of times it appears in the multiset. For example, the number of times a given polynomial has a root at a given point is the multiplicity of that root.

77 questions
2
votes
1 answer

Multiplicity in Object Oriented Design

I haven't understand the concept of multiplicity properly, infact this example has confused me, Patient(0..1)<>-----kidney(1..2),how's this possible.If there is no patient,how can there be one or two kidney,can someone clarify the concept of…
KKGanguly
  • 323
  • 3
  • 13
2
votes
0 answers

EF Code-first multiplicity constraint violated when looping over import files

EDIT Better isolated the error; see below. I have a ParentObject and ChildObject class in a C# Code-First EF model: public class ParentObject{ [Key] public int Key{get; set;} [Required] public string Name {get; set;} //unique…
Arithmomaniac
  • 4,604
  • 3
  • 38
  • 58
1
vote
3 answers

UML Diagram and Multiplicity with weak entities

Hi there I am beginning to try out with SQL and database design. I understand the SQL side of things, but trying to draw out diagrams is a bit confusing. Consider these business rules: A trainee has a name, trainee ID, and an email. A Trainee at…
Aniotazero
  • 43
  • 4
1
vote
2 answers

Mapping UML diagram to Java code conversion

Hello, I'm trying to to convert this UML diagram to java code directly, and below is my code which doesn't seem to compile anyways. I'm not very sure about how to place the optional multiplicities in, e.g. 0..* and 0..1. Thank you for your…
SteamboatTMR
  • 65
  • 1
  • 7
1
vote
2 answers

Can the multiplicity of an association vary over time?

I have a requirement on UML: the multiplicity of an association can be vary according to time. I have some opinions on it, for example, use a list to store multiplicity history, create a new association once multiplicity will change. But it seems…
newman
  • 499
  • 3
  • 10
1
vote
2 answers

How do I model a multiplicity of 2 in EF

I have two situations where I would want something like this. In my model, I have a Message which concerns either one or two Persons. Furthermore, the message has an association with two Addresses, i.e. a from Address and a to Address. In the…
1
vote
1 answer

Examples of languages that hide variable multiplicity

What are some examples of programming languages, extensions to programming languages or other solutions that hides the multiplicity of variables when operating on them, calling method etc? Specifically I imagine a system where I have a single typed…
1
vote
2 answers

Wrong cardinality in UML class diagram

My school teacher and me are arguing about how to write the correct cardinality to a relation between two classes: Customer ----places->---- Order So the exercise tells me, that one customer has 0 - x orders and one order always belongs to one…
alanb
  • 11
  • 1
1
vote
2 answers

OOAD clarification on multiplicity or cardinality

I am confused about the cardinality/ multiplicity when designing class diagrams. My main confusion is when to represent 1---* relationship. For ex in case of passenger and seat classes, passenger will be allotted to one seat, where as the seat can…
avatar
  • 35
  • 7
1
vote
1 answer

UML: Self-defined data types as attributes in classes / when adding an attribute to a class is allowed

Similar questions have been asked, but this does not fully address my problem: Object as data attribute of class in Class diagram UML When to use an attribute (property) instead of an association/aggregation/composition when drawing a UML I am…
1
vote
1 answer

How to handle String collections in UML?

I've always wondered what would be the best way (and I mean a standard, OMG approved way) to model a String collection in UML. Let's say I have a simple design where there are quotes, each one of them represented by several keywords. So I model a…
patr1c1a
  • 237
  • 4
  • 16
1
vote
0 answers

Entity Framework 5 - Relationship Multiplicity Constraint on Multiple Foreign Keys to Same Table

I'm working on a project that required an update to Entity Framework 5. This has required some slight changes to the entity and configuration classes (code first) to bring the data layer current. The upgrade is complete, except for one remaining…
1
vote
1 answer

Multiplicities in Enterprise Architect

I have a small problem with data modelling in EA. I'm making a foreign key relationship between tables by using an 'Association' connector. Then, I specify the FK relationship and it ends up with such an effect : http://tinyurl.com/npdkoda My…
Konrad
  • 1,014
  • 1
  • 13
  • 24
1
vote
0 answers

Entity Framework 5.0 Multiplicity constraint violated

I have a Multiplicity constraint violated error that I can't fix. Multiplicity constraint violated. The role 'Log_Main_Combinations_Source' of the relationship 'Bee.Stats.LogEntities.Log_Main_Combinations' has multiplicity 1 or 0..1. Here is my…
Ving
  • 11
  • 2
1
vote
1 answer

How to check multiplicity in Django template

does anybody know the answer? For instance, I have a div container and several items in it:
{% for item in filtered %} {% endfor %}
In the above code I need…