So, I have this project that will be serving several independent businesses , it is web based and its intended to serve small businesses in accounting. in my opinion maintaining a single database and attaching a unique identifier for each business might be an overkill to the database while searching for records, am thinking of implementing a single database that will track users and their linked database info, so that each user will be mapped to their owns' database.
So, if the system will end up having 'n' users, it will have 'n+1' databases__\_ where the '+1' is the main database instead of having one database for all the businesses('x1n__b_\' where 'x\_' is the unique identifier for each business, '1n' is the tracking registration number and b is the business name that will be embedded on each record for query purposes__). What is the best way to implement such? Is the 'n+1' or the 'x1n__b_'
Depending on which RDBMS you are using, you might explore using schemas. Schemas offer the ability to logically separate database objects while still using the same database instance.
For Postgres, see postgresql.org/docs/8.1/static/ddl-schemas.html
Are you trying to therefore create a General Ledger , that will enable small businesses to do their accounting online.
First step is to check how existing accounting softwares are 'modelled'. There are industry standards for UML / Entity Relationship Modelling which are implemented from the ground up by the Enterprise Companies like Oracle and SAP.
Research the Data Model for Oracle Financials , which should be based on the Industry Standard.
I am creating a Retail Tech solution from the ground up, and i am using the published ARTS data model from OMG as the data model,which is the industry standard for retail tech solutions including Oracle.
Of course its a long road ahead, as the data model is ginormous,but i start by focussing on the core concepts in ER modelling, working up to the actual database schema.
This is a nuance / feature of your solution and you can plan better in a bottom up manner, rather than the top down way that you are using to design your accounting solution.
The point from an enterprise perspective is that its the Business Need that drives the innovation , the technology, and the implementation, not the other way around.
To offer an on-demand Accounting Solution online to multiple customers, you have to check how existing solutions like SalesForce is built, and once you have a general understanding of the same, you can think of improvements / modifications.