Just spent a couple of hours with Marko doing a preliminary design of our database. Will look further into it and try to normalise it later on. Marko is meeting up with Rodica tomorrow to discuss about our computer/server arrangements. Most likely we'll be meeting up on Thursday to begin installation and configurations.
Database Design
User
Column Name | Data Type | Constraints |
handle | varchar(10) | Primary Key |
fname | varchar(15) | NOT NULL |
lname | varchar(15) | NOT NULL |
password | varchar(x) | NOT NULL |
dob | date | NOT NULL |
Transaction
Column Name | Data Type | Constraints |
recipient | varchar(10) | Foreign Key |
amount | money | NOT NULL, >= 0 |
receivedate | date | NOT NULL |
source | varchar(20) | NOT NULL |
revenuetype | varchar(30) | NOT NULL |
paymenttype | varchar(10) | NOT NULL |
transacttype | varchar(10) | NOT NULL |
Loan
Column Name | Data Type | Constraints |
debtor | varchar(10) | Foreign Key |
principal | money | NOT NULL, > 0 |
interest | real | NOT NULL, > 0 |
lender | varchar(30) | NOT NULL |
payfrequency | integer | NOT NULL, > 0 |
Tax
Column Name | Data Type | Constraints |
recipient | varchar(10) | Foreign Key |
income | money | NOT NULL |
taxwitheld | money | NOT NULL |
deductions | money | NOT NULL |
carryforwardlosses | money | NOT NULL |
taxableincome | money | NOT NULL |
capitalgains | money | NOT NULL |
Portfolio
Column Name | Data Type | Constraints |
owner | varchar(10) | Foreign Key |
tickersymbol | varchar(5) | NOT NULL |
quantity | integer | NOT NULL |
totalvalue | money | NOT NULL |
company | varchar(30) | NOT NULL |
securitytype | varchar(20) | NOT NULL |
No comments:
Post a Comment