Book a Demo

Author Topic: Attribute length / precision  (Read 3076 times)

Chris Brandt

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Attribute length / precision
« on: October 29, 2004, 10:26:58 am »
I am attempting to create a modelling language for the description of flat files. I've started by createing a set of stereotypes to describe the different types of elements (files, records and fields), however I cannot find a way to express one key piece of information: the length or precision of a field.

A flat file record contains a set of fields. Each field has a data type (usually alpha/numeric or numeric) and a length or precision of the field or number.

Before attempting to create my own set of stereotypes I was modelling this by using the table stereotype since this allowed me to describe the length of each field. However my ultimate goal is to create a Code Generation template to output these models to a flat file schema usable by BizTalk. Besides the simple fact that the table/column semantics don't quite jive I don't think it is good practice to overload the code generation of those types (if it's even possible). I would also like to be able to constrain the datatypes used to describe fields, which I don't think is possible if I stick to using tables and columns.

What I would like to know if there is a way to record and display the length of an attribute in a regular class, the way the length of a column is displayed in a table type class. Alternatively, is there a way to create my own type of class similar to the way a table is defined. Tables seem to be more than just a stereotype. They seem to have some underlaying code and tables within EA.

Thanks
Chris

thomaskilian

  • Guest
Re: Attribute length / precision
« Reply #1 on: November 02, 2004, 12:05:33 am »
Hi Chris,
probably this is also not the best, but who knows: you could take attributes, define a datatype string and place the length in the notes. Your code generator should be able to interpret these data in the right way, although the notes field might be a bit fishy  :-/