|
Eddy Vluggen wrote: Math. NoMATH (for clarity, Not Only Math)
Actually, that math was failing with big enough datasets, which is why NoSQL was (re-)invented.
So the right way to do things went from "normalize everything" to "denormalize a good bunch."
We've seen the opposite happen to peanut butter.
|
|
|
|
|
I find No SQL kind of funny as it is one of those cyclic patterns.
In the same vein with centralized versus distributed.
|
|
|
|
|
Before SQL, which didn't become popular until the 80's, there was only not SQL
|
|
|
|
|
But don't forget what Edsger Dijstra once said: If you say the same thing twice, you will contradict yourself.
|
|
|
|
|
Not if you say it properly. *hides*
Real programmers use butterflies
|
|
|
|
|
When you're talking about redundant storage, are you referring to data aggregated from single points of origin or an uncontrolled mess?
|
|
|
|
|
Why not both?
But seriously, what starts out as the first sometimes turns into the latter
Mostly the first though
|
|
|
|
|
And some redundancy is not really redundant, it is the historical context that needs to be saved.
The invoice earlier is a good example.
If the company changes its name or moves it’s HQ, you do not want the invoice to update.
The best part is when there are M/A and divestitures among your client base.
At a high enough altitude, it looks like a game of Life cellular generational display.
|
|
|
|
|
Sander Rossel wrote: In the age of microservices every service needs to have the data it needs to do its thing. Good point, those use a smaller dataset.
Sander Rossel wrote: So I now even have multiple databases with the same data because multiple services operate on that data. Operating implies you doin' more than reading that data.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Operating implies you doin' more than reading that data. It's mostly reading and transforming.
Not like, changing the data and then posting it back to its origin or something like that, that would be chaos.
|
|
|
|
|
What if my databases are abnormal?
|
|
|
|
|
So it WAS YOU!
You are the reason I've made more money migrating away from nightmare data than writing new code.
Real programmers use butterflies
|
|
|
|
|
Your database, not mine. Do as you like
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Is your name Marty Feldman?
|
|
|
|
|
Usually, and usually just down to 3NF, but with "an eye" to avoid going too far or going that step further.
But very rarely these days do I get to do that sort of stuff - I'm stuck with what was someone else's idea of Good Database Structure. We disagree on what that looks like.
|
|
|
|
|
CHill60 wrote: I'm stuck with what was someone else's idea of Good Database Structure That's why we normalize.
One of my "betters" once introduced a table that held a varchar(31) with 0's and 1's. Representing booleans. Queries where horrid and slow.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: ntroduced a table that held a varchar(31) with 0's and 1's.
I had a colleague who used 1s and 8s -- because he couldn't get 0s to work correctly.
modified 1-Nov-21 13:57pm.
|
|
|
|
|
This is why fights start in the office.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I would if I could.
In fact, I do as much as I can, which is limited and not always beneficial.
But the issue is that my current primary task is simply ETLing data from various sources to our staging database. For that, it's usually best to just leave it as is. But, at times, I do split some data into child tables -- usually if the incoming data has been de-normalized such that a field contains delimited lists of values (yuck).
It really depends on the needs of the next layer of the overall application, which often requires de-normalized data anyway.
On those rare occasions when I create a database for a "proper" application, I normalize as required for the application.
But I don't care about the definitions of the various normal forms; I leave that to the ivory tower types.
|
|
|
|
|
PIEBALDconsult wrote: But I don't care about the definitions of the various normal forms; I leave that to the ivory tower types. They're not under debate in the tower.
The definitions didn't change. It's not C#.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
On the data entry / operational side, always; on the informational / query side, usually the opposite. Storage is cheap; time isn't.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
This about how to store.
No difference in entry or query.
Gerry Schmitz wrote: Storage is cheap; time isn't. Time is not a factor here; this is about being correct. As in, making sure the data you return is correct.
It also not just applies to databases, but is general theory about information. Even applies to some lists, or dictionaries
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Normally I do, yes. But not if I don't feel like it's going to be worth the hassle now vs benefits later.
|
|
|
|
|
How long is a piece of string - requirements would dictate NF compliance.
|
|
|
|
|
I've been coding for database interaction all my adult life - since the late 80s, and I've never heard of normalization so I looked it up and I'm aghast. How can you even use a database that isn't normalized? Why would you bother? Help me out here; where are these databases and what uses do people make of them?
|
|
|
|