HACKER Q&A
📣 vicenobelium

What database is best for storing financial statements?


I want to store financial statements (income statement, balance sheet, cash flow) and run comparative operations on those statements. Ex: Find percentage increase in revenue for company A between year 1 and year 5. Find all companies that increased debt over past 5 years.

I'm deciding between SQL or document-oriented db like Mongo (AWS DocumentDB). In SQL I would plan for each company-time period pair to get its own row i.e. company A Q1 2020 is its own row and each column represents an accounting measure, like revenue. SQL seems like it would perform these calculations fast, but NoSql would allow for less structured data (even within GAAP accounting different names are used for similar accounting measures.)

What are the pros and cons of each? Any better solutions than these?


  👤 nick_kline Accepted Answer ✓
Almost every modern database has a combination of relational and also ability to store unstructured information like json fields and search it. SQL Server, mysql, even memsql. As well as mongo and many many others. Decide on your application. How much data do you need, how much query scalability? I'd start with a data model to represent what you want and try out some free db like mysql.

👤 mister_hn
Link without paywall?