5
What is the best way to design a database for a web system, for example, this system is for doctors, and every doctor has his or her schedule, patients, cashier, etc. What would be better:
- A single database where the records of all physicians are stored in the same tables (schedule table, patients, box); or;
Every doctor have his database, and everything would be separate, each with its schedule, patients, cashier, etc;.
I know there are powders and cons, I believe that the best way would be the first, for the sake of maintenance. But thinking about the performance, and imagining that on an agenda table with all the doctors doing CRUD on the same table, what would be the performance of that? I would like to know by arguments how best to design this database. And why.
It may be a very simple question for many, but I don’t have much experience in this area.
To opt for form 2 you have to see what rate your tables are populated. The rate does not seem to be very large, the bank is usually able to handle tables of the order of hundreds of thousands or even millions of records without major problems (provided that the volume of data brought in the queries is not absurd). Form 1.
– Piovezan
@Piovezan even in billions you will go from 30 to 32 searches, if much. Actually the worst-case scenario, and very rare, is to go from 1 to 3, because it triples (but tripling over so little search doesn’t matter), what I quoted gives 5% loss.
– Maniero