Comment on How does this pic show that Elon Musk doesnt know SQL?
aesthelete@lemmy.world 6 days agoSSNs being duplicated would be entirely expected depending upon the table’s purpose. There are many forms of normalization in database tables.
Comment on How does this pic show that Elon Musk doesnt know SQL?
aesthelete@lemmy.world 6 days agoSSNs being duplicated would be entirely expected depending upon the table’s purpose. There are many forms of normalization in database tables.
DahGangalang@infosec.pub 5 days ago
I don’t think I get what this means. As you describe it, that reference id sounds comparable to a pointer, and so there should be a quick look up when you need to de-reference it, but that hardly seems like a “dependency knot”?
I feel like this is showing my own ignorance on the back end if databasing. Can you point me to references that explain this better?
aesthelete@lemmy.world 5 days ago
I’m talking about a SQL join. It’s essentially combining two tables into one set of query results and there are a number of different ways to do it.
www.w3schools.com/sql/sql_join.asp
Some joins are fast and some can be slow. It depends on a variety of different factors. But making every query require multiple joins to produce anything of use is usually pretty disastrous in real-life scenarios. That’s why one of the basics of schema design is that you usually normalize to what’s called third normal form for transactional tables, but reporting schemas are often even less normalized because that allows you to quickly put together reporting queries that don’t immediately run the database into the ground.
DB normalization and normal forms are practically a known science, but practitioners (and sometimes DBAs) often have no clue that this stuff is relatively settled and sometimes even use a completely wrong normal form for what their doing.
In most software (setting aside well-written open source) the schema was put together by someone who didn’t even understand what normal form they were targeting or why they would target it. So the schema for one application will often be at varying forms of normalization, and schemas across different applications almost necessarily will have different normal forms within them even if they’re properly designed.