[Discuss] SQL discussion
Richard Pieri
richard.pieri at gmail.com
Wed Jan 14 15:48:18 EST 2015
On 1/14/2015 1:53 PM, markw at mohawksoft.com wrote:
> Yes, the language structure was designed to facilitate relational data.
No, and go read Jerry's post from this morning for details.
>> Because SQL is built on two dimensional algebra. Two dimensional math
>> cannot easily encompass three or more dimensions.
>
> That's like saying you can't represent 3 dimensions on a piece of paper.
No, it's not. You can represent 3 or 4 or 8 dimensions on a piece of
paper. That's not the same as being easy to represent 3 or 4 or 8
dimensions on a piece of paper.
> Why must you perform "multiple queries?" Its all how you choose to
> structure your data and how you choose to query it.
Precisely. What is the structure of a relational database? A table. A
2-dimensional table. If you have 3 dimensions of data in a relational
database system then you have a stack of tables. Standard SQL has 2 axes
for queries: column and row. There is no way to query along the Z axis
so you have to iterate your queries through the stack (or subset of the
stack) of tables then combine and filter the results to get what you want.
Or you can use stored procedures or JOINs, both of which have their own
sets of portability and scalability issues which I consider myself
wholly unqualified to discuss since I'm not a DBA and I don't want to be
one when I grow up. :)
--
Rich P.
More information about the Discuss
mailing list