Entities to a PDM

Previous  Top  Next

When you generate a PDM from a CDM, Entities will be turned into Tables, each entity will result in a new table.


Required attributes will become columns with an attribute of NOT NULL, meaning that the DBMS doesn't accept a "no value" entry for this column.


Attributes that are marked as "Identifier" will become part of the table Primary Key Constraint, being the primary identifier of table data.


Here's an example:


Entity "OnlineCustomer" with attributes


This will generate the following table (InterBase syntax):




  ONLINECUSTOMERID                  INTEGER         NOT NULL,

  "NAME"                            VARCHAR(    30) NOT NULL,

  ADDRESS1                          VARCHAR(    80) NOT NULL,

  ADDRESS2                          VARCHAR(    80),

  REGION                            VARCHAR(    45),

  CITY                              VARCHAR(    45) NOT NULL,

  ZIP                               VARCHAR(     6) NOT NULL,

  PHONE                             VARCHAR(    20),

  CREDITCARDNR                      VARCHAR(    20) NOT NULL,





By default, the table will have the same attributes as the entity, but this could change due to the any relationships from or to this relation.


Next: Relationships to a PDM