Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/DesignDocs/340192

< EclipseLink‎ | DesignDocs
Revision as of 13:40, 16 March 2011 by Unnamed Poltroon (Talk) (New page: == Overview == Schema is designed to include preallocated columns that can be used to map additional data. In this example, Customer table might look like this: * CUSTOMER ** INTEGER ID...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

Schema is designed to include preallocated columns that can be used to map additional data. In this example, Customer table might look like this:

  • CUSTOMER
    • INTEGER ID
    • VARCHAR NAME
    • VARCHAR FLEX_COL1
    • VARCHAR FLEX_COL2
    • VARCHAR FLEX_CO31

An arbitrary number of the columns prefixed with "FLEX_COL" could be defined. A user mapping the "address" property of Customer could simply map it to FLEX_COL1.

In order to support multiple data types, all flex-columns are defined as strings. Metadata about the expected type of the field is defined in the database. For each flex column, there is a set of entries in a database table. The table and column names storing these items could be Application provider determined and therefore they could all exist on the same table or they could exist on different tables.

  • Label (e.g. address)
  • Type (e.g. java.lang.String)

For instance, for the above example, an Application Provider might choose to define a single table containing the columns

  • CUSTOMER_METADATA
    • FLEX_COL1_LABEL
    • FLEX_COL1_TYPE
    • FLEX_COL2_LABEL
    • FLEX_COL2_TYPE
    • FLEX_COL3_LABEL
    • FLEX_COL3_TYPE

Alternatively, they might choose two define 3 tables

  • CUSTOMER_COL1_METADATA
    • FLEX_COL_LABEL
    • FLEX_COL_TYPE
  • CUSTOMER_COL2METADATA
    • FLEX_COL_LABEL
    • FLEX_COL_TYPE
  • CUSTOMER_COL3METADATA
    • FLEX_COL_LABEL
    • FLEX_COL_TYPE

Initially these tables would be quite sparse, but with the addition of Multi-tenant features they would become better populated

Back to the top