(Un)holy thread necromancy, dude!Trillby":2k3la0qm said:Pretty much.
How do people end up doing this? Were you searching for a SQL thread or something?
On the other hand, it might be fun if Suicidolt came back to tell us how it's gone...
(Un)holy thread necromancy, dude!Trillby":2k3la0qm said:Pretty much.
SELECT * FROM thread WHERE last_post_date = a_long_time_ago AND title LIKE '%SQL%';
No, now he just drops in to offer gems like "you know VBA, so VB.NET will be easy."Alamout":cyk3nrzg said:On the other hand, it might be fun if Suicidolt came back to tell us how it's gone...
Alamout":3183r8ml said:(Un)holy thread necromancy, dude!Trillby":3183r8ml said:Pretty much.
How do people end up doing this? Were you searching for a SQL thread or something?
On the other hand, it might be fun if Suicidolt came back to tell us how it's gone...
So everyone reading this is a troll? One has to wonder why you even post here.(yes, I can prove it, and NO, I won't for a troll like you, person reading this and thinking "he's so full of it").
Suicidolt":29vk2dik said:Also, I had a recent joyous occasion when I used an RDBMS to store the relationship between the Database and the Application.
Maybe he means something like this?jxl":25zfhbuh said:Suicidolt":25zfhbuh said:Also, I had a recent joyous occasion when I used an RDBMS to store the relationship between the Database and the Application.
Are you saying that you somehow used an RDBMS as middleman between application and your REAL database, is your prose just excessively flowery to the point of being impenetrable or do you just have no clue what it is that you're gluing together?
Suicidolt":e0o6phol said:It still feels pretty sloppy that we're storing data by hand-typed (often case-sensitive) queries in a world where simple programs often hit a few megabytes in size (think about the number of characters in that program's source code that could potentially break by a syntax error). It's sloppy, but as established thoroughly in this thread, it's well tested. Sure, it'd be great to touch-screen drag fields and tables around and name them with our voice, but there just isn't a decent interface out there that's as tried and true as unix-style commands in a white on black box.
Suicidolt":etoe9dym said:It still feels pretty sloppy that we're storing data by hand-typed (often case-sensitive) queries in a world where simple programs often hit a few megabytes in size (think about the number of characters in that program's source code that could potentially break by a syntax error). It's sloppy, but as established thoroughly in this thread, it's well tested. Sure, it'd be great to touch-screen drag fields and tables around and name them with our voice, but there just isn't a decent interface out there that's as tried and true as unix-style commands in a white on black box.
That was a technical limitation of the old boards; I don't think it's necessary any more.grahamb":2ajlaatp said:What ever happened to really old threads being auto-locked so this doesn't happen?
jxl":1g6340ck said:Suicidolt":1g6340ck said:Also, I had a recent joyous occasion when I used an RDBMS to store the relationship between the Database and the Application.
Are you saying that you somehow used an RDBMS as middleman between application and your REAL database, is your prose just excessively flowery to the point of being impenetrable or do you just have no clue what it is that you're gluing together?
C0rinthian":3ccdvpei said:Suicidolt":3ccdvpei said:It still feels pretty sloppy that we're storing data by hand-typed (often case-sensitive) queries in a world where simple programs often hit a few megabytes in size (think about the number of characters in that program's source code that could potentially break by a syntax error). It's sloppy, but as established thoroughly in this thread, it's well tested. Sure, it'd be great to touch-screen drag fields and tables around and name them with our voice, but there just isn't a decent interface out there that's as tried and true as unix-style commands in a white on black box.
...what?
When you boil it down, ALL code is hand typed. Sometimes assisted by an IDE, but it's put together by a monkey banging on a keyboard. That's not something that's special about SQL. It's also not case sensitive. The actual DATA might be case sensitive, but that's also not unique to SQL. Finally, there are tools to do the 'drag fields and tables around' stuff if you really want it.
And who is doing all their updates manually at a command line? SQLPlus is awesome and all, but there are tools out there for SQL just like there are for any other programming language.
SQL is probably the highest level language that most developers (people who use C++ or Obj-C or Java or .NET or Python or whatever) ever use.And of course, this brings us back to the premise of this thread. There's a reason they call them "Higher level languages". SQL is not very high level.
The entity framework is not a language, it is a library to facilitate certain common types of use cases around data.Suicidolt":2lgpo9zi said:I know this may be difficult for you, but the purpose of programming is to generate reusable bits of "hand typed" code that allows you to think on a higher level and not get bogged down with stupid crap. In the case of SQL, the Entity Framework in .NET does a decent job of removing the SQL from the developer and reusing tried and true code.
SQL is actually a very high level language. Wikipedia provides some useful insights here:And of course, this brings us back to the premise of this thread. There's a reason they call them "Higher level languages". SQL is not very high level.
A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be from the specification of the program, making the process of developing a program simpler and more understandable with respect to a low-level language. The amount of abstraction provided defines how "high-level" a programming language is.
...
"High-level language" refers to the higher level of abstraction from machine language. Rather than dealing with registers, memory addresses and call stacks, high-level languages deal with variables, arrays, objects, complex arithmetic or boolean expressions, subroutines and functions, loops, threads, locks, and other abstract computer science concepts, with a focus on usability over optimal program efficiency. Unlike low-level assembly languages, high-level languages have few, if any, language elements that translate directly into a machine's native opcodes.
...
The terms high-level and low-level are inherently relative. Some decades ago, the C language, and similar languages, were most often considered "high-level", as it supported concepts such as expression evaluation, parameterised recursive functions, and data types and structures, while assembly language was considered "low-level". Many programmers today might refer to C as low-level, as it lacks a large runtime-system (no garbage collection, etc.), basically supports only scalar operations, and provides direct memory addressing. It, therefore, readily blends with assembly language and the machine level of CPUs and microcontrollers.
Assembly language may itself be regarded as a higher level (but often still one-to-one if used without macros) representation of machine code, as it supports concepts such as constants and (limited) expressions, sometimes even variables, procedures, and data structures. Machine code, in its turn, is inherently at a slightly higher level than the microcode or micro-operations used internally in many processors.
Suicidolt":35tr5dke said:C0rinthian":35tr5dke said:Suicidolt":35tr5dke said:It still feels pretty sloppy that we're storing data by hand-typed (often case-sensitive) queries in a world where simple programs often hit a few megabytes in size (think about the number of characters in that program's source code that could potentially break by a syntax error). It's sloppy, but as established thoroughly in this thread, it's well tested. Sure, it'd be great to touch-screen drag fields and tables around and name them with our voice, but there just isn't a decent interface out there that's as tried and true as unix-style commands in a white on black box.
...what?
When you boil it down, ALL code is hand typed. Sometimes assisted by an IDE, but it's put together by a monkey banging on a keyboard. That's not something that's special about SQL. It's also not case sensitive. The actual DATA might be case sensitive, but that's also not unique to SQL. Finally, there are tools to do the 'drag fields and tables around' stuff if you really want it.
And who is doing all their updates manually at a command line? SQLPlus is awesome and all, but there are tools out there for SQL just like there are for any other programming language.
I know this may be difficult for you, but the purpose of programming is to generate reusable bits of "hand typed" code that allows you to think on a higher level and not get bogged down with stupid crap.
Suicidolt":2w91yjf4 said:It would be difficult for someone who hasn't ever worked with a database before to understand that the relationships between tables & columns (or fields if you prefer) and the data stored in them are usually placed into the consuming code, and above I was refering to the storage of said relationship in the database.
Suicidolt":29rqlno1 said:In the case of SQL, the Entity Framework in .NET does a decent job of removing the SQL from the developer and reusing tried and true code.
Using SQL to describe even more SQL is certainly generating more reusable bits of "hand typed" code, so at least you got that part right.I know this may be difficult for you, but the purpose of programming is to generate reusable bits of "hand typed" code that allows you to think on a higher level and not get bogged down with stupid crap.
SQL is certainly a high level language (it's far from detail how things are to be done), but it lacks good mechanisms for defining additional abstractions within the problem domain.DrPizza":17hyd679 said:SQL is probably the highest level language that most developers (people who use C++ or Obj-C or Java or .NET or Python or whatever) ever use.And of course, this brings us back to the premise of this thread. There's a reason they call them "Higher level languages". SQL is not very high level.
SQL is certainly a high level language (it's far from detail how things are to be done), but it lacks good mechanisms for defining additional abstractions within the problem domain.
select
some horribly complex thing here as foo,
another big thing as bar
from x
where y
group by foo
order by bar
WITH (
some horribly complex thing here
) as foo
SELECT foo.something, bar.somethingelse
FROM aTable as bar
JOIN foo ON bar.field = foo.field
WHERE y
GROUP BY foo.something
ORDER BY bar.somethingelse
ShuggyCoUk":2tj6z9gn said:SQL is certainly a high level language (it's far from detail how things are to be done), but it lacks good mechanisms for defining additional abstractions within the problem domain.
Such as? (not necessarily disagreeing, just wondering specifically what)
personally I find the lack of support for aliases within other parts of the query *deeply* frustrating.
Code:select some horribly complex thing here as foo, another big thing as bar from x where y group by foo order by bar
Invalid column name foo.
Nastiest most pointless bit of DRY violation I encounter on a regular basis. Do any RDBMS vendors support doing that?
At least order by seems to allow it (is that pretty universal?).
technophile":t6f3nt5j said:Sure:
Code:WITH ( some horribly complex thing here ) as foo SELECT foo.something, bar.somethingelse FROM aTable as bar JOIN foo ON bar.field = foo.field WHERE y GROUP BY foo.something ORDER BY bar.somethingelse
SQL Server 2008 and up, IIRC; no idea about Oracle or other RDBMSes, as I've not used them recently.
C0rinthian":25wcixii said:Although you may just be moving the group by into the WITH, where the issue still stands. Depends on what the horribly complex thing is.
This. Having to type "SELECT * FROM foo" and then go back and fill in the columns just feels silly, especially after spending any amount of time with LINQ.Pont":1klsxlf6 said:I wish they'd standardize the "FROM before SELECT" though. Makes so much more sense with intellisense.
You can work around this with a subquery (check your execution plan to ensure the result is the same). Depending on how complex your expression is, the subquery may increase clarity. I got exactly the same execution plans with these two queries:ShuggyCoUk":1usvg2ph said:Code:select some horribly complex thing here as foo, another big thing as bar from x where y group by foo order by bar
Invalid column name foo.
SELECT Column1, Column2, <expression> AS ExpressionColumn, COUNT(*)
FROM Table1
WHERE <criteria>
GROUP BY Column1, Column2, <expression>
SELECT Column1, Column2, ExpressionColumn, COUNT(*)
FROM
(
SELECT *, <expression> AS ExpressionColumn
FROM Table1
WHERE <criteria>
) t
GROUP BY Column1, Column2, ExpressionColumn
ShuggyCoUk":dr63ex8o said:thanks for all the suggestions, but I still can't help feeling that, requiring them is just plain wrong.
WITH is at least nice because it generalizes even more but still I rack my brains trying to figure out why, given it was decided that it was perfectly fine to use it in order by, they haven't decided to do the same for the group by. I know it's slightly more effort, but making machines do the hard work for is kinda the point.
My first guess would be that one feature came years before the other, or was implemented by two vendors differently until it was standardized. Can't break old code, right?WITH is at least nice because it generalizes even more but still I rack my brains trying to figure out why, given it was decided that it was perfectly fine to use it in order by, they haven't decided to do the same for the group by.