Vous êtes sur la page 1sur 4

ER Diagram

Integration_Id

Industry Market Capitalization

Company_name No. of share


Exchangeee

Symbol Purchase Date


Total cost
Cl_Name

Contains name of Contains value of


Cl_Idme Client Company Parameter

EPS
Cl_phone no. Commission

Row_Id
Cl_Id
Portfolio %

Current share value Previous close


Return
Last price
PE Ratio
Table 1: Entity Client
Client
Cl_I
d Cl_Name Cl_phone no.
Id1 XYZ1 ABC1
Id2 XYZ2 ABC2
Id3 XYZ3 ABC3
Id4 XYZ4 ABC4
Id5 XYZ5 ABC5

Primary Key: Cl_Id

Table 2: Entity Company


Company
No. of Last Purchase Previous
Symbol Company_name Industry shares Cl_Id price Date Close Row_Id
x1 ABc1 xyz1 z1 Id1 XYZ1 D1 ABC1 R1
x2 ABc2 xyz2 z2 Id2 XYZ2 D2 ABC2 R2
x3 ABc3 xyz3 z3 Id3 XYZ3 D3 ABC3 R3
x4 ABc4 xyz4 z4 Id4 XYZ4 D4 ABC4 R4
x5 ABc5 xyz5 z5 Id5 XYZ5 D5 ABC5 R5

Primary Key: Company_name


Foreign Key: Cl_Id
Relationship: A client can buy shares of several companies. The relationship between Client and
Company is 1:n.

Table 3: Entity Parameter


Parameter
PE
Market Capitalization Exchange Total cost Commission Portfolio % Return Ratio Integration_Id
x1 ABc1 xyz1 z1 PP1 XYZ1 D1 R1
x2 ABc2 xyz2 z2 PP2 XYZ2 D2 R2
x3 ABc3 xyz3 z3 PP3 XYZ3 D3 R3
x4 ABc4 xyz4 z4 PP4 XYZ4 D4 R4
x5 ABc5 xyz5 z5 PP5 XYZ5 D5 R5

Primary Key: Integration_Id


Relationship: Each company can have only one type of parameter, so its 1:1 relationship.
Entity
 Client
 Company
 Parameter

Attributes
 Cl_Name
 Cl_Id
 Cl_phone no.
 Symbol
 Company_name
 Industry
 No. of share
 Purchase Date
 Cl_Name
 Current share value
 Last price
 Previous close
 Row_Id
 Integration_Id
 Market Capitalization
 Exchange
 Total cost
 Commission
 Portfolio %
 Return
 PE Ratio

ER Diagram Explanation
1. There are three entity in this ER diagram – Client, Company and Parameter
2. Entity “Client” has attributes which contains the information about each client of BJR
Investment. Cl_Id is the primary key of “Client”. The stock portfolio worksheet contains the
name of the clients who have made investment in different companies.
3. Entity “Company” has attributes which contains the information about the company and
company’s stock such as industry, number of share bought by client, purchase date, current
share value etc.. Company_Name is the primary key of “Company” and Cl_Id acts as the foreign
key.
4. Entity “Client” and “Company” are connected through one to many relationship i.e. each client
can buy shares of several companies.
5. Last Price and Previous Close are shown in the dotted oval because these are the derived values
which get updated automatically through internet using MSNStockQuote.
6. Entity “Company” also has Row_id as a attribute. Row_id is used to differentiate the shares of
same company on different dates .
7. Entity “Parameter” has attributes which are calculated through the internal or external factors
i.e. commission, returns, P/E ratio etc..
8. Entity Company and Parameter are joined through one to one relationship.
9. Primary key of the entity Parameter is “Integration_Id”. Integration_Id is same as Row_Id. Both
these attributes are used for matching the shares, and the calculated value with their respective
companies.

Relational representation of the model


 Client(Cl_Id,Cl_Name, Cl_phone no.)
 Company(Company_Name, Cl_Id, Row_Id, Symbol, Industry, No. of share, Purchase Date,
Current Value , Last price, Previous close)
 Parameter(Integration_Id, Market capitalization, Exchange, Commission, Total Cost of the
stocks, Portfolio percentage, Return, P/E Ratio, EPS)

Vous aimerez peut-être aussi