|
![]() |
|
| Author |
|
|||||||
|
Opec
Posts: 3517
Location: Brisbane, Queensland
|
Look like MySQL finally becoming a real RDBMS by adding the following features to thier DB:
Key new features of MySQL 5.0 come in three groups: a) ANSI SQL standard features formerly unknown to MySQL b) ANSI SQL standard compliance of existing MySQL features c) New MySQL Storage Engines, Tools and Extensions The new ANSI SQL features include: * Views (both read-only and updatable views) * Stored Procedures and Stored Functions, using the SQL:2003 syntax, which is also used by IBM's DB2 * Triggers (row-level) * Server-side cursors (read-only, non-scrolling) More here: http://www.mysql.com/news-and-events/news/article_959.html And http://dev.mysql.com/doc/mysql/en/mysql-5-0-nutshell.html Download it here: http://dev.mysql.com/downloads/mysql/5.0.html |
|||||||
| #0 11:57am 28/09/05 |
|
|||||||
|
system
|
--
|
|||||||
| #0 |
|
|||||||
|
Raven
Posts: 1135
Location: Melbourne, Victoria
|
Stored procedures. About f***ing time. Now I can do native recusive selects.
Too bad my webhost will take 2 years to implement it, they've only just now allowed me to move to 4.1. Might have to move because of this alone. |
|||||||
| #1 12:45pm 28/09/05 |
|
|||||||
|
trog
AGN Admin
Posts: 17453
Location: Brisbane, Queensland
|
People need those features like they need more than 16 bit colour in video cards, or flash on websites
|
|||||||
| #2 01:40pm 28/09/05 |
|
|||||||
|
Jim
Posts: 3723
Location: Brisbane, Queensland
|
u=noob if you need anything more than mysql 3's functionality
opec, if this new functionality leads to the introduction of a greater number of bugs I'm going to have words with you |
|||||||
| #3 01:45pm 28/09/05 |
|
|||||||
|
Raven
Posts: 1136
Location: Melbourne, Victoria
|
I can do everything I want to with MySQL3, sure. But it means you needs dozens, perhaps potentially hundreds of calls just to say, return a threaded, recursive permissions list for a recursive data set for example.
Triggers and views though are typically pointless except in certain types of databases (eg where many different clients are allowed direct access to the DB). |
|||||||
| #4 01:50pm 28/09/05 |
|
|||||||
|
Jim
Posts: 3724
Location: Brisbane, Queensland
|
I was kidding, it's kind of a very long running joke around here
...hey maybe you've found some previously unknown limit in mysql's ability to join tables, or perhaps even come across a really poorly designed permission system, but any multi-user application which needs to query a database more than 5 or 6 times in any single action is a fat, juicy LEMON |
|||||||
| #5 01:58pm 28/09/05 |
|
|||||||
|
Opec
Posts: 3518
Location: Brisbane, Queensland
|
Nah that's be what we call "surprised features" kinda like the ones Microsoft keep giving us. PS I don't care too much for trigger (I don't use them myself) but Stored Proc, views, nested sub-selects in *all* DML, native referential integrity and native transaction support is definitely a good step in the right direction. Extra goodies like replications and some funky locking etc are handy if you need them but I don't so. |
|||||||
| #6 02:15pm 28/09/05 |
|
|||||||
|
Obes
Posts: 3631
Location: Brisbane, Queensland
|
I heard this forum takes 10 queries before it puts up <HTML>
|
|||||||
| #7 02:38pm 28/09/05 |
|
|||||||
|
Raven
Posts: 1137
Location: Melbourne, Victoria
|
Jim, I fail to see you you can construct an ordered recursive tree using only JOIN, WHERE and ORDER. You can do it if you know the depth of any number of objects, but perhaps I've missed something (an available feature perhaps), because to my knowledge it can't be done.
I mention this because if you can tell me a way, I'd love to hear it. Edit: And yes, I know you could do it as a heap, but can you imagine having to update a heap every time you modify a node in a data set of, say, 1 million rows? Simply not feasible. last edited by Raven at 15:41:34 28/Sep/05 |
|||||||
| #8 03:41pm 28/09/05 |
|
|||||||
|
Opec
Posts: 3519
Location: Brisbane, Queensland
|
^^^ You can do this in PHP
LOL :D |
|||||||
| #9 03:21pm 28/09/05 |
|
|||||||
|
Raven
Posts: 1138
Location: Melbourne, Victoria
|
Yes, I'm well aware you could do it in PHP, or any other language using multiple/many calls back to the DB. Doing that is easy. Doing it in a single query though, when subselects and stored procedures are not available though, isn't so easy (if at all possible).
You can do it if you don't care about depth, and only want order though. |
|||||||
| #10 03:32pm 28/09/05 |
|
|||||||
|
Opec
Posts: 3522
Location: Brisbane, Queensland
|
Rave I was only kidding doode :)
Also, AFAIK, MS SQL have limit on how many recursion/nested any one Stored Proc & User defined functions can do (can't remeber how many now). Not sure if this will be the save for MySQL though. It would make sense to put some sort of limit on it otherwise you could have infinite loop happening in the DB. What we need is what Oracle have would solve so much hassle...but then again you'd be paying $$$$$$. |
|||||||
| #11 03:41pm 28/09/05 |
|
|||||||
|
Raven
Posts: 1139
Location: Melbourne, Victoria
|
MSSQL has MAX RECURSION(n). And yeah, Oracle has all the required stuff to do it too. But do you see me shelling out for a copy/licence of Oracle? :P
|
|||||||
| #12 03:54pm 28/09/05 |
|
|||||||
|
Jim
Posts: 3725
Location: Brisbane, Queensland
|
raven have you tried perl? perl could do that easily
|
|||||||
| #13 04:17pm 28/09/05 |
|
|||||||
|
Raven
Posts: 1141
Location: Melbourne, Victoria
|
Again Jim, like I said, it's easy to do at that layer, regardless of the language. But regardless of what language you use, you're going to either have to pull ALL of the data out and then sort it, or make successive calls to the database. The language of choice is irrelevant in this matter (and I'm extremely capable to do this in C, PHP or Java with little effort).
|
|||||||
| #14 07:22pm 28/09/05 |
|
|||||||
|
Jim
Posts: 3726
Location: Brisbane, Queensland
|
perl can do loops though can't it?
|
|||||||
| #15 07:38pm 28/09/05 |
|
|||||||
|
plok
Posts: 418
Location: Brisbane, Queensland
|
1) Use Postgres if you want a real database for free
2) MySql suits Jim because it also has a hard time when it comes to things like NULLS and 0, NULLS and time(stamp), 0 and 1, integers and characters, Up(percase) from Down(er case),taking what you say and changing it into something completely different (even if you ask it not to!). 3) Oracle has a CONNECT BY clause that will allow you to apply recursive logic on one table. Otherwise, as a purely academic exercise you could probably write some dynamic SQL that will allow you to solve recursive type problems with just standard SQL, although I would imagine it would be much to hopelessly inneficient for even trivial cases. last edited by plok at 23:29:15 28/Sep/05 |
|||||||
| #16 11:29pm 28/09/05 |
|
|||||||
|
IncrEdible_vEgetable
Posts: 386
Location: Brisbane, Queensland
|
You had me at 'hello'.
|
|||||||
| #17 11:31pm 28/09/05 |
|
|||||||
|
whoop
Posts: 9154
Location: Brisbane, Queensland
|
People need those features like they need more than 16 bit colour in video cards, or flash on websites or more than 25fps |
|||||||
| #18 11:53pm 28/09/05 |
|
|||||||
|
Jim
Posts: 3728
Location: Brisbane, Queensland
|
imagine plok's consternation after pressing submit and then gleefully beginning to read his handiwork.. what's this?! MY GOD AN OUT OF PLACE LINE FEED HOW DID THAT GET THERE@%#
the dilemma! what's worse - a misplaced line feed, right there in his post, staring at him from somewhere it simply shouldn't be, or an 'edited by plok' line appended to the post... IN A DIFFERENT FONT FROM THE REST OF THE POST*%@&^#$? you could've just blamed the insertion of the blank line on mysql and saved yourself a lot of anguish! |
|||||||
| #19 12:10am 29/09/05 |
|
|||||||
|
system
|
--
|
|||||||
| #19 |
|
|||||||
|
| ||||||||