February 2, 2021 at 10:07 pm
Actually the use of "parent" and "child" predates databases, for example with directories. Parent directory and child directory were very commonly used terms.
As to tables, not every referenced table is a child table, so parent and child still add a distinct meaning to the relationship of the tables.
And, yet again, you insist on referencing "pointer chain". The vast majority of people now have never seen nor used a pointer chain for data or related to data. Or do you dispute that last claim?
So, why do we use numerical types rather than char if it's not because of pointer-chain-itis? We use them because it's practical. With a char data type, we must do all the digit checking and, worse, char padding ourselves. That's a real nightmare beyond a rather short number of digits (5 or 6, say). When JSON comes in with a value to match against the table, do I have to pad it to 12 or 16 bytes? Or some other number of chars? What is that database column's length today?? With an int, we just have to compare the value, without worrying about padding any chars.
Also, almost as significantly, we save a lot of storage using ints. A value of 1 billion takes 10 chars but only 4 int bytes.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing post 16 (of 15 total)
You must be logged in to reply to this topic. Login to reply