I am developing a simple portfolio management system for financial advisors. The central table here is a & # 39; tb_account & # 39; table containing the various accounts managed by a consultant. I create a random unique account number and save it in the field & # 39; accountno & # 39; in the tb_account table. The field is also the primary key for the table. Now there are other tables in which further information about the account (a.k.a. Portfolio) is stored. All these tables are stored by & # 39; accountno & # 39; controlled.
The question I have is whether to store "accountno" only in the tb_account table and create a unique index for it and use the replacement primary key from the table, an "id", in all other tables.
I have pictures of both designs here. Please let me know which way I can go. The pros and cons of both will also help. I tend to the latter because I use the field & # 39; accountno & # 39; completely hide tb_account for all tables except the main table. But such a design will be an obstacle if I opt for the "micro-services" route, where table-joining relationships are not or even impossible.