How to Architecture Database- companies & list of investors

Hello Bubblers,

Need some help structuring the database of a product which consists of entities (companies) & list of investors in those entities.

Sum of stakes of all investors in any one entity would be always 100%.

I created 2 data types- companies & investors with various attributes.

How should we design the database to show-

  1. list of users/investors in any company with sum 100% stakes. Stakes of individual investors should be identifiable in the given company.

  2. list of companies in which an investor has invested with stakes %.

Also users/investors can signup and create entities/companies while also invest in other entities/companies. So i started with the data type user and saved all fields of a user-name, email, phone, location etc and created another data type company with fields-name, location, total stake%, total capital etc.

Where should stake% field be added and how to save the data?

Would be grateful for any help on this.

If I were in your position, I’ll create another type stake with fields : user(type user), company(type company) and stake%(type number).

Tried that.

Works like charm


1 Like