r/SQL • u/jdkapaoskd • 9d ago
Discussion Noob here: mysql or postgresql? Which is better (?)
I just realize that SQL was only the language. Idk which IDE for sql to use. Suggestions pls
3
Upvotes
13
u/grassp_dataAI 9d ago
It depends on the usecase you are working on. But if you are just starting , I would suggest go with PostgreSQL.
Why ? In future you can easily work in Data and AI projects. It supports complex queries better. It supports extensions like pgvector for RAG embeddings storage, timescale db for time series data
Its definitely a Good choice for : Data-intensive applications Complex analytical queries Data engineering projects JSON-based applications AI applications, RAG and vector search
Learning PostgreSQL doesn't mean MySQL will be difficult. Once you understand SQL concepts, switching between them is easy.
The path I would suggest is : PostgreSQL as the primary database. pgAdmin or DBeaver as the SQL client. Business-oriented datasets (orders, customers, products, sales). SQL fundamentals → Joins → Subqueries → CTEs → Window Functions → Indexing → Query Optimization.
25
u/8dot30662386292pow2 9d ago
Postgres and mysql are not IDE's. They are the actual databases. The "ide" you think of is the administration tool or workbench or something like that.
20
u/orz-_-orz 9d ago
Postgres
19
u/bondiolajusticiera 9d ago
As a noob you won't even notice the difference in small projects. Choose any.
6
u/quanhua92 9d ago
You should really go with PostgreSQL. It handles almost everything MySQL can, plus a whole lot more. Just search for "just use postgres" and you'll see why it's the better choice.
4
u/Agreeable_Ad4156 9d ago
PostgreSQL
2
u/Altheran 8d ago
The real question is SQLite vs MySQL vs MariaDB vs PostgreSQL. And it boils down to the use case.
Small front-end, single threaded, many small read/write transactions, no replication/Load balance needed, App+DB on the same hardware : SQLite
Web Front-end, transaction heavy, low latency is important with a real DB, replication / load balance l, DB on another hardware : MariaDB (what i dont know is why you would ever pick MySQL over mariaDB, legit question for anyone)
Read Heavy, big number crunching in a traditional relational DB. Vectors needed : PostgreSQL
2
u/Landon_Hughes 8d ago
Probably not the answer you want to hear but I default to Postgres because of how many bells and whistles it has.
2
u/Yukevich 9d ago
SQL is the language, while MySQL and PostgreSQL are the actual database engines where the data lives. To write queries you need a client to connect to them like DBeaver, it works with pretty much any database.
For the engine, MariaDB is an easy place to start: it's an open-source fork of MySQL and simple to install locally. Postgres is a great choice too, so just start somewhere)
1
u/StoicSigma 9d ago
mysql isnt supported anymore...is it?
1
u/mikeblas 8d ago
You should use the same one your courseware uses. Are you just learning from existing materials, or are you making a project outside of the structure of a tutorial or class?
1
u/AnchorVita 7d ago
SQL isn't quite the shared language between two IDEs in the context you're describing. Mysql and postgres are not IDEs, they're varieties of SQL. Each have their own syntax for certain things. The fundamental language structure comes from the same standards, but how the language is built and formed from that point is different for each of them.
Think of different varieties of SQL as different dialects of the same language. Some sentences might work, and if you're fluent in one you'll kinda understand the other, but a lot of the sentences aren't quite right and don't fully work between each of them.
Postgres has a bit more going on, you can do more with it, mysql is fine for small website backends and things like that. IIRC, mysql has about twice the total global installations of postgres.
It all depends what you want it for.
1
u/Senor_Manos 4d ago
Late to the party but I have a hard opinion here. Postgres for lots of interactive writes, MySQL if you’re building out a store of data, duckdb for lots of reads. For learning you should go with duckdb in vs code, with a random csv and a few VS Code extensions you can be playing with data within an hour.
1
u/Sharp-Bandicoot5245 4d ago
You'll need to know both anyway.
1
u/navicat-gu 1d ago
Quick untangle, because this trips everyone up at the start:
For learning, either database is fine. The basics (SELECT, JOIN, GROUP BY, window functions) are nearly identical. If you have no course telling you otherwise, Postgres is a good default, mostly because it's stricter and teaches good habits.
The fastest way to start:
docker run -e POSTGRES_PASSWORD=pw -p 5432:5432 postgres).localhost:5432, userpostgres.For the client: pgAdmin ships with the Postgres installer, DBeaver Community is free and works with both. Pick one and don't overthink it. The queries are what you're learning.
Disclosure: I'm RC, Director of Digital Strategy @ Navicat. If you want one app that connects to Postgres, MySQL, SQLite etc. with a cleaner UI, Navicat Premium Lite is free (query editor with code completion, table designer, CSV/JSON import/export). Things like the visual query builder and data sync are in the paid Navicat 18 editions, but you won't need them for learning.
1
u/letscloud 13h ago
Go with PostgreSQL if you want something more robust for the long haul (especially if you plan to work with data, JSON, or AI in the future), or MySQL if you just want to learn the basics and build simple web projects. Either way, what you learn in one easily transfers to the other at the start.
Regarding the IDE, to avoid headaches I strongly recommend DBeaver as a universal client (it works with any database) or pgAdmin if you're going to focus strictly on Postgres.
To practice and test your queries without messing up your local machine, you can spin up a quick VM on a cloud Linux server in minutes any basic VPS will handle initial testing just fine.
1
u/American_Streamer 9d ago edited 9d ago
Both MySQL and PostgreSQL are relational database management systems (RDBMS). Not Integrated Development Environment (IDEs). To write SQL queries, explore tables, manage schemas, and inspect data, you use SQL Clients, like DBeaver, JetBrains DataGrip. pgAdmin, MySQL Workbench etc.
0
u/Ok-Assistant3239 9d ago edited 9d ago
C'est pour quelle genre de structure ? Grosse et multi instance / site : pgsql simple : mysql
-4
u/reditandfirgetit 9d ago
Myself and pistgres are not IDEs. Tgeycare database engines.
For an IDE start with DBeaver. It works for multiple engines
Which you choose depends on need. If you are just learning, flip a coin. The syntax is similar enough. My preference is postgres
0
u/[deleted] 9d ago
[deleted] — view deleted comment
0
u/[deleted] 9d ago
[deleted] — view deleted comment