[PROJECT NAME]
Database Model
Date [April 12, 2010]
Version [1.1]
Status [Approved]
Author [Nguyen Hoang Son, BA]
Reviewed by [Le Phi Hung, Project Manager]
Approved by [Nguyen Thi Thanh Thuy, Director]
Smart World Technology Co. ltd.
Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam
Phone: 84-8-6674 9024 Fax: 84-8-6258 4459 Website: www.smartworld.com.vn
1
Revision History
Date Version Description Author
< May 28> <1.0> <Create> < Le Minh Vuong >
< June 8> <1.1> <Update > < Le Minh Vuong >
Smart World Technology Co. ltd.
Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam
Phone: 84-8-6674 9024 Fax: 84-8-6258 4459 Website: www.smartworld.com.vn
2
1 Introduction
1.1 Purpose
[A description of the persistent data storage perspective of the system.
This view is OPTIONAL if there is little or no persistent data, or the translation between the Design Model
and the Data Model is trivial.]
1.2 Scope
<Provide a short description of the software being specified and its purpose, including relevant benefits,
objectives, and goals. Relate the software to corporate goals or business strategies. If a separate vision
and scope document is available, refer to it rather than duplicating its contents here. An SRS that
specifies the next release of an evolving product should contain its own scope statement as a subset of
the long-term strategic product vision.>
1.3 Definitions, Acronyms and Abbreviations
No Term Description
1.4 References
<List any other documents or Web addresses to which this SRS refers. These may include user interface
style guides, contracts, standards, system requirements specifications, use case documents, or a vision
and scope document. Provide enough information so that the reader could access a copy of each
reference, including title, author, version number, date, and source or location.>
1.5 Overview
Smart World Technology Co. ltd.
Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam
Phone: 84-8-6674 9024 Fax: 84-8-6258 4459 Website: www.smartworld.com.vn
3
2 Data Model Detail
This document provides an overview of the data model. For simpler and more focused reports, simply
copy this initial template and turn off the sections not required.
2.1 Data model
Type: Package
Package: Implementation Model (PSM)
Detail: Created on 5/11/2005. Last modified on 10/15/2008.
Notes:
DDL
Created By: btxuanngan on 5/11/2005
Last Modified: 4/23/2007, Version:1.0
Smart World Technology Co. ltd.
Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam
Phone: 84-8-6674 9024 Fax: 84-8-6258 4459 Website: www.smartworld.com.vn
4
class DDL
Account
«column»
*PK accountID: Integer
bi llingAddress: String
FK orderID: Integer
FK shoppi ngBasketID: Integer
closed: Boolean
deliveryAddress: String
emailAddress: String
name: String
«FK»
+ FK_Account_Order(Integer)
+ FK_Account_ShoppingBasket(Integer)
«P
+ PK_Account(Integer)
LineItem
«column»
*PK lineItem ID: Integer
quantity: Integer
FK stockItemID: Integer
«FK»
+ FK_LineItem_StockItem(Integer)
«P
+ PK_Li neItem(Integer)
Order
«colum n»
date: Date
FK lineItemID: Integer
*PK orderID: Integer
FK orderStatusID: Integer
deliveryInstructions: String
orderNumber: String
«FK»
+ FK_Order_LineItem(Integer)
+ FK_Order_OrderStatus(Integer)
«P
+ PK_Order(Integer)
ShoppingBasket
«column»
FK lineItemID: Integer
*PK shoppi ngBasketID: Integer
shoppi ngBasketNumber: String
«FK»
+ FK_ShoppingBasket_LineItem(Integer)
«P
+ PK_ShoppingBasket(Integer)
StockItem
«column»
Author: string
*PK stockItemID: Integer
catalogNumber: string
costPrice: number
li stPrice: number
title: stri ng
«P
+ PK_StockItem(Integer)
Transaction
«column»
FK accountID: Integer
date: Date
FK lineItemID: Integer
*PK transactionID: Integer
orderNumber: String
«FK»
+ FK_Transacti on_Account(Integer)
+ FK_Transacti on_LineItem(Integer)
«P
+ PK_Transaction(Integer)
Data Modeling
Enterprise Architect supports full definition of data modeling using the UML Data Definition Language
(DDL). EA supports data definition for a number of DBMS structures . Below is a data definition for an
Oracle DBMS.
For more information on Data Modeling in EA see:
Data Model ing
+FK_Transaction_LineItem
(li neItemID = lineItemID)
+PK_LineItem
+FK_Transaction_Account
(accountID = accountID)
+PK_Account
+FK_ShoppingBasket_LineItem
(li neItemID = lineItemID)
+PK_LineItem
+FK_Order_LineItem
(li neItemID = l ineItemID)
+PK_LineItem+FK_LineItem_StockItem
(stockItemID = stockItemID)
+PK_StockItem
+FK_Account_ShoppingBasket
(shoppingBasketID = shoppingBasketID)
+PK_ShoppingBasket
+FK_Account_Order
(orderID = orderID)
+PK_Order
Figure: 1
2.1.1 Account
Database: , Stereotype: «table», Package: Data model
Detail: Created on 5/11/2005. Last modified on 11/30/2005.
Notes:
Columns
PK Name Type Not Null Unique Len Prec Scale Init Notes
True accountID Integer True False
False billingAddress String False False
False orderID Integer False False
False shoppingBasketID Integer False False
Smart World Technology Co. ltd.
Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam
Phone: 84-8-6674 9024 Fax: 84-8-6258 4459 Website: www.smartworld.com.vn
5