Databases
What is a database?
What is a database?
A database stores facts a product must not lose: people, orders, lessons, scores. A spreadsheet is a list you edit. A database is that list with rules, so two people cannot quietly create two different versions of the same fact.
Beginners should name the things first. One student has many results. One order has many items. Those sentences become tables. The software, whether SQLite or a hosted service, is how you keep the sentences true.
What is SQL, and which database should I learn?
SQL is the language used to ask a relational database a question: show the unpaid orders, or the students in one class. You write the question. The database returns the rows. You do not need SQL on day one if you are still naming the things the product must remember.
SQLite is the usual first install. It is one file on your computer, and it is enough to practice tables. PostgreSQL is the usual next step when a website has many visitors and the data must live on a server. A spreadsheet is still the right tool for a short list one person edits. Do not start by picking a famous brand.
What to store, and what to leave out
Store the facts you will look up again. Do not collect personal data you have no use for. Passwords are never stored as plain text. Practice on fake rows before you import anyone real.
Privacy rules differ by country. The habit does not: collect less, limit who can open the file, and do not publish a demo full of real names. Back up the file before you experiment.
Frequently asked questions
Is Excel a database?
It can hold a list. It becomes painful when many people edit it or the same fact is copied into many rows. That is when a database helps.
What is a row?
One item, such as one student or one order. Columns are the facts about that item.
What is a relationship?
A link between things, such as which orders belong to which customer. The link is usually an ID, not a copied name.
Which database should I learn first?
SQLite is enough on your own computer. The names of the things matter more than the brand.
Can a website work without a database?
Yes, if the pages do not remember visitors or records. A contact form that only sends email does not need one.
What is SQL?
The language for asking a relational database for rows, such as every unpaid order. Learn the tables first. SQL is how you question them.
Should I learn MySQL or PostgreSQL?
Either can run a real app. PostgreSQL is a common beginner server database. SQLite is easier for practice on your own computer. The table design transfers.
Continue
How to design a database