Working with databases
Okay, let's be honest: if you're going to seriously use databases in the CalculationLaboratory, forget about "everything will work by itself." We need order here.
It all starts with the setting — and this setting is really important. Without it, you won't open an external database from a script, connect to the right file, or extract the necessary data.
It's simple: no settings, no access.
Are you going to the "Service ? Databases". If you want to add a new one, click "Add database/file". If you want to change the old one, "Edit" it.
You enter the identifier, which is a short name that you will use later. It is used in the script, in the function opendb. Not a step without him.
Then you will be shown two scenarios. The first is that you work with an external database: SQL Server, SQLite, whatever.
You configure the connection via "Configure". Everything is standard: the connection string, login, password, and go ahead.
Second, do you want CalculationLaboratory to drag all the data inside its sandbox by itself? Then choose the option "internal database".
What he does is connect to an external network and copy everything to himself. After that, no external source is needed.
It's good for offline scenarios or if you're afraid that the base will fall somewhere.
If you want to start with a clean slate, check the box "Create an empty database". Ready.
Well, security is the same as without it. If necessary, put a password, mark what to protect (access? scripts? all at once?) — and CalculationLaboratory will hide everything unnecessary.
Peace of mind is assured. Passwords, by the way, are encrypted. No tricks.
Now for a bit of pragmatics. You might ask, "Well, why would I read that?"
I answer: working with a database is not just about "where the data is stored". It's about everything. Seriously:
CRM systems? Customer information, order history, requests, and segmentation live there — solid databases.
Warehouses and logistics? If you want to know where the goods are, how much is left, and how to deliver them faster, here it is, the database rules.
Finances? Every payment, every invoice, every credit score — these are all tables and transactions.
Medicine? Electronic patient records, tests, appointments — again, databases. And very sensitive ones.
Studying? From grades to schedules, the educational platform simply won't take off without databases.
Social media? Storing profiles, feeds, recommendations — guess where it all boils down?
Science and big date? Astronomical observations, genomes, and experimental results are all in databases, and not just anywhere, but in terabytes.
Online shopping? Product descriptions, orders, baskets, recommendation systems — not a single button works without a database.
Government agencies? Registries, citizen registration, and statistics have all been figures and tables for a long time.
And now here's what's important. When you have an adequate database setup in the CalculationLaboratory at hand, you don't need to "invent a bicycle".
Everything is connected, everything is working, you write a script — the database itself gives you what you need. Quickly. Reliable. No dancing with a tambourine.
So databases are not just "textbook technology." It's like Wi-Fi: you don't think about it while it's working, but if it's not there, you start thinking very quickly.
Do it normally once, and then everything will be in its place.