Entities to a PDM

Previous  Index  Next  How To Use

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):

 

CREATE TABLE ONLINECUSTOMER 

(

  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,

  CREDITCARDEXPIRYDATE                 DATE         NOT NULL,

 CONSTRAINT PK_ONLINECUSTOMER PRIMARY KEY (ONLINECUSTOMERID)

);

 

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