r/SQL • • Apr 01 '26

PostgreSQL Beginner question

0 Upvotes

I am a new learner of sql. I have made a database in postgreSQL in my laptop. Can someone tell me how can I access that database from my office computer without direct login from my account?


r/SQL • • Mar 31 '26

MySQL What job titles do you search for that requires you to use SQL and/or python? What job searching platforms do you use search for these jobs titles on

6 Upvotes

So far the job titles I searched for have been data analyst/data engineer/software engineer/business intelligence analsyst /power BI and so far the platforms I used to search for these titles has been indeed/LinkededIN and my states unemployment website.

Any other suggestions?


r/SQL • • Mar 31 '26

MySQL File Managment

1 Upvotes

Hi, I'm creating a MySQL DB to better manage my files, I was wondering if there is a way to acces the files via MySQLor an app mediating between MySQL and the Fyle Managment System. I am using windows any help or nudge in the right direction would be greatly appreciated thanks in advance


r/SQL • • Mar 30 '26

Discussion I've been stuck on SQL self-joins for 6 months and I'm desperate, what is my mental model missing?

35 Upvotes

I've been struggling with SQL self-joins for about 6 months now and every tutorial I've found has failed me (including AI). They all just slam the query on the screen, run it, and the video ends. Nobody actually explains the mechanics. I already feel stupid enough so please be patient with me.

What I do understand:

  • Self-joins are used for tree/hierarchical structures (like employee-manager)
  • Reversing the ON condition in a normal join (two different tables) doesn't break anything because the table names keep the roles honest
  • In a self-join, reversing the ON condition gives silently wrong results, the query runs fine, but the data is flipped

The classic table everyone uses:

emp_id  name  manager_id
1  Alice  NULL
2  Bob  1
3  Carol  1
4  Dave  2

Query A -- correct:

SELECT e.name AS employee, m.name AS manager
FROM employees e
JOIN employees m ON e.manager_id = m.emp_id

Query B -- reversed, silently wrong:

sqlSELECT e.name AS employee, m.name AS manager
FROM employees e
JOIN employees m ON m.manager_id = e.emp_id

What I've tried to understand:

I know that the ON clause is just a filter over all 16 possible row pairs (4×4). I can manually trace every pair and check which ones survive. That works I always get the right answer when I do it on paper. But I cannot keep drawing 16 rows by hand every time I write a query.

People keep telling me things like:

  • "a manager has many employees but an employee has one manager" -- okay but how does that translate to which side of the = sign each column goes on?
  • "think about the direction of the relationship" -- I stop and think, a manager IS also an employee in this table, so what does direction even mean?
  • "the alias that holds the foreign key is the child" -- I understand foreign keys in normal joins but in a self-referencing table both aliases point to the same table so this still feels circular to me

I'm not looking for an analogy. I want the actual logic. What is everyone else seeing that I'm not?

Left-self join

r/SQL • • Mar 30 '26

PostgreSQL Working on PostgreSQL support in Tabularis just got a big upgrade

Post image
0 Upvotes

Hi guys,

I’m working on Tabularis, an open-source database client built with Rust + React.

https://github.com/debba/tabularis

The goal is to create a fast, lightweight and extensible alternative to traditional database GUIs.

In the latest release we switched the PostgreSQL driver to tokio-postgres, which looks giving better performance than old implementation with SQLX under heavy workloads.

On top of that:

• Better JSON handling with a new inline JSON editor

• Improved type mapping for PostgreSQL specific types

• More responsive query execution

• AI-assisted JSON editing powered by MiniMax

The goal is simple: make working with PostgreSQL feel fast and frictionless, especially when dealing with JSON-heavy schemas.

Still early, but the async driver + improved JSON UX already makes a huge difference.

Curious to hear:What’s your biggest pain when working with PostgreSQL JSON columns?


r/SQL • • Mar 29 '26

Discussion Curious what it's like to extract data from Vibe-Coded applications?

17 Upvotes

Data quality for applications has already fallen off a cliff in the past decade or two as we've moved away from proper normalized backend SQL databases powering applications to under-structured JSON sludge being ubiquitous especially for cloud apps, but I'm very curious what data quality and data backends look like in the era of vibe-coded applications? Has anyone had to build a pipeline into a data warehouse or other ETL setup from a vibe-coded application? What does the data quality and interpretability look like?

I have a hypothesis that the job impacts to the Data Analytics and Data Engineering fields resulting from AI automation of folks' daily tasks will be offset by a further dip in data quality we'll see from vibe-coded applications necessitating more headcount to clean up the mess they create on the data side in order to build proper reporting and analytics, but I want to gather some real life data from professionals who may have experience with this to see if I'm right or missing the mark!

Thank you for contribution to human knowledge, and now if someone asks this question in the future, LLMs can refer to this post potentially.


r/SQL • • Mar 30 '26

Discussion Have you seen a setup like this in real life? 👻

Thumbnail
gallery
0 Upvotes

One password for the whole team. Easy to set up. 😅

What could possibly go wrong?
Have you seen a setup like this in real life? 👻


r/SQL • • Mar 29 '26

PostgreSQL Daily SQL Server to PostGRE Synchronization

2 Upvotes

Looking for recommendations for performing once-daily replication (or synchronization) between an SQL Server (source) and Postgres (sink). The intent is to simply ensure that when a user performs a query or refresh for Postgres data, which is feeding a dashboard, the data is an accurate representation of the data in the SQL Server. This is all taking place on Windows Server 2022.

I found this reddit thread below on performing a similar activity using Debezium, but it is unclear to me if Kakfa is actually required (I'm currently not using Kafka). So my general question is, would Debezium still be the appropriate tool for completing this? Or is the once-daily requirement pointing towards a simpler solution such as a Python script that is run using Task scheduler?

https://www.reddit.com/r/PostgreSQL/comments/1hvff8t/mssql_to_postgre_replication/

https://github.com/debezium/debezium


r/SQL • • Mar 30 '26

SQL Server Technical Interview for a Database class

0 Upvotes

So I am in a bit of a pickle. I have a technical SQL interview for a database class I am taking. It is an online asynchronous course with the professor publishing videos on subject matter. I will be honest, I barely watched the videos and finished all labs and assignments utilizing A.I prompting and generative A.I effectively. However, I have a technical Interview for this class. I know I am not particularly in the right as I have to learn the content but nonetheless I’m not here to argue the morality of that. My question is, What advice do you guys have for the technical interview. It is also in about 2 weeks. If necessary I

can no life studying interview questions and become proficient for that. Just need advice. Thank you


r/SQL • • Mar 29 '26

Discussion Fully local SQL Canvas using DuckDB

7 Upvotes

Hi, I have been working on a local-first data canvas as a side project for over a year now:

There is an infinite canvas where each SQL query is a node that can reference other nodes using FROM node_employees() . It will then get refreshed automatically if its parent changes.

You can try it out here: https://app.dash.builders/. It either runs 100% locally in the browser via DuckDB-WASM, or as a DuckDB community extension, so you can query the nodes even from Python. Happy to get some feedback :)


r/SQL • • Mar 28 '26

MySQL What type of SQL skills do you use as a professional data engineering(or any role where you heavily use SQL skills) everyday? Were there new sql skills you learned on the job(like Subqueries, windowing and CTEs?)

29 Upvotes

I really like to know more insight into how advanced my SQL skillls have to be for the average professional data engineer?


r/SQL • • Mar 28 '26

Discussion Primary Key vs Primary Index (and Unique Constraint vs Unique Index). confused

9 Upvotes

Hey everyone,

I’m trying to properly understand this and I think I might be mixing concepts.

From what I understood:

  • A primary index is just an index, so it helps with faster lookups (like O(log n) with B-tree).
  • A primary key is a constraint, it ensures uniqueness and not null.

But then I read that when you create a primary key, the database automatically creates a primary index under the hood.

So now I’m confused:

  • Are primary key and primary index actually different things, or just two sides of the same implementation?
  • Does every database always create an index for a primary key?
  • When should you explicitly create a unique index instead of a unique constraint?

Thank you!


r/SQL • • Mar 28 '26

Discussion what is your job role? do you spend more time reading or writing sql code?

0 Upvotes

let me know