ER Diagram “CashSales ERD”
data_management
Here is the schema for the Cash Sales system.
Target Server:
access_97
View Type:
physicalView
Note1:
Simply stores the summary info. Note: customer's requirements were simply to store summary info to start (no sales by product info).
Note2:
If you can use the ".mdb" file (as most Windows and Office users can), then follow the instructions in the demoguide.html file to set up the ODBC:JDBC Driver.
Note2:
If you cannot use the ".mdb" file (ODBC-JDBC) supplied with this example, you can create the database from this ERD (Tools | Generate | DDL...) using the database you have installed (provided data types match). You will need to edit the DMServer file to change the database driver and loading of the database itself. See demoguide.html for more details.
Diagram Node Summary
Entity: Stores the summary info for each sale.
Entity: This is used to store the "next key" for each table.
Entity
Entity
Diagram Node Detail
Entity "CashSaleHistory"
Stores the summary info for each sale.
Primary Key Name:
PK_CashSaleHistory
Physical Name:
CashSaleHistory
All Outgoing Links
Note Link
to Note Note1
Attributes
ID
Physical Name:
ID
Primary Key
NOT NULL
Unique
Logical Type:
INTEGER
Physical Type:
INTEGER
Size:
10
Physical Declaration:
ID:INTEGER NOT NULL

Time
Physical Name:
SaleTime
Logical Type:
TIMESTAMP
Physical Type:
DATETIME
Size:
9
Physical Declaration:
SaleTime:DATETIME

Subtotal
Physical Name:
Subtotal
Logical Type:
NUMERIC
Physical Type:
CURRENCY
Size:
9
Physical Declaration:
Subtotal:CURRENCY

Tax
Physical Name:
Tax
Logical Type:
NUMERIC
Physical Type:
CURRENCY
Size:
9
Physical Declaration:
Tax:CURRENCY

Entity "KeyTable"
This is used to store the "next key" for each table.
Primary Key Name:
PK_KeyTable
Physical Name:
KeyTable
Attributes
ColumnName
Physical Name:
ColumnName
Logical Type:
VARCHAR
Physical Type:
VARCHAR
Size:
25
Physical Declaration:
ColumnName:VARCHAR(25)

TableName
Physical Name:
TableName
Logical Type:
VARCHAR
Physical Type:
VARCHAR
Size:
25
Physical Declaration:
TableName:VARCHAR(25)

NextAvailableKey
Physical Name:
NextAvailableKey
Logical Type:
INTEGER
Physical Type:
INTEGER
Size:
10
Physical Declaration:
NextAvailableKey:INTEGER

Entity "ProductDesc"
Primary Key Name:
PK_Entity1
Physical Name:
ProductDesc
Attributes
item_Number
Physical Name:
item_Number
Primary Key
NOT NULL
Unique
Logical Type:
VARCHAR
Physical Type:
VARCHAR
Size:
50
Physical Declaration:
item_Number:VARCHAR(50) NOT NULL

price
Physical Name:
price
Logical Type:
NUMERIC
Physical Type:
CURRENCY
Size:
9
Physical Declaration:
price:CURRENCY

name
Physical Name:
name
Logical Type:
VARCHAR
Physical Type:
VARCHAR
Size:
125
Physical Declaration:
name:VARCHAR(125)

description
Physical Name:
description
Logical Type:
VARCHAR
Physical Type:
VARCHAR
Size:
255
Physical Declaration:
description:VARCHAR(255)

default_Price
Physical Name:
default_Price
Logical Type:
NUMERIC
Physical Type:
CURRENCY
Size:
9
Physical Declaration:
default_Price:CURRENCY

Entity "ProductPrice"
Primary Key Name:
PK_ProductPrice
Physical Name:
ProductPrice
All Outgoing Links
Non-Identifying Relationship
to Entity ProductDesc
Verb Phrase:
opt. prices
Physical Name:
opt_ prices
Cardinality:
Zero or More
Attributes
id
Physical Name:
id
Primary Key
NOT NULL
Unique
Logical Type:
INTEGER
Physical Type:
INTEGER
Size:
10
Physical Declaration:
id:INTEGER NOT NULL

valid_Starting
Physical Name:
valid_Starting
Logical Type:
TIMESTAMP
Physical Type:
DATETIME
Size:
9
Physical Declaration:
valid_Starting:DATETIME

not_Valid_After
Physical Name:
not_Valid_After
Logical Type:
TIMESTAMP
Physical Type:
DATETIME
Size:
9
Physical Declaration:
not_Valid_After:DATETIME

price
Physical Name:
price
Logical Type:
NUMERIC
Physical Type:
CURRENCY
Size:
9
Physical Declaration:
price:CURRENCY

price_Qty
Physical Name:
price_Qty
Logical Type:
INTEGER
Physical Type:
INTEGER
Size:
10
Physical Declaration:
price_Qty:INTEGER

price_UOM
Physical Name:
price_UOM
Logical Type:
INTEGER
Physical Type:
INTEGER
Size:
10
Physical Declaration:
price_UOM:INTEGER

status
Physical Name:
status
Logical Type:
INTEGER
Physical Type:
INTEGER
Size:
10
Physical Declaration:
status:INTEGER

item_Number
Physical Name:
item_Number
NOT NULL
Logical Type:
VARCHAR
Physical Type:
VARCHAR
Size:
50
Physical Declaration:
item_Number:VARCHAR(50) NOT NULL
Is foreign key
Referenced Attribute:
Referenced Entity: