Learning Goal: I’m working on a mysql question and need a sample draft to help me learn.
You’ve been tasked with designing a database schema for a finance application called “FinTrack” that helps users manage their personal finances, including tracking income, expenses, investments, and budgeting.
Here are the requirements:
User Management:
Users should be able to create accounts on the platform.
For each user, the system needs to store their name, email address, username, password (hashed), and registration date.
Financial Transactions:
Users can log income and expenses.
Each transaction should include a description, amount, date, category (e.g., salary, rent, groceries), and type (income or expense).
Investments:
Users can track their investments, including stocks, bonds, mutual funds, and other assets.
For each investment, they want to store the name, symbol, quantity, purchase price, purchase date, and current market value.
Budgeting:
Users should be able to set up budgets for different categories (e.g., groceries, entertainment, transportation).
Each budget should have a name, category, amount, and duration (e.g., monthly, quarterly).
Bank Accounts:
Users may link their bank accounts for automated transaction import and reconciliation.
For each bank account, they want to store the account name, account number, bank name, and current balance.
Based on the above requirements, design an entity-relationship (ER) diagram or database schema that adequately represents the “FinTrack” application’s data model. Ensure that your schema captures the relationships between entities and includes appropriate primary and foreign keys.
Your Task:
Design an ER diagram OR provide a database schema that meets the specified requirements for the “FinTrack” finance application. Clearly label each entity, attribute, and relationship, and indicate primary and foreign keys where applicable.
Note: This is a database exam question. We need a few representative attributes for each table. Do not spend time listing every single attribute that might be needed for a real application