I am in the process of designing a simple portfolio management system for financial advisors. The central table here is an 'tb_account' table that holds the various accounts an advisor manages. I create a random unique account number and store it in the 'accountno' field in the table tb_account. The field is also the primary key for the table. Now there are other tables where more information about the account (a.k.a. portfolio) is stored. All these tables are driven by 'accountno'.
The question I have is, should I store 'accountno' only in tb_account table and create a unique index on it and use the surrogate primary key from the table, an 'id', in all the other tables?
I have images of both the designs here. Please let me know which is the route I can go? The pros and cons of both will also help. I am leaning toward the latter, as I can completely hide the 'accountno' field from all the tables, except the main tb_account table. But, will such a design be a hindrance if and when I choose to go the 'micro-services' route wherein joins across tables are discouraged or may even be impossible.
