Book a Demo

Author Topic: Data Model - field value definitions  (Read 3772 times)

Karin

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Data Model - field value definitions
« on: June 29, 2011, 02:03:23 am »
Hi,

I read the article here with great interest (http://www.sparxsystems.com/resources/uml_datamodel.html). I am actually using these techniques, but am currently running into something that is not covered here. I have certain data sets that are predefined like for instance settings and roles. I can model the structure of the tables and the classes without difficulty, but am unsure how to model the possible values of the fields that need to be catered for; I would like to store them with the Data Models and refer to them from my Use Cases. It looks like Tagged Values may be the way forward; would this be what you experienced EA users would recommend? If so, is there a recommended Tag type I should use? If not, could you point me in the right direction of how to best document this in EA please?

Thanks for your help.

Kind Regards,
Karin

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Data Model - field value definitions
« Reply #1 on: June 29, 2011, 07:22:14 am »
For predefined data sets then use enumeration and add each value for the data set in the enumeration.
See an example here;
http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/modeling_languages/addingenumerationstagstost.html

Alternatively you could put in the description some text like Backus Noir Form;
"[Red|Yellow|Green]"
http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form

or you could use OCL in the constraint tab of the attribute
http://www.omg.org/spec/OCL/2.2/PDF/

So there are some options. It all depends on how you want to use it.

Hope that helps  :)

Happy to help
:)

Karin

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Data Model - field value definitions
« Reply #2 on: June 29, 2011, 08:02:01 pm »
Thanks Sunshine, that is really useful!

On Enumerations, would you only use those when there could be only a single selection from the list, or would this be a valid way of expressing any lists of items, even where it may be possible to select multiple items?
For instance, I could have a single user who fulfills multiple roles, so in my Settings the roles would be represented with tick boxes in the GUI and more than one could apply.

Thanks so much for your help, it is appreciated.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Data Model - field value definitions
« Reply #3 on: June 30, 2011, 08:34:22 am »
Enumerations are simply a set of values that can be selected. When modelling you can use the relationship between a class and the enumeration so you can choose the usual multiplicity options. For instance 0..1, 0..* etc.

So when you need to choose from a list with multiple selections choose the appropriate multiplicity.
0..* for multiple selections.
0..1 for single selection.

Easy eh?  ;D
Happy to help
:)

Karin

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Data Model - field value definitions
« Reply #4 on: June 30, 2011, 10:56:16 pm »
Thanks very much Sunshine, you have been fantastically helpful!  [smiley=thumbsup.gif]