Data Modeling

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

ENTITY RELATIONSHIP DIAGRAMS:

An Entity Relationship Diagram is a graphical model of the information system that


depicts the relationship among system entities.

DEFINITIONS:

1. Entity: An entity is a person, place, thing, or event for which data is collected and
maintained. The entities in our system are:
a. Stocks: This entity represents the stocks that are being sold or purchased.
Some of the attributes of this entity are:
i. Name: Name of the stock company.
ii. Stock Price: The price at which the stock is sold or
Stocks
purchased.
iii. Change Amount: The amount of change in the price of the
stock as compared to its price on the previous business day.
iv. Percentage Change: The percentage change in the price of
the stock as compared to its price on the previous business
day.
b. Invoices: This entity represents each transaction made by the registered
users for the sale or purchase of a particular stock. Some of the attributes
of this entity are:
i. Order Number: It helps to keep track of the various transactions
made during the day. It is a unique number provided by the
database for each transaction made.
ii. Stock Name: It specifies the name of the stock company of
which the transaction was made.
Invoices
iii. Seller ID Number: It specifies the ID number of the user on
whose behalf the stocks were sold.
iv. Buyer ID Number: It specifies the ID number of the user who
purchased the stocks.
v. Quantity: It specifies the number of stocks that were sold or
purchased during the particular transaction.
vi. Price Sold At: It specifies the amount (in US $) at which the
particular transaction was carried out.
vii. Amount Due: This specifies the total amount (in US $) that was
generated from the transaction.
c. Member Users: This entity represents the registered member users who
indulge in trading of stocks. Some of the attributes of this entity are:
i. ID Number: It specifies a unique number for each member user.
ii. User Name: It specifies a unique user ID for each member user
that is used by the member users to log in to our system to view
Member their stock status and other stock analysis’s.
User
s iii. First Name: It specifies the first name of the member user.
iv. Last Name: It specifies the last name of the member user.
v. Stock Purchased: It specifies the stocks that have been purchased
by the member user.
vi. Stock Sold: It specifies the stocks that have been sold by the
member user.
vii. Profit: It specifies the total amount (in US $) of profit or loss
made by the member user thus far.

2. Relationship: A relationship is a named business association between two


entities. The relationship is represented as a line between entities; its name is
written in lower-case letters. The main relationships defined in our system are:
a. Invoice - Stock Relationship: This is the relationship between our
entities Invoices and Stocks. The relationship is defined as “One or many
Invoices contain information on one Stock sold or purchased”.
b. Stocks – Member Users Relationship: This is the relationship between
our entities Stocks and Member Users. The relationship is defined as
“One or many Member Users have one or many Stocks”.
c. Member Users – Invoices Relationship: This is the relationship between
our entities Member Users and the Invoices. The relationship is defined
as “One Member User can have one or many Invoices”.
3. Cardinality: It describes how instances of one entity relate to instances of
another entity. The various relationship cardinalities defined in our system are as
follows:
a. One Invoice contains information about one or many Stocks sold or
purchased.
b. One or many Member Users have one or many Stocks.
c. One Member User places one or many Invoices.
Visible Systems Corporation EDUCATIONAL/TRAINING Version

Global Entity Relationship Diagram

Stocks contains information about stocks


Invoices
sold/purchased

Member
has Users
places

You might also like