Slashdot Mirror


MySQL Gets Functions in Java

Java Coward writes "Eric Herman and MySQL's Brian "Krow" Aker have released code to allow the DBMS MySQL to run Java natively inside of the database. The code allows users to write functions inside of the database that can be then used in SELECT/INSERT/UPDATE statements. So when will someone do Ruby?"

318 comments

  1. Now how about. by DAldredge · · Score: 5, Interesting

    Now how about a way to do online backups of the new table types with out having to buy a license to do it?

    1. Re:Now how about. by jamie · · Score: 5, Informative

      Replicate to a slave DB that isn't used for anything but backups. On the slave, you can do a 'mysqldump -x'. That'll block updating while it does the write, but you won't care. The only problem arises if your hardware is too slow to catch up replication before the next time you do the dump, in which case you're kind of screwed anyway. This works on both myisam and innodb tables.

    2. Re:Now how about. by Anonymous Coward · · Score: 0

      400EUR is a pain and probably will be adressed by some developer sooner or later. However, as a customer I have to say it's worth it. MySQL and Innobase support are great.

    3. Re:Now how about. by DAldredge · · Score: 2, Insightful

      If you have have a second system to run as a slave that may work. In quite a few realworld(tm) situations you don't have that luxury.

      There needs to be someway of doing online back ups of MySQL with out spending money.

    4. Re:Now how about. by DAldredge · · Score: 0, Troll

      Why not use PostgreSQL?

    5. Re:Now how about. by ErikZ · · Score: 1

      Why don't you just support it?

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    6. Re:Now how about. by Cajal · · Score: 3, Informative

      There needs to be someway of doing online back ups of MySQL with out spending money.

      Why not just use PostgreSQL? It's had hot-backup of tables for years.

    7. Re:Now how about. by DAldredge · · Score: 1

      That is what I use.

      It is just that the MySQL fanboys 'forget' to mention the little fact of the cost of they backup tools when they talk about how much beter MySQL is that 'DATABASE X'

    8. Re:Now how about. by vt0asta · · Score: 2, Informative

      Number one big time issue is how do you get the changes that occured to the files during the backup so that the database is consistent.

      It's trivial really. Announce to the database that you want to perform an online backup. This marks the database in a special mode that lets it know that data writes are going to be at the block level vs. row level.

      Also data modifications are still written to the datafiles and also are always written to special files (simultaneously and at the sime time :-p). These files are called redo logs, and the database cycles through a set of them. When a database is running in a condition in which it can allow online backups, it writes a copy (called an archive) of the redo log file to a special directory before that redo log file is used again.

      During an online backup you backup all of the "archived" redo log files for the entire time it takes you to backup the data files. Once you backup the datafiles, and the archived redo log files, you can then take the database out of backup mode, and start doing row level modifications again.

      When it's time to restore, the database sees that the restore datafiles are in an incosistent state but that's "ok", because it also knows you have competently saved all of the "missing" changes. The database rolls through the archived log files applying the changes that are neccessary until the database is in a consistent state.

      --
      No.
    9. Re:Now how about. by Spirilis · · Score: 1

      What about recopying the master DB to the slave in the event that the slave becomes somehow inconsistent (like if a developer stupidly writes to the slave DB by accident)?

      I know this is an exceptional situation and should not occur often, but... it'd still be nice to avoid downtime while doing this.

      On the other hand, for minimal downtime, couldn't Linux LVM's snapshot volumes work favorably for this?

      --
      the real at&t mix
    10. Re:Now how about. by Anonymous Coward · · Score: 1, Informative

      For MyISAM and InnoDB tables, this is already possible. the mysqldump utility has arguments that allow you to do the dump within LOCK/UNLOCK TABLES statements, or within a single transaction. So, dump all InnoDB tables within a single transaction, and then all MyISAM tables within a lock. This gives you a consistent snapshot of your database, with a possible rift between your MyISAM and InnoDB tables, if you have some of both. But if there are data integrity constraints that span tables of both types, perhaps more of your tables should be InnoDB! mysqldump does not require the database to be shut down, so you can do this on the fly. There's a miniscule slowdown while in progress, of course, but it's a very fast method. Then you are left with SQL files that can be read back into MySQL anytime you want.

    11. Re:Now how about. by Anonymous Coward · · Score: 0

      OK, OK, we get it. You think people should use PostgreSQL. Now let it go.

    12. Re:Now how about. by HarrisonFisk · · Score: 2, Informative

      You actually can take online backups of InnoDB without buying the InnoDB Hot Backup tool. The non-free tool allows you to take online *binary* backups, but if you want to take an online data backup you can do so using mysqldump with the --single-transaction method. This will work basically identical to how you take the online backup with pg_dump. It takes a snapshot in time using the normal transaction isolation level semantics and dumps it into a plain text file. Keep in mind that dumping the data is slower than doing a binary backup (also for restore) but that is true for any database. If you just need online backup capabilities, it is built in. If you need it to be faster than you can choose to buy the online binary backup feature.

    13. Re:Now how about. by bmedwar · · Score: 1

      please don't use the term slave . :-)

      --
      --Brian
    14. Re:Now how about. by PalmKiller · · Score: 1

      oh my, what silliness you link to. I guess next they will be wanting more rights for those slave system

    15. Re:Now how about. by Anonymous Coward · · Score: 0

      > It's trivial really...

      Here's something more trivial that we've been doing with MySQL for 4+ years to do consistent backups. We just backup the update log files! With the newer binary log file format, it's even more efficient. You just take a copy of the database from some time then apply the changes to it from the log file. It's easy to understand and easy the script.

      We also use this to recreate a copy of the database as it existed at any point in time in the past. That was a great feature to have when we were audited last year, and it's saved my (the programmer) ass several times when I used it to go back to show when something was changed to show it was something a user did rather than a bug in one of my programs.

    16. Re:Now how about. by Anonymous Coward · · Score: 1, Insightful

      There doesn't need to be a free way of doing everything. Shell out the $$$$ you cheap fuck. Something that saves your job should not be free!

    17. Re:Now how about. by drix · · Score: 2, Troll

      Yeah, fuck paying for a feature that took a lot of work to implement and that you want badly. The nerve of those assholes, charging money for their work.

      A real man would other get off his ass and code it himself, or support the damn developers who do. Note "Bitch on /." is not listed. Free software is turning the world into a bunch of whining ingrates.

      --

      I think there is a world market for maybe five personal web logs.
    18. Re:Now how about. by Electrum · · Score: 1

      If you have have a second system to run as a slave that may work. In quite a few realworld(tm) situations you don't have that luxury.

      Then run a second copy of MySQL on the same machine.

    19. Re:Now how about. by DAldredge · · Score: 1

      Now that is an efficent use of resources.

    20. Re:Now how about. by gumbi+west · · Score: 1

      Yeah, and Oracle can also make that neat vacuum sound in your pocket. That's my favorite feature.

    21. Re:Now how about. by NuShrike · · Score: 1

      offtopic, but Postgresql has had support for years also.

    22. Re:Now how about. by Anonymous Coward · · Score: 0

      Drix modded up because he's speaking the truth.

      Parent should code his own damned solution and see how much that 'costs'.

    23. Re:Now how about. by Sxooter · · Score: 1

      Hehe, that's what having a windows port will do to your database I guess. Make you used to using spare machines all over the place. :-)

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    24. Re:Now how about. by Sxooter · · Score: 1

      Correct me if I'm wrong, but doesn't that basically lock your whole database against writes during the backup? Just wondering.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    25. Re:Now how about. by Sxooter · · Score: 1

      I use Postgresql and prefer to it to MySQL, but this is neither the time nor the place to be such a pain in the arse. Do you really think the average MySQL user is gonna be converted like this? The Postgresql crowd is usually a bit more subtle than this. There are plenty of other issues why one might prefer one database over another, and neither MySQL nor Postgresql are the best or the worst for every job.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    26. Re:Now how about. by HarrisonFisk · · Score: 1

      No, InnoDB is multiversioning, similar to Oracle and PostgreSQL. That means that it uses non-locking reads, assuming you are running in the default isolation level of REPEATABLE READ.

      The reason this is possible is due to the fact that whenever anyone goes to write a row, it creates an entire copy of the affected row, where the old transaction sees the old copy of the row while the new transactions will see the new copy.

      Keep in mind this can change if you set a different isolation level. For example SERIALIZABLE runs in the highest isolation level, so it needs to set more locks than the other levels. There is more info available here and here if you want to read more.

    27. Re:Now how about. by Sxooter · · Score: 1

      So with the single transaction switch, is it guaranteed to be a coherent backup (i.e. all fk relationships should be clean and all that) or can you get a dirty read? Just wondering. Postgresql's hot backup literally runs in serializable mode, but since the back is read only, it doesn't actually lock anything.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    28. Re:Now how about. by HarrisonFisk · · Score: 1

      Yes.

      InnoDB takes a snapshot in time with REPEATABLE READ (and doesn't lock anything to do so). That means you can not get any one elses data injected while you are inside your transaction, which means you get a snapshot of only completed transactions. Here is a link where the creator of InnoDB talks about using mysqldump.

      It sounds like PostgreSQL's SERIALIZABLE is very similar to InnoDB's REPEATABLE READ setting. It might be because PostgreSQL isn't really serializable in the mathmatical sense while InnoDB is. I'm not that familar with PostgreSQL's internals to know if it is similar to InnoDB's REPEATABLE READ level.

    29. Re:Now how about. by Sxooter · · Score: 1

      So how does innodb get around the example problem and still provide good parallel performance?

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    30. Re:Now how about. by HarrisonFisk · · Score: 1

      It does Predicate Locking, exactly what is required in order to get true Serializability. Basically that is the best way in order to get transactions to truly be serialzable. There are other ways as well (table level locks, etc...) which also work, but allow less performance.

      Predicate locking is only required in serializable. The more isolation you get, the more about of locking you will incur. That is what is assumed when you ask for the higher level of isolation. If you require true serializable behavior, then you are willing to accept that. If you don't need it, then you can use a lower isolation level. I believe that SQL Server and DB2 also use Predicate locking AFAIK when in serializable.

  2. Keep this out. by Blackknight · · Score: 0, Flamebait

    Please, do not make this part of the main release. The last thing we need is lusers trying to run java from inside mysql.

    Bad enough that none of them know how to write queries properly so they bog down the servers.

    1. Re:Keep this out. by jbplou · · Score: 1

      I'm sure if you are the DB admin you will be able to turn this feature off.

    2. Re:Keep this out. by gustgr · · Score: 4, Insightful

      I don't know why everybody wants to keep distance from Java. It is a very nice language implementing the very well the OOP paradigm.

      The 'lusers' may not use this new feature but Java programmers will and hopefully will enjoy it.

    3. Re:Keep this out. by carabela · · Score: 1

      Yup, whatever happened to the idea of layers, tiers of clientapp, business logic and the dB in some storage area?

      --

      The more you know, the less you need. [Admin added: from me.]
    4. Re:Keep this out. by DAldredge · · Score: 0, Troll

      You said the P word. Why again should we listen to you?

      </joke>

    5. Re:Keep this out. by AndroidCat · · Score: 1
      but Java programmers will and hopefully will enjoy it.

      And when I want to move my app to a different db or support multiple dbs, and discover that the server side depends on this cute hack?

      --
      One line blog. I hear that they're called Twitters now.
    6. Re:Keep this out. by j3110 · · Score: 4, Insightful

      Did you not think about that post? Sounds like you just dislike Java so much that hearing it in the same sentance as MySQL makes you cringe.

      1) Java isn't going to slow down any queries unless you use Java functions.
      2) What do you care that someone else isn't smart enough to write good software?
      3) MySQL as it stands has no other way to really embed functions easily, and it's actually more effecient to run code on the server and transfer data back afterwords.

      --
      Karma Clown
    7. Re:Keep this out. by gustgr · · Score: 0

      Presuming your app is written in Java, you will not have too much trouble if the code is well designed, concerning the way Java code should be developed.

    8. Re:Keep this out. by tealover · · Score: 0, Offtopic

      I'm pretty confident he pronouces it para-diggum as well.

      --
      -- You see, there would be these conclusions that you could jump to
    9. Re:Keep this out. by Anonymous Coward · · Score: 0

      Could someone give an example of 'braindead queries' please?

    10. Re:Keep this out. by j3110 · · Score: 1

      Then you port a small amount of code to the embedded languages of that DBMS. Every other DBMS has embedded functions except for MySQL, some even support Java.

      --
      Karma Clown
    11. Re:Keep this out. by Blackknight · · Score: 4, Informative

      I care because when you have 200 shared hosting accounts on one server all it takes is one idiot to load things down.

      Most of the time we detect who it is and suspend their account, but I still wouldn't want them running java code inside mysql.

    12. Re:Keep this out. by geoffspear · · Score: 1
      And still, where it the most common usage of java? Stupid web crap in banner ads and pop ups.

      Repeat after me: Java is not the same thing as Javascript.

      --
      Don't blame me; I'm never given mod points.
    13. Re:Keep this out. by DAldredge · · Score: 1

      Then don't compile in such support.

    14. Re:Keep this out. by rifter · · Score: 1

      Did you not think about that post? Sounds like you just dislike Java so much that hearing it in the same sentance as MySQL makes you cringe.

      I think the answer to both questions is yes.

      1) Java isn't going to slow down any queries unless you use Java functions.

      Which is exactly what the poster fears they will do.

      2) What do you care that someone else isn't smart enough to write good software?

      I think this is the heart of your disconnect with the poster. True, if you are using MySQL as most do, in a small shop, the dba and the application programmer are probably the same person. But in most shops employing RDBMS, you have one team that maintains the OS, one team that maintains the database, one team that maintains the network, and finally a team that writes and maintains the actual applications. What the poster is probably worried about is being a DBA when some application programmer uses Java badly and then his boss leans on him, as the DBA, to make the process work faster. In such a case you would deeply, deeply care.

      3) MySQL as it stands has no other way to really embed functions easily, and it's actually more effecient to run code on the server and transfer data back afterwords.

      Sounds like a job for stored procedures ala Oracle. If MySQL does not have them it should.

    15. Re:Keep this out. by Anonymous Coward · · Score: 2, Funny
      Bad enough that none of them know how to write queries properly so they bog down the servers.

      Oh, come on, everyone knows mySQL doesn't support subqueries because they allow a lazy user to slow down the database. You're supposed to do simple queries against the database, and then JOIN the results in your C application. Anyone who can't write a safe, fast JOIN in C is just a bad programmer, and should not be using an enterprise-level RDBMS like mySQL. Go back to FileMaker, you SQLamers!

      (This troll brought to you by mySQL AB, the folks who brought you other hard truths about database programming, such as "Transactions are for sloppy programmers" and "Any relational integrity checking you can do in the DBMS, you can do easier in your application." Remember: Only asshole DBAs believe all that Codd & Date "relational" bullshit.)

    16. Re:Keep this out. by gustgr · · Score: 0

      Java is widely used at portable devices [J2ME] and in industry/enterprise [J2EE] development as well. It can be used to develop any kind of application in every plataform that supports the JVM.

      And remember: Java != Javascript.

    17. Re:Keep this out. by laird · · Score: 1

      "Sounds like a job for stored procedures ala Oracle. If MySQL does not have them it should."

      That's the issue -- the poster's complaint actually has nothing to do with MySQL embedding Java in particular -- he's worried that if he allows users to execute stored procedures they can bog down his database.

      I don't know about MySQL, but in Oracle, Sybase, etc., you can put a CPU time limit on queries so that if someone starts sucking the system down their queries time out.

    18. Re:Keep this out. by Razor+Blades+are+Not · · Score: 1

      Have you been swallowing the tripe from the MS developers journal again ?

      Have you even worked with Java ? I don't mean puttering around at home in between failed job interviews. I mean in a production environment.

      Javascript != Java.

    19. Re:Keep this out. by Tim+C · · Score: 2, Interesting

      But in most shops employing RDBMS, you have one team that maintains the OS, one team that maintains the database, one team that maintains the network, and finally a team that writes and maintains the actual applications. What the poster is probably worried about is being a DBA when some application programmer uses Java badly and then his boss leans on him, as the DBA, to make the process work faster.

      I work in such a company, as an application programmer. Where I work, it's not up to the DBA to make things run faster - if an application is too slow, it's our problem. True, we can call on the various other people to help us in tracking down the cause of the problem, working out what needs to be done to improve the situation, etc, but ultimately it's our responsibility. It may be that the solution is to increase the spec of the machine(s), or upgrade the network, but we'd still be very much involved in coming to that decision.

      So, as a counter example - from my position as a programmer, I'd be rather upset if my otherwise well-performing code is crippled by an underspecced machine or poorly-configured database. I trust the people responsible to do their jobs properly, though.

    20. Re:Keep this out. by zerocool^ · · Score: 1

      I know java is not javascript. I am just sick of seeing little popups and crap on webpages that use Java (real java). I.e. I watched the freakin sun little "cup and steam" and a grey space load before I get something that looks like a casino or something".

      Such that I uninstalled Java.

      --
      sig?
    21. Re:Keep this out. by zerocool^ · · Score: 0, Redundant

      As posted elsewhere in this thread, I know what java is and I know what javascript is. I see al lthe time banner ads and popups that load teh little "sun cup and steam" thing before trying to sell me crap.

      --
      sig?
    22. Re:Keep this out. by KenSeymour · · Score: 3, Insightful

      The /. crowd keeps hoping Java will go away. They don't want to learn it.

      But it doesn't go away.

      I have noticed that there are several technologies that are held in high regard outside of the Linux/Free Software that are despised within it.

      One is Object Oriented programming. By extension, C++, Java, and UML also fit into this category.
      I wonder how many folks who bash these things have ever actually bothered to learn them?
      It is easier to say that XYZ is "bloated and ugly" than to say "I never learned these things so I can't say how useful they are."
      I also see a lot of "Anyone that does not agree with me is a stupid, clueless, MCSE."

      Name calling is a sign of weak arguments.

      The article is about Java running on the server, behind the scenes. It doesn't "look" like anything.

      I believe server side java is the most common usage of Java. Portability is less of an issue because you control the server environment.
      You can support non-Unix users and still use Unix/Linux for your server.

      --
      "We can't solve problems by using the same kind of thinking we used when we created them." -- Albert Einstein
    23. Re:Keep this out. by j3110 · · Score: 1

      In any case, you should know that there will be a "skip-java" directive in the config file :)

      --
      Karma Clown
    24. Re:Keep this out. by j3110 · · Score: 1

      Yes, the disconnect is that I don't think the poster understands the intent of embedded procs like this. They are used to improve performance, not stifle it. That's almost like saying "I hope they don't implement sub queries, imagine how slow they will make the system then!". This is more true than stored procedures, but there are some times that sub queries are faster. It's a hell of a lot faster than runing N+1 queries through the DB because it doesn't support sub queries when you need them! Likewise, parsing through the data on the server is the best thing ever. It reduces network load, and moves some of the processing into the DBMS where the CPU spends most of it's time waiting on the disk. Overall, any kind of stored procedure like this can be very much better performing than what we have now.

      --
      Karma Clown
    25. Re:Keep this out. by WasterDave · · Score: 1

      As a C++ programmer I ... kinda agree actually. But I still don't think running Java stored procedures is a good idea.

      Note that this is a very different kettle of fish from running Java on the server. Server side Java is just getting bigger, basically, and one of the things that is making this happen is increasing scalability.

      However, three tier apps are generally bottlenecked around the database - because by necessity there can only be one of them. Therefore, while stored procedures and triggers are valid parts of the enterprise developers' toolbox, they have to be used sparingly because of how critical performance is on the DB.

      Cheers,
      Dave

      --
      I write a blog now, you should be afraid.
    26. Re:Keep this out. by Anonymous Coward · · Score: 0

      Interland?

    27. Re:Keep this out. by Anonymous Coward · · Score: 0

      Yes, sprocs can kill performance on a large database where you get lots of concurrent queries. However they can significantly boost performance in a small database where reducing network IO is more important than optimizing memory or cpu of the database.

      One way to deal with this would be to write the sprocs in the same language as the middleware. When database load starts to become a problem, it should be fairly easy to move the sproc to the middleware.

      It would still require a lot of work, but it would be a lot cleaner than rewriting the stuff from scratch and would allow you to take advantage of the database when you can.

    28. Re:Keep this out. by Anonymous Coward · · Score: 0

      You can easily have multiples of a dB if you design your system correctly from the get go. Geographical redundancy come to mind?

    29. Re:Keep this out. by esquimaux · · Score: 1

      Gosh, like PostgresQL or Oracle?

    30. Re:Keep this out. by Anonymous Coward · · Score: 0

      You said "lusers" and "java programmers" as if they are two different types of people. I'm confused.

    31. Re:Keep this out. by rifter · · Score: 1

      "Sounds like a job for stored procedures ala Oracle. If MySQL does not have them it should."

      That's the issue -- the poster's complaint actually has nothing to do with MySQL embedding Java in particular -- he's worried that if he allows users to execute stored procedures they can bog down his database.

      Actually, I think that is exactly what the poster is worried about. Correct me if I am wrong, but I had the understanding that Oracle stored procedures were compiled C code. In this case, we are talking about Java which is interpreted. For that and various other reasons, we are dealing with far more impact on the database's performance.

    32. Re:Keep this out. by rifter · · Score: 1

      "But in most shops employing RDBMS, you have one team that maintains the OS, one team that maintains the database, one team that maintains the network, and finally a team that writes and maintains the actual applications. What the poster is probably worried about is being a DBA when some application programmer uses Java badly and then his boss leans on him, as the DBA, to make the process work faster."

      I work in such a company, as an application programmer. Where I work, it's not up to the DBA to make things run faster - if an application is too slow, it's our problem. True, we can call on the various other people to help us in tracking down the cause of the problem, working out what needs to be done to improve the situation, etc, but ultimately it's our responsibility. It may be that the solution is to increase the spec of the machine(s), or upgrade the network, but we'd still be very much involved in coming to that decision.

      So, as a counter example - from my position as a programmer, I'd be rather upset if my otherwise well-performing code is crippled by an underspecced machine or poorly-configured database. I trust the people responsible to do their jobs properly, though.

      And you would be right. I wish that you worked at my company. However, I have run into far too many clueless database application programmers to believe that your attitude is representative of the group as a whole. One thing I have noted is that there is a prevailing attitude among developers and those who hire them that understanding networking, OS, hardware, etc is unneccessary and indeed undesirable. This seems to be worse in database application development than anywhere else.

      What this leads to is a situation where a programmer who not only is clueless in all those areas, but also does incredibly stupid things in their application runs into performance problems they do indeed attack the DBA, the network team, the OS/hardware team, etc and have them spin their wheels over problems that are really application problems. And when they are told what is going on at those levels they do not understand or believe it.

      By contrast, you are correct that underspecced machines or poorly configured databases will screw over the best code in the world. But I think that the poster was complaining of the former situation. :)

    33. Re:Keep this out. by chez69 · · Score: 1

      java stored procedures are just in time compiled (at least in sybase they are) the compiled code is stored. You don't interpret it every time.

      --
      PHP is the solution of choice for relaying mysql errors to web users.
    34. Re:Keep this out. by goodviking · · Score: 1

      I am just sick of seeing little popups and crap on webpages that use Java (real java).

      How how is this a repudiation of the language or it's portability. If these we're implemeted via some sort of embedded perl or python, would these languages suck as well? If someone embeds a trojan or backdoor in some program written in C/C++, does that mean these languages now suck?

    35. Re:Keep this out. by phatsharpie · · Score: 2, Informative

      The usage of Java for online animation has really dropped with the growth in Flash. In fact, for a long while I uninstalled the Flash plugin from my browsers because I was so sick of the ads.

      However, Java has become more relevant in the past 3 to 4 years as a server-side language. J2EE is an excellent web application platform, and tremendous growth has occurred in that arena. Also, J2ME is also becoming more relevant with the growth in cellphones and PDAs that supports it.

      -B

    36. Re:Keep this out. by gumbi+west · · Score: 2, Informative
      The other replys have tried to say this but missed the point. This is an add-on. Not a part of MySQL. You will notice it is not distributed by MySQL.

      As they say in my home country, (to be pronounced with a crazy accent) "If you don't want a monkey, don't buy a monkey."

    37. Re:Keep this out. by Anonymous Coward · · Score: 0
      President Bush has gotten a bigger reelection boost in a shorter period of time than any other president ever. And that may be putting it mildly. Yes, Sherman's taking of Atlanta in early September 1864 was critical to Lincoln's reelection, and Bill Clinton's signing of welfare reform in 1996 assured him a second term. But those don't quite match the gust of good news for Bush between Thanksgiving and Christmas.

      Here's the list: capture of Saddam Hussein, Libyan dictator Muammar Qaddafi's about-face, enactment of a prescription drug entitlement, signing of the first rollback of Roe v. Wade, fastest economic growth in 19 years, quickest pace in worker productivity gains in 20 years, two-decade high in increased manufacturing activity, significant drop in jobless claims, lowest underlying rate of inflation in 38 years, and rock-bottom interest rates. Oh, yes, the stock market: A week before Christmas, the Dow's up 23 percent for the year, 4 percent since Thanksgiving.

    38. Re:Keep this out. by allenthelee · · Score: 0

      And this idiot couldn't be running code in any language embedded in mysql to load things down?

    39. Re:Keep this out. by laird · · Score: 1

      "about. Correct me if I am wrong, but I had the understanding that Oracle stored procedures were compiled C code. In this case, we are talking about Java which is interpreted. For that and various other reasons, we are dealing with far more impact on the database's performance."

      Actually, these days Java is compiled to native binaries (by hotspot), while Oracle's PL/SQL is "compiled" to bytecode that is interpreted. That's why Java stored procedires (in Oracle) generally (though not always) outperform PL/SQL stored procedures.

    40. Re:Keep this out. by Anonymous Coward · · Score: 0
      If they wanted to use portable SQL they probably wouldn't have used MySQL in the first place.

      It's ver hard to wring any form of performance out of MySQL and still use standard conventions. Try anything most compliex than a simple select and watch performance drop all the way to the basement.

    41. Re:Keep this out. by Hognoxious · · Score: 1
      It is a very nice language implementing the very well the OOP paradigm.
      And the OO paradidigm sucks, which is why you have to invent tossy fictitious objects like math so you can attach things like sin() which are, have always been, and always will be functions to them.
      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    42. Re:Keep this out. by Anonymous Coward · · Score: 0
      And remember: Java != Javascript.
      Thanks for enlightening us, you patronising fucktard.
    43. Re:Keep this out. by Anonymous Coward · · Score: 0

      java.lang.Math is a lame workaround because Java isn't OO enough. sin() should be a method of java.lang.Number, as it is in pure OO languages like Smalltalk.

  3. The more support the merrier.. by Dragoonkain · · Score: 0

    Great for mysql! another sweet accomplishment for open source software..

  4. Hmmmm by cluge · · Score: 4, Insightful

    I wonder how this affects performance especially compared to regular user defined functions? (Available in later releases of MySQL). This is indeed an interesting twist. It certainly can help speed up development of large projects (java works well in a large/many programmer env.) Like a lot of other tools, it remains to be seen how people put this to use. Too often people learn one thing, and like the saying goes, when all you have is a hammer, every problem looks like a nail. Lets see where this goes shall we?

    --
    "Science is about ego as much as it is about discovery and truth " - I said it, so sue me.
    1. Re:Hmmmm by Corhonio · · Score: 0

      IMHO using code inside SQL statements defeats the whole purpose of SQL. Since maintenance is the longest part of software lifecycle, I don't see the way a dirty hack like this will help development of large projects. The clean way is using sql statements inside code. Chris.

    2. Re:Hmmmm by MCZapf · · Score: 1

      SQL statements are code, just at a higher level than you're thinking of. Think of putting function calls in SQL as similar to embedding some assembly code into C source.

    3. Re:Hmmmm by Corhonio · · Score: 1, Informative

      SQL is a high level language for querying/getting stuff, it is not a programming language.C and assembly are used for programming at different levels.Mixing the previous two is considered bad software engineering practice and should be used only when it's really needed.
      The puprpose of SQL is not to worry about how to get but what to get.Injecting function calls inside your queries will make your and others life definitely harder especialy in the large projects you mentioned.
      I am quite confident that the above will harm performance ass well.
      Databe functions(!=injecting function calls inside queries) are definitely usefull. MS access is for SOHO/small companys use.
      Chris

    4. Re:Hmmmm by Sxooter · · Score: 1

      OK, here's how it works. You take your logic for how data gets inserted, and you wrap it in a MySQL java function. You then restrict all update / insert access to said function, taking that ability away from users.

      Now, timmy in accounting can program his Vic-20 to insert a payroll record, and no matter how goofy little timmy's BASIC program is, he can't screw up your data, because he doesn't have the power anymore. by restricting all updates to a single code path, you ensure the data cowboys don't go messing up your database.

      And, you can then take your java functions with you to your next flavor of MySQL when you upgrade.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
  5. Krow by Anonymous Coward · · Score: 1, Interesting
    Keep in mind that Krow used to be a VA Linux employee. He posted an occasional slashdot story, but spent most of his time running slashcode


    Rumor has it that he was fired (or was going to be, so he "resigned"). I'd wait a couple weeks to make sure no backdoors are found.

    1. Re:Krow by krow · · Score: 3, Informative

      Auditing the code should be trivial for anyone (judf is actually quite small).

      I resigned because I had been working on Slash for 3 years and wanted to do something new. I rather like the people who run this site, and still follow the development of it and point out feature improvements from time to time. I no longer develop the code myself, except for a few sites that I happen to help with.

      Just to poke another hole in this, if I was fired would I still be an author on the site some 7 months later? I think not.

      --
      You can't grep a dead tree.
  6. Apparently somebody already did by GillBates0 · · Score: 2, Informative
    So when will someone do Ruby?

    MySQL Ruby Interface
    Google Cache here.

    Google's your friend

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
    1. Re:Apparently somebody already did by tcopeland · · Score: 1

      Right, that's a Ruby wrapper for MySQL, but does it allow you to instantiate and send messages to Ruby objects from MySQL?

      I didn't see a way to do that... all the examples look like pretty straightforward query processing.

    2. Re:Apparently somebody already did by proj_2501 · · Score: 1

      that is not the question at hand. you have linked to a connector that allows ruby programs to access a mysql database.

      there is no built-in ruby interpreter in mysql such that you can write functions of mysql in ruby.

      not missing the point is your friend!

    3. Re:Apparently somebody already did by Anonymous Coward · · Score: 0

      what's up with the first link? is that some kind of url spoofing using google?

  7. mysql by Anonymous Coward · · Score: 0

    So now we can integrate java with databases. But first don't we need to port mysql to more platforms? Java's main advantage is compatablity with almost every platform... however, mysql isn't this way.

    1. Re:mysql by Dreadlord · · Score: 1

      untrue, MySQL IS ported to the most popular platforms too, Linux, Windows, Mac OS X, FreeBSD, and more... Please make sure of your facts before posting next time.

      --
      The IT section color scheme sucks.
    2. Re:mysql by wawannem · · Score: 2, Interesting

      I wouldn't say that Java's main advantage is compatablity with almost every platform

      I would say that it is definitely one of Java's advantages. I think this feature is useful from the perspective that more small applications will be written by developers that may not be skilled with SQL coding. Many open source projects start out with one developer, and that single developer might not have an arsenal of skills. That is where this sort of thing helps out, that single developer will now be able to use his/her favorite host-language (if Java is his/her favorite host-language) to solve a SQL problem that he/she may not be capable of solving with SQL. Later on, if/when the project grows, the embedded Java may get removed, but at least something had been released, and the concept gets proven.

  8. database language? by Anonymous Coward · · Score: 5, Funny

    So when will someone do Ruby?
    Warning, engaging humor mode *puts on asbestos suit just in case*

    After someone does perl and python ?

    (notice that both of those languages, as well as tcl, are already included in the other free database project: postgres)

    1. Re:database language? by pHDNgell · · Score: 1

      Ruby, perl, python, tcl, and I believe java language (there's a pljava project, but I'm not sure what the status is on that one) plugins are all available for postgres. Many of them have been there for a while.

      --
      -- The world is watching America, and America is watching TV.
    2. Re:database language? by Scarblac · · Score: 1

      Why do Python when you can just run Jython inside Java inside MySQL?

      *hide*

      --
      I believe posters are recognized by their sig. So I made one.
    3. Re:database language? by Anonymous Coward · · Score: 0

      There also is plphp, but is beta yet.

    4. Re:database language? by tgrigsby · · Score: 1

      I already did Ruby. Of course, I had to give her a Perl before I could give her the Python...

      Oh, sorry, wrong forum...

      --
      *** *** You're just jealous 'cause the voices talk to me... ***
  9. judf uses the Java Native Interface... by tcopeland · · Score: 4, Informative
    ....to start up the Java VM. From judf.cc:
    // Create the Java VM
    jint res = JNI_CreateJavaVM (&jvm, (void **) &env, &vm_args);
    Embedding a Ruby interpreter would reduce startup time, probably.
  10. My bad by GillBates0 · · Score: 3, Insightful

    The above interface allows you to use MySQL via Ruby. What's required here is the converse.

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
  11. Re:Sorry, off topic... by Anonymous Coward · · Score: 0

    what

  12. give me a break by Anonymous Coward · · Score: 0

    How about sub-queries? Or fixing some of the non-SQL92 complaint behavior? Or how about adding TRUE stored procedures? How about enabling transactions (re:innodb) BY DEFAULT? How about replication? Live backup? How about things that make a database really usefull before they add overwrought crap like this?

    Seriously, what does this buy me when I can't even do a sub-query?

    1. Re:give me a break by Anonymous Coward · · Score: 0

      I totally agree. I mean, if the database is well designed and you have a decent SQL implementation, why should you use a another programming language than SQL to query for data? It really doesn't matter how usefull is? If Oracle runs Java stored procedures it doesn't mean we also should impleemnt it.... At least not as a main goal! I personally hate seeing such a mess of languages in a database. Databases are for data!

    2. Re:give me a break by ajaf · · Score: 3, Interesting

      I agree, migrating from another database to mysql is a pain in the ass and impossible, due to the lack of a lot of functionalities you said.
      Postgresql, in the other side, is close to other databases, and migrating to it maybe is a pain in the ass too, but not impossible.
      Last version of Postgresql is really fast, so why should I use Mysql?

      --
      ajf
    3. Re:give me a break by LDoggg_ · · Score: 1

      Or how about adding TRUE stored procedures

      What does the language have to do with whether or not its an actual stored procedure? Do only PL-SQL written stored procedures count as TRUE? - No thanks. Gimme something with actual objects and a clearly defined set of APIs.

      Sub queries would be nice though. And how about sequences, and most of all views.

      Seriously, what does this buy me when I can't even do a sub-query?

      Well, I guess it buys you everything, but not exactly in an elegant manner.
      Consider this:
      Select username, someJavaFucntion(user_id) from users;

      You could do all the sub-selecting you want in the java, just very likely not as effeciently as if it was a more complex SQL statement parsed by oracle.

      --

      "If they have both, tell them we use Linux. And if they have that, tell them the computers are down." -Dave Chapelle
    4. Re:give me a break by Anonymous Coward · · Score: 0

      Sub-queries: out within months when 4.l goes stable.
      Transactinos: why by default? mysql's default settings favor speed.
      Replication: had it for years.
      Live backup: had it for years.

      Stored procedures: nope. not there yet. if you must have them, don't use mysql. but don't pretend mysql is useless to everyone else, just because you don't use it.

    5. Re:give me a break by Anonymous Coward · · Score: 0

      PL/SQL is proprietary. "TRUE" stored procedures would have to use ANSI's specification of SQL/PSM.

    6. Re:give me a break by Anonymous Coward · · Score: 0

      SQL is a terrible language for expressing algorithms. (I don't think it's even Turing-complete--iteration is always finite, and you only get that by joining a dummy table with a "large enough" number of rows.) The more processing you can do at the database, the less often you have to ship all the unprocessed data out to a client (who may not be trustworthy) for local processing.

    7. Re:give me a break by jon3k · · Score: 1

      Transactinos: why by default? mysql's default settings favor speed.

      Because in the real world, we have two pair of mirrored SCSI drives, and you write the TLog to the second set. The delay is almost totally negligible. Tell every company in the world using Oracle and MS SQL that they don't need transactions, no need to rollback failed transactions, and its just slowing them down.

      Puh-leaze.

      If you want mysql to compete as an enterprise DMBS, it needs to be a transaction based system.

    8. Re:give me a break by Anonymous Coward · · Score: 0

      mysql's default settings favor speed.

      No, MySQL's default setting favour laziness

      As in "We're too lazy to add the features, so we'll make the application developers do it, and claim they get a speed increase, when really the opposite is true."

      MySQL is for people who don't really know SQL, and end up re-implementing SQL features in their apps (which slows down development, and makes the application slower.)

    9. Re:give me a break by Anonymous Coward · · Score: 0

      Because the b**ches don't provide you with binaries for windows.
      I'm running @"#%# SQL Server here.. :(

    10. Re:give me a break by Anonymous Coward · · Score: 0

      The point is that people experienced enough to be working on a project that needs transactions will be experienced enough to know it, and enable them, and optimize them. The people throwing together a backend to a blog or a simple ecommerce site don't need transactions, but often need speed (shared servers, low-end hardware, etc.) I didn't say "Transactions are useless and no one needs them." I said that it is not an appropriate default setting for MySQL, a database whose primary feature is speed. Even the kinds of apps that make it into your "real world" (which, incidentally, is a crock) tend to have large portions that are either read-only or are single-user. Those tend to not need transactions, y'know? So to optimize even large apps should abandon transactions when they can.

    11. Re:give me a break by Anonymous Coward · · Score: 0

      Calling MySQL's dev team lazy is just ignorant. It's development speed has been phenomenal. No one is claiming that it's an Oracle-level database, but it sure runs a whole lot of the web without being Oracle-level, doesn't it? Many web applications do not need the full power of SQL, and web apps are what MySQL is primarily used for. My post was about defaults: it's not that MySQL doesn't have transactions it's that their primary users do not need them and should not use them. So, they are turned off by default. As for SQL programming vs. Application programming, Oracle has gone too far, and for their own benefit. Adding another CPU to your web server costs whatever the CPU costs. Adding a CPU to your Oracle server costs you around $10,000. Not to mention making the app less portable. Everyone has priorities MySQL's do not coincide with yours.

    12. Re:give me a break by Anonymous Coward · · Score: 0

      Yeah, ok. But if MySQL doesn't even meet entry level SQL compliance, doesn't support any kind of referential integrity or constraint support, and doesn't provide any kind of transaction support or equivalent correctness facility then WHAT exactly does MySQL do, other than waste time and make idiots look good??

    13. Re:give me a break by mcbridematt · · Score: 1

      Care to give me your IP. I'll have fun playing with your udp port 1434 :) Assuming that you don't have the Slammer patches installed :(

    14. Re:give me a break by Anonymous Coward · · Score: 0

      Calling MySQL's dev team lazy is just ignorant.

      I call 'em as I see 'em. I see people who don't want to tackle issues because they're too hard - that's the epitome of laziness.

      Many web applications do not need the full power of SQL

      No, what you mean is "Most web application programmers don't know the full power of SQL."

      Which just proves my point. The MySQL zealots are the ones who really don't understand SQL, and think they need to code all the features themselves.

      I think you fall conveniently in that category.

    15. Re:give me a break by Anonymous Coward · · Score: 0

      Any database that's ever updated during use needs transaction support (and indeed even MySQL has it to a degree, as inserts or updates to single tables are atomic). It's not using transactions but avoiding them that requires experience--until you understand a great deal about consistency and isolation in database implementations, you're going to see all sorts of bizzare behavior.

    16. Re:give me a break by jon3k · · Score: 1

      Actually, as I understand it, MySQL recently implemented referential constraints into mysql.

      I believe with the introduction of the 4.x.x release(s).

    17. Re:give me a break by Anonymous Coward · · Score: 0

      For suitable values of "implemented". They don't prevent you from dropping the primary key table, for instance (and as usual the InnoDB table type is the only one that actually works).

  13. Sounds like... by AndroidCat · · Score: 3, Insightful
    More code to bog down the servers with. I don't know if I see the need for Java inside the DB server. (Sure, server Java between the DB and the client app, but that doesn't require Java inside the DB server itself.)

    I hope this isn't a "Hey wouldn't it be really neat!" feature. The last time that happened, someone at MS thought executable email would really neat.

    --
    One line blog. I hear that they're called Twitters now.
    1. Re:Sounds like... by laird · · Score: 1

      "More code to bog down the servers with"

      Don't think of it that way. Think of it as "now we can code stored procedures in Java instead of weird, proprietary scripting languages" or "Now we can use MySQL for our application that requires stored procedures"!

    2. Re:Sounds like... by the+uNF+cola · · Score: 5, Insightful

      We all don't like learning the database language of a database. It's annoying that oracle, sybase, postgresql and mysql support different sets of ansi92 (or 98) sql, but they all have different gotchas..

      limiting the # of rows of output is different between oracle, sybase and postresql/mysql.

      None of them even have remotely the same stored proc language. Of course, everyone may embed a different language, but java seems to be a more common one.

      Now when you go from sybase to oracle, you don't have to worry so much about the stored procedure code, since it'd all be in java anyway.. riight?

      --

      --
      "I'm not bright. Big words confuse me. But Wanda loves me and that should be enough for you." - Cosmo

    3. Re:Sounds like... by GreggBert · · Score: 1
      WooHoo !!! Java Stored Procedures, just like in Oracle. One more bullet in my chamber for replacing Oracle with MySql here at work. This isn't everything we need yet, but it's a big step forward and will help address some of the Oracle DBA's concerns with MySql.

      Now, if I could only get them over the whining about having to learn another DBMS in order to support it....

      --


      If you don't understand anything I post, please accept that I ate paste as a small boy...
    4. Re:Sounds like... by MattRog · · Score: 2

      Oracle to PGSQL is a much better choice than Oracle to MySQL.

      --

      Thanks,
      --
      Matt
    5. Re:Sounds like... by AndroidCat · · Score: 1
      That's not so bad then--so long as there's some standard for this Java code, it will hopefully simplify things.

      I'd still worry about someone trying to jam in some huge Java monster code just because he can, but that's why we invented pointed sticks.

      --
      One line blog. I hear that they're called Twitters now.
    6. Re:Sounds like... by GreggBert · · Score: 2, Insightful

      Agreed, however, some of the open source and "developer source" software that I think might be useful to us in the future in our workplace only works with MySql, out of the box. That and the fact that up until recently, PG was not available on Windows which, unfortunately, is one of our production platforms.

      --


      If you don't understand anything I post, please accept that I ate paste as a small boy...
    7. Re:Sounds like... by jon3k · · Score: 1

      You wanted a standardized language ... so you pick Java? JAVA!? /me throws hands up in the air

    8. Re:Sounds like... by Anonymous Coward · · Score: 0
      Java works the same everywhere it's implemented. In fact, it's the only language which provides the compatibility without being slow.

      All others are scripting languages.

    9. Re:Sounds like... by Anonymous Coward · · Score: 0

      You've obviously never actually tried to run java on multiple JVMs and been bitten in the ass by some of the little incompatibilities that showed up.

  14. That link in your sig. by DAldredge · · Score: 2, Funny

    That is the most useless waste I time I have ever seen!

    Now leave me alone as I am going to spend the next 2-3 hours playing with it. Really Cool.

    1. Re:That link in your sig. by tcopeland · · Score: 1

      > That is the most useless waste I
      > time I have ever seen!

      Yeah, I get that a lot :-)

      > Really Cool.

      Thanks!

  15. That's great by j0hndoe · · Score: 5, Insightful

    I used Java stored procedures a lot back when I was working at a .com. For someone who's already using Java its a lot easier than learning each database vendors proprietary language. It's also good for keeping MySQL feature competitive with open source dbs, since Java stored prcedures have already been implemented for PostgreSQL

    1. Re:That's great by Brento · · Score: 2, Insightful

      I used Java stored procedures a lot back when I was...

      Just FYI - MySQL still doesn't support stored procedures, let alone Java inside stored procedures. Seems like MySQL is trying to run before it's gotten the walking thing down yet.

      --
      What's your damage, Heather?
    2. Re:That's great by drfrog · · Score: 1

      amen brother!

      yah and in perl {which i actually requested two years ago!}, c and others too

      lets face it postgresql is way ahead of mysql if you want to do anything but simple selects!

      ok im gonna stop now before i start trolling

      --
      back in the day we didnt have no old school
    3. Re:That's great by krow · · Score: 3, Informative

      Stored Procedures are in 5.0.

      --
      You can't grep a dead tree.
    4. Re:That's great by Tassach · · Score: 1
      Java stored procedures are an idea that sounds neat on the surface, but in reality is completely brain-dead.

      In an N-tier systems, the client and application tiers can scale horizontally -- if you need more horsepower, you just plant another server in the farm. Databases, on the other hand, only scale vertically (Even the heavyweight commercial enterprise-grade databases have difficulty scaling horizontally)

      If your DB server can't handle the load, pretty much your only choice is to buy a bigger one. If this means going from a uniproc machine to a dual proc machine, the cost increment isn't huge; however, the cost of going from a 4-way to an 8-way or larger box is huge.

      Java stored procedures just don't scale -- primarily because they suck resources like a pig. Database performance is typically limited by disk I/O and physical memory. If you have to run a Java VM and a bunch of java classes, that's a huge amount of memory that's getting sucked up -- memory that should be used to cache data. In my personal experience, the performance impact is at the order-of-magnitude level.

      MySQL is not competitive with Postgres; and Postgres is not competitive with any of the commercial databases. As far as I'm concerned, MySQL is a worthless toy. If you are going to go to the trouble to write a client/server system, do it right and use a REAL database. The extra effort to do it right will pay of the long run.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    5. Re:That's great by GreggBert · · Score: 1
      MySQL is a worthless toy...

      Well, seeing how this "worthless toy" is responsible for storing your message and millions others like it here on /. I'd say it was more than a mere toy. For some applications (forums, web logs, archives, etc), MySql is more than enough to handle the load if the application is designed correctly and it sure beats paying for an Oracle license where one is not needed.

      --


      If you don't understand anything I post, please accept that I ate paste as a small boy...
    6. Re:That's great by jon3k · · Score: 1

      Get horizontal, check out TeraData. =)

      http://www.teradata.com/

    7. Re:That's great by Brento · · Score: 1

      Stored Procedures are in 5.0.

      5.0 isn't out yet - it's a development tree. That's like saying MS SQL Server has C#-based stored procedures - it will, in the next version, but the current public version does not.

      --
      What's your damage, Heather?
    8. Re:That's great by Anonymous Coward · · Score: 0

      MySql is more than enough to handle the load if the application is designed correctly

      No, if the application was designed correctly, it wouldn't be able to use MySQL at all, because MySQL doesn't have the features required to do things correctly.

    9. Re:That's great by krow · · Score: 1

      I will grant you that.

      I have it running right now and I know it is working for others.

      That and I know for a fact that the first binary release is pretty close to happening :)

      --
      You can't grep a dead tree.
    10. Re:That's great by Anonymous Coward · · Score: 0
      ok im gonna stop now before i start trolling

      Oops! Too late!

    11. Re:That's great by Tassach · · Score: 2, Informative
      The fact that /. uses MySQL is irrelevant. ./ is not a mission-critical system -- it too is, at the end of the day, nothing but a toy. It's not a serious business system. There's no significant consequence if a message gets lost or garbled; it doesn't matter that transactions are processed in a certian order; it doesn't really matter if it's security is compromised. In fact, ./ has very minimal requirements and there are a lot of other products which would be equally adequate as well: a flatfile system like maildir, an ISAM system like dBase, or a pseudo-relational database like MySQL or MS-Access. If you're building a toy system, a toy database might be sufficient.

      MySQL lacks several essential features which necessary to implement a proper client/server application -- stored procedures and transactions most of all. Stored procedures are essential for several reasons: security, performance, and efficiency. Stored procedures have better performance because they are pre-compiled; there's significantly less overhead to call an SP than there is to process an ad-hoc query. Stored procedures make programming more efficent because you can write a single, complex set of queries and re-use it across multiple clients.

      Perhaps most importantly, stored procedures have several security advantages. If your database allows ad-hoc queries to run against it, it is vulnerable to an injection attack -- an attacker could potentially run any SQL query he wants against your database (EG: update Account set balance = 1000000 where AccountNumber = 123456). A stored procedure acts similarly to a setuid/setgid program in unix, in that it runs with it's owner's permission instead of the user's. This means that you can allow a user to modify a table in a single, very specific manner that they would otherwise not be allowed to touch. Good security is achieved by defense in depth, and stored procedures give you an additional layer of security.

      If cost is a concern, then there are alternatives to Oracle: Postgres is signifiantly closer to being a real database than MySQL; and there are zero-cost licenses available from several of the commerial database vendors. Most notably, Sybase 11.0.3.3 for Linux is available at no cost for any purpose. While a little dated compared to more recent releases, it is still far more mature than any open-source database. Open-source advocacy (zealotry) should never get in the way of making sound engineering decisions.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    12. Re:That's great by Anonymous Coward · · Score: 0
      For someone who's already using Java its a lot easier than learning each database vendors proprietary language.
      As opposed to Sun's proprietary language?
  16. I would by Anonymous Coward · · Score: 0
    So when will someone do Ruby?"

    Oh, I would do ruby any day any time. Oh ruby

    1. Re:I would by Anonymous Coward · · Score: 0

      mmm, I'm imagining a cute japanese girl with bright-red hair in ponytails, named ruby.

      is that sad and pathetic? I'm not sure.

    2. Re:I would by LDoggg_ · · Score: 1

      Jack Ruby?

      Gross dude.

      --

      "If they have both, tell them we use Linux. And if they have that, tell them the computers are down." -Dave Chapelle
  17. Re:Sorry, off topic... by Anonymous Coward · · Score: 0

    It's not off-topic because after how many years Slashdot still hasn't made a place for us to talk about the site. They also slam posts like this down to -1 if the mods don't do it for them.

    Posted anonymously to save my karma.

  18. two faces of a coin by Anonymous Coward · · Score: 0
    I'm sure there are plenty of developers saying "Sweet, that's way cool. I can use my beans in mysql." While DBA are probably saying "oh geez, now the developers are gonna want to use java in the db. yet another thing to lock down."

    there are cases where an application may want a message sent from the database using a trigger to call java. I don't know if mysql supports triggers. Of course, databases like Oracle, DB2 and Sybase already support these features. And Microsoft's next release of sql server (Yukon) will have .NET triggers a standard feature. This of course is copied from other databases, but MS is claiming it a grand new feature and move forward for database servers.

  19. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  20. Obligatory comment/troll by Znonymous+Coward · · Score: 0

    about how much MySQL is not ready for the enterprise eventhough it actually is.

    --

    Karma: The shiznight, mostly because I am the Drizzle.

    1. Re:Obligatory comment/troll by jon3k · · Score: 2, Interesting

      Obligatory comment/troll about how much MySQL is not ready for the enterprise eventhough it actually is.

      Spoken like a true linux zealot with absolutely no foundation in relational data management.

      Do you realize that referential integrity is a fairly new feature in MySQL? Do you understand the reasoning behind a transaction based DBMS? How about the simple normal forms layed out by Boyce and Codd?

      Anyone who's done any extensive DB work will tell you how lacking MySQL is. I *love* linux, its the only OS I run at home, and I follow the progress of the MySQL project with an almost religious fervor. I can't *WAIT* until it can compete in a production environment .. but its just not there yet. I'm counting the days until I can get this overpriced trash off our database servers. :(

    2. Re:Obligatory comment/troll by Anonymous Coward · · Score: 0

      I'm counting the days until I can get this overpriced trash off our database servers.

      Try Postgres. It's as fast as MySQL (faster under heavy load), and has more features (much closer to the "big boys".)

    3. Re:Obligatory comment/troll by Anonymous Coward · · Score: 0

      And it's ACID compliant.
      Data, what data?

  21. Re:Sorry, off topic... by Flabby+Boohoo · · Score: 0, Offtopic
    Advert in the Paul Allen story. Here is the image:

    Here

  22. Re:waaaaiiiit a minute... by tcopeland · · Score: 3, Informative
    > you are storing java functions/objects
    > in the database?

    Nope, they're external to the DB.

    > program your own functions like
    > insert/modify/etc in java

    You can program functions in Java, and then call them from MySQL queries. From the README:
    To run the sample Java DBMS function
    mysql> SELECT judf("test/GreenBar", COLUMN1, COLUMN2) FROM foo;
    Nifty!
  23. Production Quality OpenSource! by Anonymous Coward · · Score: 3, Funny

    Yay, this project has finally hit Alpha 3 version 0.1, which means that it's the closest OpenSource project yet to a 1.0 release.

    Yes, I'm being sarcastic, I just think it's hilarious that someone would post this implying that the code is anywhere near done. It's barely beyond a twinkle in some kids eye.

  24. JMS? by Anonymous Coward · · Score: 1, Interesting

    If you have java in the database, it will make it possible to integrate JMS (messaging). A lot of the big databases let you do this, e.g. have a trigger that sends a message to invalidate a cache entry. That sort of thing can be useful.

  25. Neat... by gamlidek · · Score: 1

    Now if only I can convince management that this is good. =/

    -gam

    --
    "In theory, theory and practice are the same; in practice, they are not."
  26. Postgresql by Anonymous Coward · · Score: 0

    I like mysql, I use it for my websites, but I think postgresql is ahead with a lot of more functionalities, and last version is really fast, and this is the point where a lot of people use mysql.

    1. Re:Postgresql by The+Unabageler · · Score: 1

      also, postgresql has had support for adding third party languages for writing inline db functions for quite a while.

      --
      perl -e '$_="\007/4`\cp%2,".chr(127);s/./"\"\\c$&\""/gees; print'
  27. Nativily? by Otter · · Score: 1
    Eric Herman and MySQL's Brian "Krow" Aker have released code to allow the DBMS MySQL to run Java nativily inside of the database.

    "Nativily"? Boy, the Christmas spirit is just busting out everywhere today!

  28. Java in the DB - very, very bad idea by BigGerman · · Score: 3, Insightful

    The ability to write stored procedures in Java has been in Oracle for some time but I still cannot figure out why anyone would do that.
    Java is a nice programming language. Go write web apps, middleware, network software, desktop apps with it but not stored procedures.
    Is mySQL process going to start the whole new JVM on every hit? Or VM is going to run separately and it is bridged somehow (God, not over the network)?
    Now if you ask me, even stored procedures in general become more and more evil.
    And in our age of $50 2Ghz CPUs and Gigabit ehternet the performance is no longer an issue.
    To me, a database is a collection of tables and indexes with referencial integrity, failover and redundancy. It should do just one thing and do it well. Attempts to add features like that seem to be just a marketing thing by their new commercial overlords.

    1. Re:Java in the DB - very, very bad idea by tcopeland · · Score: 4, Informative
      > Is mySQL process going to start the
      > whole new JVM on every hit?

      No. Look at judf.cc. There's a judf_init and a judf_deinit. judf_init starts up the VM and hangs on to it in here:
      static JavaVM *jvm = NULL;
      Seems to make sense - start the VM once, call it as many times as you want.
    2. Re:Java in the DB - very, very bad idea by laird · · Score: 5, Informative

      "The ability to write stored procedures in Java has been in Oracle for some time but I still cannot figure out why anyone would do that."

      Here are some reasons:

      1) Java runs _way_ faster than PL/SQL. This is because lots of people have been working in making Java run very efficiently compared to PL/SQL. I've seen people port from PL/SQL to Java stored procedures justified purely by increased system performance.

      2) It allows for consistent coding between database-resident and application server-resident code. This means that you don't need to train people in two very different languages to get work done.

      3) It allows for code portability between the database and application-server. This lets you tune performance. For example, if you have some code that does tons of database I/O, it may run far more efficiently inside the database rather than accessing the database across a network.

      I don't know how well the MySQL guys integrated Java yet, but in Oracle it's pretty wonderful compared to using their weird, slow, proprietary language.

    3. Re:Java in the DB - very, very bad idea by randolfe · · Score: 5, Interesting

      The knees jerk so fast on /. whenever Java is mentioned, in any context, that I'm surprised someone doesn't have their eye put out.

      Of course there exist myriad reasons why one would prefer to standardize on a common language for DB SPs. Java, in this regard, is the most mature alternative at present. Even the notoriously skeptical Thomas Kyte and the pontificating Steven Feuerstein see the validity of Java in the database at the SP level.

      Of course, *we* can all keep fighting amongst ourselves about such things while Visual Basic and C(flat) become the only languages we have to chose from for everything we endeavor to do.

    4. Re:Java in the DB - very, very bad idea by marktoml · · Score: 1

      >) Java runs _way_ faster than PL/SQL. This is because lots of people have been working in making Java run very efficiently compared to PL/SQL. I've seen people port from PL/SQL to Java stored procedures justified purely by increased system performance.2) It allows for consistent coding between database-resident and application server-resident code. This means that you don't need to train people in two very different languages to get work done.3) It allows for code portability between the database and application-server. This lets you tune performance. For example, if you have some code that does tons of database I/O, it may run far more efficiently inside the database rather than accessing the database across a network.

      Yep, and it would run more efficiently there in any language (how about PL/SQL exposed as a web service?)

      It is a nice option to have and in certain cases the JVM in the database is vastly more scalable than your client or middle tier (if that is where you major horsepower is). Sadly, like most performance choices, it is never cut-and-dried.

    5. Re:Java in the DB - very, very bad idea by jrexilius · · Score: 1

      Sometimes people make choices and trade-offs between system characteristics (maintainability, standardization, security, portability, performance, etc. etc.). I see this as simply an additional method for balancing these things in system design.

      I also understand peoples initial negative reactions to new features (based on experience where a tool or feature intended for intelligent use gets abused and misapropriated).

      I personally would like to see this idea extended (and improved) to offer more options for distributing logic/work flow/data and making finer tuned decisions on balancing system characteristics.

      Its not a bad idea. And if stupid people apply it poorly thats all the better for my career. ;-)

    6. Re:Java in the DB - very, very bad idea by Anonymous Coward · · Score: 0

      I'll agree 90% with you. That said, the performance difference between Java and PL/SQL depends on what you're trying to do. Heavy calculations, rollups, things like that, Java rocks. If you have a lot of DML going on, PL/SQL still has the edge (according to Oracle). I ported some Java SP's back to PL/SQL this week, and it now runs orders of magnitude faster.

      Disclaimers: 1) Oracle 8.1.7. Java Performance may have improved in 9i+. 2) I'm a much better PL/SQL coder than Java. I'm sure that a Java Guru could have made the code faster without going back to PL/SQL. 3) I know, I know, one test does not a case make, but still...

    7. Re:Java in the DB - very, very bad idea by Anonymous Coward · · Score: 0

      from Oracle 8i and newer, the VM is at the same level as normal Sql. So the primary reason java triggers are slow is because the person coding the java did a bad job. It's just that bad java code running in a database has a much greater impact than bad java code running in a webserver. For the same reason TPC benchmark use embedded C/C++ code to accelerate transaction processing, there are valid reasons for embedding a JVM inside a database.

    8. Re:Java in the DB - very, very bad idea by ryanvm · · Score: 1

      The knees jerk so fast on /. whenever Java is mentioned, in any context, that I'm surprised someone doesn't have their eye put out.

      You must have knees like Olive Oil.

    9. Re:Java in the DB - very, very bad idea by nettdata · · Score: 1

      and in certain cases the JVM in the database is vastly more scalable than your client or middle tier

      Very true. I think that the coolest thing was probably how Oracle re-coded their threading and garbage-collection code to allow for HUGE scalability.

      We were doing some benchmarking and found that our app "died" at about 3,000 sessions (as defined by us) in the tweaked/tuned native JVM, whereas the Oracle JVM handled almost 150,000 before croaking.

      We were also messing around with hacking JavaSpaces and RMID to run within the Oracle JVM, and the initial performance and fault-tolerance findings were very impressive.

      --



      $0.02 (CDN)
    10. Re:Java in the DB - very, very bad idea by Anonymous Coward · · Score: 0

      "1) Java runs _way_ faster than PL/SQL. This is because lots of people have been working in making Java run very efficiently compared to PL/SQL. I've seen people port from PL/SQL to Java stored procedures justified purely by increased system performance."

      You are joking, right? Do you have any proof that Java is faster than PLSQL? I don't think the finest-tune Java code can EVER be as fast as the finest-tune PLSQL. To invoke Java Stored Procedures, you have to run the PLSQL call spec first. Furthermore, you can set to compile the PLSQL code natively.

      I think the best argument to run Java inside the database is because Java has a rich set of APIs. You can use Java APIs to make your life much easier (i.e. without writing and testing a lot of codes).

      Image how long will you take to write something like a String tokenizer in PLSQL (i.e. parse a string with delimiter of ",", " ", ";", etc). It will be very long time because you have to write everything because PLSQL does not have a StringTokenizer package. On the other hands, if you can use Java, you can just use StringTokenizer.

    11. Re:Java in the DB - very, very bad idea by Anonymous Coward · · Score: 0

      "I think the best argument to run Java inside the database is because Java has a rich set of APIs. You can use Java APIs to make your life much easier (i.e. without writing and testing a lot of codes)."

      Yes, this is 100% correct. Couldn't agree with you more on this.

      I also think that company can hire more Java programmers than a PLSQL programmer to work on the database.

    12. Re:Java in the DB - very, very bad idea by laird · · Score: 2, Informative

      Well, in my experience Java stored procedures are faster than PL/SQL stored procedures, and Oracle says that that's typically the case, but I don't have benchmarks.

      I agree that the strongest argument for running Java inside the database is because Java ia full featured programming language. Your example with string parsing sent shivers down my spine.

  29. Silent Night. Server Side Night. by Anonymous Coward · · Score: 0

    >nativily

    How temporally apropos. In another few days it'll be time to celebrate the Nativily. Amen.

  30. Or Python? by Qa1 · · Score: 2, Insightful
    So when will someone do Ruby?
    Or Python?
    1. Re:Or Python? by d99-sbr · · Score: 1

      Well, now that you have Java, why not just use Jython?

      (Jython is a Python interpreter written in Java)

    2. Re:Or Python? by BenjyD · · Score: 1

      A program written in an interpreted language running on an interpreter running in a virtual machine running from inside a database? It's madness, I tell you!

    3. Re:Or Python? by Anonymous Coward · · Score: 0

      My cousin Hubert tried it, but got sent back in time.

      At least, that's what the family told me.

    4. Re:Or Python? by GooberToo · · Score: 1

      Just use PostgreSQL and be done with it. PostgreSQL already supports, Java, Python, Perl, tcl, PL/SQL, and probably many, many more that I'm forgetting.

    5. Re:Or Python? by The+Unabageler · · Score: 1
      postgres does, and has done for a while:
      Server-side user defined functions can be written in several languages: C SQL PL/pgSQL (very similar to Oracle's PL/SQL) Tcl Perl Python (alpha) Ruby
      --
      perl -e '$_="\007/4`\cp%2,".chr(127);s/./"\"\\c$&\""/gees; print'
    6. Re:Or Python? by Doug-W · · Score: 1

      Which just means that we need to run the database under a linux instance of vmware running on an XP, in VirtualPC on an G4 OSX box someplace!

  31. Re:Sorry, off topic... by XaXXon · · Score: 0, Offtopic

    Yeah, I'm glad I wasn't the only one who noticed that. That actually kinda bugs me. I mean.. I know /. is a business and needs to make money, but are they going to start selling X11 cameras next? Selling my email address? Personals are only one step away...

  32. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  33. So when will someone do Ruby? by Trigun · · Score: 2, Funny

    Give me a bottle of scotch, a phone number, and cab fare.

    And a camera.

    1. Re:So when will someone do Ruby? by NoNine · · Score: 0

      Gotta mod this as funny!

    2. Re:So when will someone do Ruby? by Anonymous Coward · · Score: 0


      right on brother!
      Big girls need love too!

  34. Oracle already does this... by XaXXon · · Score: 5, Informative

    The thing no one seems to have mentioned is that Oracle already does this and has for many years. I can't find any docs on it off-hand, but I know you can just drop a .jar file into Oracle and it will let you do similar stuff. This is nice because it lets you use a common language for doing your stored procedures instead of learning a different language for each database (e.g. Oracle uses PL/SQL).

    People who are saying "what's the use of this" or "This is just going to bog down the database" most likely have never worked in the industry. Stored procedures are a very common part of large systems and adding this functionality to MySQL will go a long ways in promoting MySQL use in bigger companies.

    1. Re:Oracle already does this... by Anonymous Coward · · Score: 0

      they're called java triggers. basically, you write a piece of java code and call it like a function. I know some messaging middleware using java triggers to send out messages and trigger other processes. Java triggers are powerful, but it's very easy to abuse. A couple years back, we implemented password encryption using a java class and used a java trigger to encrypt it.

    2. Re:Oracle already does this... by KenSeymour · · Score: 3, Informative

      Yes Oracle has this. IIRC so does DB2.

      One place where I worked, they had a bunch of Java stored procedures doing things you could have done in PL/SQL.
      They later re-wrote them because the performance is so much worse.

      There are, however, things it might make sense to do in a Java Stored Procedure. Publishing a message using JMS from a trigger is an example.
      I am not sure if Oracle has created utility packages so you could do it from PL/SQL.
      But having a Java stored procedure in this case would allow you to use the same message class that is used by the subscribers to the message.

      I don't think this will bog down non-Java users of MySQL.

      Years ago, when I was using DB2, I noticed that they had external stored procedures that could be written in nearly any language. C, Java, COBOL, you name it.

      --
      "We can't solve problems by using the same kind of thinking we used when we created them." -- Albert Einstein
    3. Re:Oracle already does this... by Anonymous Coward · · Score: 0

      Why is everyone talking about stored procedures? From the article and the freshmeat summary this allows you to define Java functions that can be used in queries, e.g. mathematical or statistical functions. I see no mention of manipulating the database with Java, which is what a stored procedure is.

    4. Re:Oracle already does this... by Cajal · · Score: 1

      Stored procedures are a very common part of large systems and adding this functionality to MySQL will go a long ways in promoting MySQL use in bigger companies.

      True, but there are so many other barriers to using MySQL in "bigger companies" - like its near total lack of integrity checking, its penchant for silently altering table schema and types and for silently altering data. And, frankly, I'd rather not trust anything mission-critical to some brand-new, untested implementation of stored procedures in MySQL, when other databases (PostgreSQL, Phoenix, etc) have had these abilities for years.

    5. Re:Oracle already does this... by mabu · · Score: 1

      Oracle's PL-SQL is a NIGHTMARE. While it does work, the language of their stored procedures is so inconsistent and archaic that it boggles description. Just the error messages alone from PLSQL send most new developers off on a wild goose chasing trying to figure out what's actually wrong. But it would be nice to have stored procs and functions within MySQL. Even PHP extensions within MySQL would have been my choice over Java.

    6. Re:Oracle already does this... by jpkunst · · Score: 1

      Even PHP extensions within MySQL would have been my choice over Java.

      Such a thing actually exists: myphp. It's very early in development (version 0.1) and it's not useable for real work yet. But it looks interesting.

      JP

    7. Re:Oracle already does this... by thentil · · Score: 1

      I can only guess that everyone is talking about stored procedures because they assume a database as 'talked about' as MySQL is *has* stored procedures (which it doesn't, until v5 is released -- last I saw, it was in alpha). From what I can see, I agree - this has little to do with stored procedures.

    8. Re:Oracle already does this... by drinkypoo · · Score: 1

      Years ago, when I was using DB2, I noticed that they had external stored procedures that could be written in nearly any language. C, Java, COBOL, you name it.

      IIRC DB2 is from OS/400, yes? When I took my AS/400 class in Raleigh (all of which I have now forgotten from disuse) they told us that using OS/400 you can link together modules (or equivalent) from multiple languages into a single executable/program. Java, COBOL, C, whatever.

      OS/400 is clearly bitchin'. People look at me funny when I tell them this, but I stand by my belief.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    9. Re:Oracle already does this... by _fuzz_ · · Score: 1
      Oracle's PL-SQL is a NIGHTMARE. While it does work, the language of their stored procedures is so inconsistent and archaic that it boggles description.

      I didn't think it was that bad. It was actually a lot cleaner reading than Java stored procedures in Oracle. JDBC just obfuscates simple things. SQLj does help that situation, though.

      The thing I liked about PL/SQL the best was how well the cursors worked. That makes a HUGE difference for some tasks.

      --
      47% of all statistics are made up on the spot.
    10. Re:Oracle already does this... by _fuzz_ · · Score: 2, Informative

      The interesting thing about Oracle is that it doesn't use a standard JVM. They call it "way-ahead-of-time" compilation instead of "just-in-time" (JIT). The java bytecode is compiled into native code and optimised at the time the stored procedure is installed. Pretty good idea if you ask me.

      --
      47% of all statistics are made up on the spot.
    11. Re:Oracle already does this... by nettdata · · Score: 1

      Actually, some of the apparent "DBMS_*" utility packages are just wrappers for Java procedures, like the DBMS_SMTP packages to send emails.

      --



      $0.02 (CDN)
    12. Re:Oracle already does this... by Sxooter · · Score: 1

      FYI, the beta3 of plphp for postgresql is out, and after having tested it, it's pretty cool, and seems to work quite well.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
  35. Well... by DAldredge · · Score: 1

    Since the main page of slashcode.com hasn't been updated since August 30, 2003 perhaps he doesn't work on that site anymore?

    1. Re:Well... by krow · · Score: 1

      Bingo :)

      --
      You can't grep a dead tree.
  36. Re:Sorry, off topic... by Flabby+Boohoo · · Score: 0, Offtopic

    That was want I was hinting to.. it is kinda creepy really. Oh, and at least we get moderated into the ground.

    Thanks!

  37. Where is MySQL anyways? by Chitlenz · · Score: 5, Interesting

    As an Oracle DBA, at a small company, we're constantly looking for less expensive SOLID alternatives to our traditional Oracle/Solaris approach to the back end.

    When I say solid, I mean is able to handle very large files (excess of 50GB per datafile), has stored procedures and trigger infrastructure (a traditional MySQL weak point, and the main reason we've passed on it so far), an integrated backup system a la netbackup/RMAN, and prefereably a back end compiled scripting solution a la PL/SQL.

    This looks like a sorta kinda solution to the last (PL/SQL alternative), but I'm curious to know about the rest, and also how it performs. Ideally for us, we'd also like to see better clustering and large system support examples in the real world before we embarked onto this particular voyage with.. say a production ERP system.

    Are we talking about a good replacement for Access or for DB2 here?

    Enquiring minds want to know ...

    -chitlenz

    --
    Imagination is the silver lining of Intelligence.
    1. Re:Where is MySQL anyways? by Anonymous Coward · · Score: 0
      Are we talking about a good replacement for Access
      A flat file is a good replacement for MS Access. MySQL 5.0 will support triggers and stored procs.
    2. Re:Where is MySQL anyways? by BigGerman · · Score: 5, Interesting

      Postgresql seems to be the ticket.
      I have been doing Oracle work for 12 years and find Postgres easy to learn and quite powerful.
      Certainly ref integrity, triggers and PL/SQL like stored procedures are all there.
      I currently have 80GB PostgreSQL database as a backend for pretty busy websites and it holds well.
      THIS is not a solution, just a proof of concept. I looked at the code and it is not even thread-safe.

    3. Re:Where is MySQL anyways? by __past__ · · Score: 1

      Well, don't just look at MySQL. Maybe PostgreSQL, SAP DB or Firebird is an option for you, each of it has satisfied users that will assist you in evaluating them (well, I guess so. I never met any SAP DB user, satisfied or otherwise, but there must be some...)

    4. Re:Where is MySQL anyways? by jdgreen7 · · Score: 5, Interesting

      We ended up moving all of our scattered Access Databases to MySQL about a year ago, and have never looked back. We still use Access as a front-end to get at the data, and everything has worked beautifully. Using Access gives us a consistent UI for each app, and it's quick and relatively painless to add new apps or features. And, using MySQL for the data is orders of magnitude faster that Access MDB files.

      As far as 'enterprise level' features, MySQL is still missing Stored Procedures, easy 2-way replication, and clustering (there are many projects out there that add these features, but none of them are included in the main branch AFAIK). They keep getting closer with each release, though.

      No, it's not ready to take on Oracle yet, but for mid-size shops (we regularly have 30-50 concurrent users all day from various remote locations), it's a great product. Slashdot runs it, and they seem to be able to handle quite a bit of a load. It's proven itself to me, but then again, I've never played with Oracle or DB2. It has a very active developer base, so things are changing all the time.

      PostgreSQL has more enterprise features, but it's not used as much as MySQL. It seems pretty solid, though. We toyed with a bit, but my boss decided to go with MySQL mainly because he had heard of it before.

    5. Re:Where is MySQL anyways? by Anonymous Coward · · Score: 0
      It's not free software, but it is just what you want:


      http://www.intersys.com/

    6. Re:Where is MySQL anyways? by Anonymous Coward · · Score: 0

      SQL Server - enough said.

    7. Re:Where is MySQL anyways? by jadavis · · Score: 3, Informative

      PostgreSQL has more enterprise features, but it's not used as much as MySQL. It seems pretty solid, though. We toyed with a bit, but my boss decided to go with MySQL mainly because he had heard of it before.

      Yeah, postgres has always had a recognition problem. I like it because of the data integrity features, and the only feature I would really like is point-in-time-recovery (incremental backup, whatever you want to call it).

      It's strange how much recognition matters, even when postgres runs the .info registry, the .org registry, and I think the american chemical society has a database >1TB. I'm a postgres fan, so it's a little disappointing to see it rejected like that. I think it will help a lot when they get the windows port out.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    8. Re:Where is MySQL anyways? by doom · · Score: 1
      PostgreSQL has more enterprise features, but it's not used as much as MySQL. It seems pretty solid, though. We toyed with a bit, but my boss decided to go with MySQL mainly because he had heard of it before.
      Yes indeed. The McDonalds of the database world.
    9. Re:Where is MySQL anyways? by Hairy1 · · Score: 1

      Oh no, not another Oracle DBA. It seems that Oracle DBA's are trained into believing that everything should be done in stored procs, and that a database must have all the latest features that Oracle have dreamed up in order for it to be a good product.

      I run a software company, and have made the decision that I will not use stored procs or product specific SQL. Where possible everything we do is cross platform in terms of databases. To date I have personally done a MS-SQL to Interbase, MS-SQL to Postgres and Access MDB to Postgres transition.

      In each case the move took less than a days work, mostly dealing with issues around how different databases handle autoincrementing fields for ID's.

      Oracle has a interest in having as much of your projects investment within Oracle. This way it makes life very difficult to change databases - you will have to throw away all that code and reimplement it.

      However, if you decide from the start that you won't do it that way, then you are free to move between databases. Does that mean you have to give up on some cool features - yes. The OO type features of Postgres are great, and I would love to use them - if only they were supported on other databases.

      The problem is that my products may be sold into companies that insist on MS-SQL, or Oracle, or whatever else. How can you do that if you tie yourself to a specific DB?

  38. Re:Sorry, off topic... by Anonymous Coward · · Score: 0

    Gee, glad I'm not the only one noticing...
    I mean, they could at least find a geeky-looking girl to show on the ad... :)

  39. Re:Sorry, off topic... by Anonymous Coward · · Score: 0

    continually post it with your excellent karma like a FP until you have no karma left or until they take it down.

  40. Re:Sorry, off topic... by Anonymous Coward · · Score: 0


    to please a women...

    Don't write freakin emails!!
    Use a pen and paper. It makes you think about what you write before you write it, and its much more romantic. Women love keeping the letters as keepsakes.

    Don't be a pussy. Women actually hate this.

    Look up "latter theory" on google if you want more bullshit ;)

  41. Great! by butane_bob2003 · · Score: 0, Redundant

    So I can have imbedded Java code in my imbedded SQL code, which is imbedded in my Java programs! I could see that getting really unmanagable. I'd like to see less SQL code in my Java code, I wouldnt know what to do If I started seeing Java code in my SQL code in my Java code. Ok you get the point. Maybe I didnt.

    --


    TallGreen CMS hosting
  42. Re:Sorry, off topic... by Anonymous Coward · · Score: 0


    I can't spell "ladder"
    i'll go kill myself now.

  43. Security by pantycrickets · · Score: 1

    Doesn't this open sort of a large can of worms from a security standpoint?

  44. Why you would do this . . by database_plumber · · Score: 3, Interesting

    This idea has been around for a while; at least since the late 1980's. The motivation for these kinds of DBMS features is that there are lots of programming situations where SQL's types and expressions aren't powerful enough, and that the language doesn't have a lot of modularity. User-defined functions are supposed to overcome this limitation.

    This kind of feature brings MySQL closer to being an "Object-Relational" database.

    http://en2.wikipedia.org/wiki/Object-relational_da tabase

    From a theory point of view it goes a long way towards implementing the Relational Model's idea of a 'domain' (not just INTEGER, VARCHAR or whatever, but PART_NUM, PERSON_NAME etc). This is supposed to improve the integrity of the data in the database.

    From a practical systems point of view it can have a big performance impact. If you're opening cursors and then looping over some Java code on the client to identify only those result rows that you're interested in, then you're paying a pretty big 'system tax' to transfer the data from the DBMS through the connection and into the external program's address space. Pushing the code (which will have to run anyway) into the DBMS eliminates the transfer overhead.

    The point of the original Postgres was to figure out how you incorporate these features into a query processing framework. Most modern DBMS products have the feature; some of them do a better job implementing it than others.

  45. Re:Sorry, off topic... by blugu64 · · Score: 0, Offtopic

    dude I thought somthing was up with those ads. I saw it and thought it was a joke or somthing....so I clicked fully expecting it to be a "Gottcha" page....man was I surprised..

    --
    "Personal ownership is a hallmark of conservative capitalism. And I don't believe I am entitled to anything that I did n
  46. Performance Performance Performance by Anonymous Coward · · Score: 0

    I work with Oracle's Application suite on a daily basis, and I can assure you that poor performance is a HUGE problem. All others pale in comparison.

  47. Re:Why by XJEEP.org · · Score: 1

    it allows for stored procedures.

  48. It would be if it were true. by Anonymous Coward · · Score: 1, Insightful

    Java is not well supported. Linux, solaris, windows, on x86 or sparc. That's about all that falls in the "well supported" category, maybe macosx. Other OS's and/or architectures have old, broken, or just plain don't have jdks. Maybe if Sun didn't insist on trying to control java in every way, and made it open, then it would really be something. But as is, its just as portable as C#.

    1. Re:It would be if it were true. by Anonymous Coward · · Score: 0

      >Linux, solaris, windows, on x86 or sparc

      That seems more portable than C# to me.... and you even forgot AIX (which is very well supported for Java).

  49. Re:Sorry, off topic... by Anonymous Coward · · Score: 0


    dude I thought somthing was up with those ads. I saw it and thought it was a joke or somthing....so I clicked fully expecting it to be a "Gottcha" page....man was I surprised.


    Yeah, but it still looks like just a link into the Match.com personals database. I mean, is there really a section "devoted" to slashdotters? Or do we end up in the pot with the rest of the single population, in which case, we don't stand a chance. :)

    [posted AC to avoid the 'offtopic' moderators]

  50. MySQL java appserver? by Doc+Ruby · · Score: 1

    Now can I run a MySQL server as an appserver, with SQL selectable java objects? I want mobile Internet java objects to travel among a directory of MySQL appservers, connected to live data through the sandbox.

    --

    --
    make install -not war

    1. Re:MySQL java appserver? by baka_boy · · Score: 1

      This doesn't put a SQL interface on top of Java objects, or even support serialization of said data to rows in the database. It just lets you extend the range of user-defined functions (i.e., data type conversions, aggregate operators, etc.) to those implemented in Java.

    2. Re:MySQL java appserver? by Doc+Ruby · · Score: 1

      Yeah, but with an embedded, callable JVM, can't a SQL query call a function defined in Java that uses the classloader to load a java object from a table, and run it? That class table could be filled with data arriving from the Internet. That architecture supplies the basics of an appserver, which could be fleshed out with the appropriate schema and management classes.

      --

      --
      make install -not war

    3. Re:MySQL java appserver? by Anonymous Coward · · Score: 0

      But does your theory work when you take the hyperspace discombobulator into consideration?

      Fucking buzzwords.

    4. Re:MySQL java appserver? by Doc+Ruby · · Score: 1

      Fucking anonymous coward. If you could read, or perhaps understood the meaning of the "buzzwords", you might see a spec for a free, open java appserver compatible with the large installed base of MySQL servers. Instead, your anonomyity overcomes your cowardice, and you shoot your mouth off about buzzwords. Recombobulate yourself back into hypospace, offer something worthwhile.

      --

      --
      make install -not war

  51. Slammer anyone? by bentfork · · Score: 2, Interesting
    Remember the SQLSlammer?
    That was spread (as I recall) because of default passwords not being changed on sample databases. I know lots of people that dont change their default MySql root password. (I tellem but WTF, its their bandwidth...)

    Seems like they are trying bring MySql in direct competition with M$SQL server... ( as a spreader of worms )

  52. simple. by flacco · · Score: 4, Funny
    So when will someone do Ruby?

    i will as soon as i can get her to drink this liter of vodka.

    --
    pr0n - keeping monitor glass spotless since 1981.
    1. Re:simple. by Sxooter · · Score: 1

      Someone already did:

      http://moulon.inra.fr/ruby/plruby.html

      Oh wait, that's for Postgresql...

      so is plphp, plperl, pltcl, plperl, plpgj (java), plR, plsh, and about ten or so more I can't remember right now.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
  53. Not my first priority by tacocat · · Score: 2, Insightful

    Java is not my first choice in languages to support in a database language. PL would have at least been more adaptable.

    Unfortunately with the Enterprise Popularity of Java, thanks to a strong Marketing Campaign by Sun Microsystems, MySQL is following the Corporate line of supporting Java regardless. This is a fine example of what may be a mis-direction of the MySQL developers being pushed into a Support the Corporate Enterprise stuff rather then doing good code on a good platform.

    1. Re:Not my first priority by mabu · · Score: 0, Troll

      I completely agree. Java is overkill for this, and IMO not as stable or reliable as other alternatives.

    2. Re:Not my first priority by Anonymous Coward · · Score: 0

      Tell it to Oracle or an Oracle user that uses Java. Just because you don't understand its usefullness doesn't mean it isn't useful to others.

    3. Re:Not my first priority by Decaff · · Score: 2, Insightful

      Java not stable or reliable? What planet are you on? Java was designed for stability and reliability. The neatest thing in this context is the SecurityManager, which means you can restrict what it can do within an app server or database, unlike C code or whatever.

  54. PHP UDF by TheTomcat · · Score: 4, Informative

    There's similar functionality s/java/php/g, here:

    http://talks.php.net/show/phpquebec/27
    http://www.sklar.com/page/article/myphp

    S

  55. While we're at it... by karmaflux · · Score: 3, Funny

    I want MS-DOS debug embedded.

    --F 200 L1000 0
    --A CS:100
    xxxx:0100 MOV AX,301
    xxxx:0103 MOV BX,200
    xxxx:0106 MOV CX,1
    xxxx:0109 MOV DX,80
    xxxx:010C INT 13
    xxxx:010E INT 20
    --G


    BWAHAHAH

    --

    REM Old programmers don't die. They just GOSUB without RETURN.

  56. silly question perhaps.. by jrexilius · · Score: 1

    But does functionality like this exist for other executables (C/C++,Perl,etc.). Wouldn't this be extendable to accomodate external functions in general?

    1. Re:silly question perhaps.. by Decaff · · Score: 1

      The huge advantage of Java is its security. The app server or database engine can include a customised implementation of the Java SecurityManager, to ensure that user code can't do bad things. This is why enterprise database engines allowed this kind of embedding for java but not C/C++ etc.

  57. Oh come on, NOT stored procedures by Jhan · · Score: 4, Informative

    This is all about writing functions, like no_null in

    select no_null(oftennullfield)||" "||otherfield from...

    MySQL has always had an expansion framework for adding you own functions to the SQL, it's just that traditionally you had to have a compilable language to do that. Now, you can use Java methods as well. (Still not a bright idea IMHO, but...)

    --

    I choose to remain celibate, like my father and his father before him.

  58. Is this similar to? by Anonymous Coward · · Score: 0

    Just wondering if this is similar to the "User Defined Function" (UDF) capability of Interbase or Firebird?

    I really like the UDF capability as it lets you write an external function that can be called inside a query or stored proc or whatever. I used UDF's to trigger a physical alarm when a particular insert of a record matched certain criteria. Very cool.

  59. get useful features first.. by Suppafly · · Score: 1

    MySQL needs to finish cloning the functionality of those rdbms's like Oracle before they start adding crazy features with limited utility.

  60. Years behind PostgreSQL by Anonymous Coward · · Score: 0

    See PL/Java, PL/TCL, PL/Perl, PL/Ruby, PL/Sh, PL/R, PL/Python.....

    MySQL sucks.

  61. *claps hands* by Celerian · · Score: 0

    Yay, just what we've been waiting for!

  62. Re:Firebird SQL by Just+Some+Guy · · Score: 1

    Because it sucks most grievously. The day we killed Interbase for the last time was the day we celebrated. Long live PostgreSQL!

    --
    Dewey, what part of this looks like authorities should be involved?
  63. Someone already did PHP. by EMR · · Score: 1

    I know someone already had something like this to allow you to execute PHP.. although only one statement at a time.. I have that code somewhere.. Should probably update it with all the other PHP stuff I have done to allow you to write entire functions in PHP and execute them w/in MySQL..

    How fun would that be.. PHP calling MySQL which calls PHP..:-D.. Ahh straight from the Deptartment of Redundancy Dept.

    1. Re:Someone already did PHP. by Anonymous Coward · · Score: 0

      > PHP calling MySQL which calls PHP

      Here's a worse example we've been using for about four years:

      We use PHP which calls MySQL queries which start C programs (MySQL calls them UDF, user-defined functions) which calls PHP programs since we're better PHP programmers than C programmers. It actually works well. I was shocked. The extra C layer is because MySQL has supported UDF's in C for years and doesn't yet support PHP.

    2. Re:Someone already did PHP. by Anonymous Coward · · Score: 0

      Heh - PostgreSQL can already have entire stored procedures built in php - more catch up for the MySQL guys to do.. but then again we really shouldn't even compare the two projects because their goals are so different

  64. Re:Firebird SQL by SirChris · · Score: 0

    Those points are either wrong or seriously outdated. You can use an alias instead of the exact path, i have never had a corrupt database i couldn't fix (and i've only had 2 corrupt databases). That is talking about InterBase not Firebird a lot has improved. Furthermore, I was comparing MySQL to Firebird not PostgresSQL to Firebird. Even assuming the flaws you pointed out were accurate Firebird would still be very much better then MySQL.

  65. Cool, actually. But... by reverendslappy · · Score: 1

    That's actually a sweet feature, but I would've thought they'd concentrate on other things first. I'd think that ANSI-92 compliance, real stored-procedures, replication, online backup, subqueries (especially for lazy folks like me), etc. are more important. (I'm sure somebody's said that already.)

    Still, that's a nice feature, no doubt. Plus, I'm sure this was probably a bit easier to make happen than any of those higher-level things. Regardless, I'm not throwing stones, but I'd like to see more progress on the road to making mySQL a more enterprise-level DB. I'm mostly a MSSQL Server weenie, and with some improvement in that area, mySQL could really be a viable alternative in the small-to-midsize commercial database space. Even for free and with the ability to write UDFs in Java, I still gotta pick SQL Server. I'd like to be able get rid of that cost, but alas... Maybe Postgre...

  66. PHP would have been a much better choice by acostin · · Score: 2, Informative

    It's a pity the MySQL guys are trying to reinvent Oracle.

    Java in the database is so 98, that makes me wonder why all companies are trying to conquer the world with the same approach..

    PHP would make just a more natural choice for stored procedures, and the approach in MySQL should be to allow stored procedures, triggers and referential integrity (this should be native like in PostgreSQL).

    It's weak typed and has a pretty standard MySQL api. However, a metalanguage over PHP to minimize the API and to make it transparent would be nice.

    Alexandru

    1. Re:PHP would have been a much better choice by Decaff · · Score: 1

      Java is ideal for this kind of thing because it is secure, and can be very fast (with a well-designed VM) and because you can re-use code. Java was not a great idea in 98 as it was dead slow. Now it matches C speeds, its a pretty good choice for portable coding.

    2. Re:PHP would have been a much better choice by pHDNgell · · Score: 2, Informative

      It's a pity the MySQL guys are trying to reinvent Oracle.

      If that's their motivation, they're missing by far. Postgres is *way* closer to oracle.

      Postgres does have a plPHP as you're describing. I wouldn't say that being a weakly typed language or having a standard API for talking to a particular type of database make for a good language.

      But postgres allows you to make that decision for yourself. Stored functions and procedures may be written in any language and it's easy to plug them in.

      --
      -- The world is watching America, and America is watching TV.
  67. PHP has this for over a year by MelloDawg · · Score: 2, Informative

    PHP Dev David Sklar implemented this over a year ago: http://www.sklar.com/page/article/myphp

    --
    /. is irrelevant.
    1. Re:PHP has this for over a year by repetty · · Score: 2, Insightful

      "PHP Dev David Sklar implemented this over a year ago: http://www.sklar.com/page/article/myphp"

      Cool. Very cool. But those execution times are pretty bad. You certainly would want to plan carefully how you used this.

      --Richard

  68. Better than pulling stuff to the client by Tim+Ward · · Score: 1

    There are times where it is possible to compute stuff in, say, WHERE clauses using standard SQL, but it's an enormous pain and being able to write a little function in a "real" programming language makes things vastly easier.

    MS Access programmers have been doing this for a very long time, with little VBA (or Access Basic if you're old enough) functions saving vast screeds of incomprehensible and possibly rather slow SQL arithmetic and/or substring manipulation.

    With Java (or C or anything else) functions running on the server in MySQL you get all those wins plus the win of not having to pull the data to the client to look at it.

    (Recent example: I had to write some MySQL SQL code to convert a field representing a latitude/longitude value from a numeric GSM encoding to a string in the format "dd:mm:ss.sss". Possible, but dozens of lines of SQL and utterly utterly horrible. One trivial Java function on the server would have been lots less tedious.)

  69. Re:waaaaiiiit a minute... by Anonymous Coward · · Score: 0

    Here's an easy to understand example of what we're doing now with MySQL:

    Each customer of ours has an ID # that looks like NY-4123 where the 4123 is a unique id number even without the prefix and the NY- is the state. We've used that system for just over 60 years, so there's no way IT could convince everyone to change. Many reports use just the ID number and everyone uses just the ID # in communications to save time. Rather than teaching our end users how to do something like:

    SELECT SUBSTR(id, 4) AS id FROM cust WHERE ...

    Four years ago, we wrote a UDF function in C for MySQL, which does the same thing this thing does for Java, called short(). Now, our users do this:

    SELECT short(id) FROM cust WHERE ...

    I know that's trivial, but it's easier than teaching 75 women, that are mostly in their 50's, how to use SUBSTRING().

    We also wrote another UDF function that queries a propreitary db on an AS/400 to check current inventory. It looks like:

    SELECT inv(123), descrip, price WHERE id=123 FROM inventory;

    To lookup how many of item #123 we have. That hides a lot of the complexity behind the scenes. It's great.

    We also do:

    SELECT status('1Z123342...') FROM ups_shipping

    to look-up a package's status from UPS's web site given the tracking #. This is the type of thing you'd put in a function for a programmer, but for a group of end users that have used SQL dozens of times for 15+ years, it's a great solution.

  70. and here is a great reasons not to by kpharmer · · Score: 2, Interesting

    how many folks can you find who are *experts* good with both SQL & Java? (BTW,I don't mean that they can write simple joins, group bys and unions. I mean good enough to understand access paths and parallelism choices). Of the 100+ java developers I've worked with over the last four or so years I've only met *1* who would meet that critieria. So, exactly who's going to be making the performance-tuning decisions? Nope - bad idea, a simple tuning problem will need a committee to figure it out.

    keep in mind that since we've mostly dropped the idea of writing all business logic in stored procedures, they're primarily being used these days for very simple procedures. Nothing fancy - convert an ip from a string to an integer, etc. You don't need *or want* a big language for this. Nor should you sweat too much that it is proprietary - who cares when you can learn the basics of the language in 5 minutes.

    1. Re:and here is a great reasons not to by nettdata · · Score: 1

      You're also assuming that Java is to be used for SQL.

      We currently use Java to perform SMTP/POP3 operations, make web service calls, perform Java-based "rsync's" between the DB and file systems, etc., all from within the DB and in a lot of cases being triggered by, well, a trigger.

      While I agree that I would tend to abstract all SQL to some PL/SQL call that "DBA's who get it" have control over, there are LOTS of things that Java can do that are VERY handy, when viewed at in the application architecure POV and not just in a SQL context.

      --



      $0.02 (CDN)
    2. Re:and here is a great reasons not to by Hobbex · · Score: 1

      how many folks can you find who are *experts* good with both SQL & Java? (BTW,I don't mean that they can write simple joins, group bys and unions. I mean good enough to understand access paths and parallelism choices). Of the 100+ java developers I've worked with over the last four or so years I've only met *1* who would meet that critieria.

      Database developers like to go on and on about how difficult it is, and how "non-experts" can't possibly learn to develop good databases. So we'll buy that: you can't find java developers who also have the magical unattainable quality of being able to handle a database.

      But turn it around instead. How come your database "*experts*" can't learn java? I have java down as well as anyone, and I would claim that anybody with half a brain can become an expert at java development in a few months. Anybody who has experience with imperitive programming can learn it in a few weeks. For people who know OOP it is a matter of days.

    3. Re:and here is a great reasons not to by kpharmer · · Score: 1

      > Database developers like to go on and on about how difficult it is, and how "non-experts" can't
      > possibly learn to develop good databases.

      No - the problem is that the development of best practice databases requires that the designer understand more than just the syntax of insert, update, delete, and select. And when you get right down to it, most developers don't even have the syntax straight - let alone understand the beginings of relational theory.

      > How come your database "*experts*" can't learn java?
      For the same reason that I don't expect java experts to also develop expertise in database tuning - each is a large and complex discipline.

      > For people who know OOP it is a matter of days.
      Really? They'll understand all the commonly-used libraries?
      They'll understand when it is best to go straight from jsps to the database, when they should use entity beans, when to use EJBs and when to use CMP? They'll understand the strengths and weaknesses of each solution and exactly how to develop each?

      these must be the 'magical unattainable' programmers - you know, the kind I've never met any on any of dozens of projects over the last four years.

  71. At some point, by alexborges · · Score: 1

    Thats gonna make it slower than postgres. I say slay mysql.
    Its best thing was that it wasnt hoggish so the normal, simple web-app site could use it.

    Nowdays, postgres is faster than mysql, and more scalable, and better proven. An now JAVA? Come on, it cant get any slower than embeding java there.

    --
    NO SIG
  72. did ruby by Anonymous Coward · · Score: 0

    i did ruby.. she wasn't that good

  73. except that for the skill requirements by kpharmer · · Score: 2, Insightful

    No, a stripped-down version of PHP, python, etc would be far better than java.

    Does the LAMP crowd write code in java? nope.

    Do the DBAs write code in java? nope.

    Does the java crowd use mysql? nope (if you're going to the cost of developing apps in java, it makes more sense to use postgresql if not oracle, db2, etc).

    In java you can abstract the data persistence thru a variety of encasulation techniques. All of which creates such a mess than everyone's scrambling these days to figure out how to simplify it. Sounds like a mess to introduce deeper into the database.

    And portability? Do you really think that java functions created for mysql will port *seamlessly* to postgresql, db2, or oracle? No way. And if they don't - why don't you simply write the functions in a tiny, simplistic language that everyone can use easily?

    1. Re:except that for the skill requirements by Decaff · · Score: 1

      In java you can abstract the data persistence thru a variety of encasulation techniques. All of which creates such a mess than everyone's scrambling these days to figure out how to simplify it. Sounds like a mess to introduce deeper into the database.

      Why abstract the data persistence? just use JDBC. At least this has some level of portability, unlike the messy database routine naming in PHP.

      And portability? Do you really think that java functions created for mysql will port *seamlessly* to postgresql, db2, or oracle? No way. And if they don't - why don't you simply write the functions in a tiny, simplistic language that everyone can use easily?

      'Yes way'. That's what Java is for. That is why MySQL is using the same language for this as postgresql and oracle.

  74. Re:First Ninnle Post! by Anonymous Coward · · Score: 0

    Welcome back! I've missed your Ninnle posts.
    Long live Ninnle!

  75. to bad postgress cant be backed up hot... by Anonymous Coward · · Score: 0

    pg_dump(all) is an export, not a backup.

    1. Re:to bad postgress cant be backed up hot... by Anonymous Coward · · Score: 0

      Ofcourse its a hot backup - how would you define it? hot replication = backup? umm nah thats REPLICATION

    2. Re:to bad postgress cant be backed up hot... by asdfghjklqwertyuiop · · Score: 1

      pg_dump(all) is an export

      which is a backup.

  76. umm by Anonymous Coward · · Score: 0

    mysql is not free, unless you give your product that uses it away gpl.

  77. Re:Just great ... by Anonymous Coward · · Score: 0

    You forgot:

    "Java - write once, run everywhere"

    Still waiting for Sun made Java that I can DL from Sun for FreeBSD.

  78. Ruby?! by Not+The+Real+Me · · Score: 1

    That's a joke, right?

    MySQL functions written in Java? Sure
    MySQL functions written in c/c++? Even better
    MySQL functions written in PHP? Cool.
    MySQL functions written in pl/sql or pg-pl/sql? Why not? Code compatibility with Oracle and Postgresql.

    But Ruby? That would be for a target audience of what? Maybe 10 developers maximum?

    1. Re:Ruby?! by iggymanz · · Score: 1

      Ruby has a huge following, but just not in the western world yet. I think it is superior in design than even LISP (I've been a paid LISP, Java, C++, C programmer in the past)

  79. Nice! by Anonymous Coward · · Score: 0

    I love to get GPLed client libraries, it makes my fscking day. I dumped MySQL a looong ago.

  80. Re:This is Crucial - Please Read (Krow, any answer by Anonymous Coward · · Score: 0

    This is purely curiosity on my part:

    Addressing point 1: Do you mean you are updating the class file while the JVM is running and you expect it to update the loaded class, or am I misunderstanding here?

  81. It does not bring MySQL closer.. by Anonymous Coward · · Score: 0

    ..to being an object-relational DBMS.

    Bloody hell someone pops a new feature in there and suddenly its the be all and end all. Get over it - MySQL has a long way to go before it gets even close to a lot of commercial DBMS.

  82. Old hat by NineNine · · Score: 1

    Oracle has had this functionality since 8.x. Java is *very* fast inside of Oracle, and is more efficient than PL/SQL in a few cases. Again, OSS is playing catch up.

    1. Re:Old hat by ibbey · · Score: 3, Insightful

      Oracle has had this functionality since 8.x. Java is *very* fast inside of Oracle, and is more efficient than PL/SQL in a few cases. Again, OSS is playing catch up.

      SO? Oracle has lots of features that MySQL lacks. The point of the post isn't that this is some wonderful new feature never before seen in the world, only that it's new to MySQL.

      Oh, and one of the fabulous features that Oracle has over MySQL is the price. I mean, who wouldn't prefer to spend many thousands of dollars? This is obviously another area where OSS needs to start playing catch-up.

    2. Re:Old hat by Lussarn · · Score: 1

      MySQL can be installed in about 5 minutes and does what it does very well. Don't compare it to oracle. For more and more applications MySQL is a good choice. In true OSS spirit it's also very stable. I have one MySQL db running 814.71 days without restart serving 1586663205 under that time. Of course it's mostly simple selects. And that's what MySQL does well.

    3. Re:Old hat by Sxooter · · Score: 1

      Horse puckies. Both Interbase/Firebird and Postgresql have had solid, reliable pls for many many years.

      While JAVA stored procs are new to PostgreSQL, the lack of a specific language as a stored proc is pretty silly. PostgreSQL has solid reliable stored procedures in a dozen or so different languages, including perl, ruby, R, tcl, php, and C.

      There areas where Oracle outshines Postgresql and MySQL, the are also areas which make it look bad in comparison. To think that the Open Source databases aren't competitive is to only look at one small segment (content storage databases like MySQL) and ignore the others, SAPDB (MySQL MAX??? stupid name, but a good database), Interbase / Firebird, and Postgresql.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
  83. Parent is a troll by axxackall · · Score: 1

    when have you last time checked Cygwin? They host PostgreSQL binaries for years. Works fine, flawlessly and fast.

    --

    Less is more !
  84. Moderators are trying to ruin the site again! by Anonymous Coward · · Score: 0

    Interesting post. Too bad not many people saw it since it was marked down by some idiot moderator. I've been on /. since Oct 98, and the moderators just get worse and worse. It seems like they're intentionally trying to ruin the site. The criteria for moderator points needs to be changed.

  85. Embedded Ruby is not thread-safe by jdoeii · · Score: 4, Informative

    So when will someone do Ruby?

    Not soon. Ruby cannot be embedded in a threaded application without using a giant mutex. Only one thread at a time can call Ruby interpreter.

  86. Python is broken by jesterzog · · Score: 1

    It's worth pointing out that the Python implementation may be either disabled or insecure, depending on the python interpreter installed on your system.

    The rexec module, which is used by the postgres python code execution handler, has been disabled in Python 2.3 (I'm not sure about 2.4) due to "various known and not readily fixable security holes.

    I was initially planning to use python for my postgres stored procedures, but now I'm just using pypgsql and I think I prefer it.

  87. Fantastic by thujone · · Score: 1

    Does this mean that Friendster will render a page in 29 seconds versus 30 now?

  88. Ruby? by Glock27 · · Score: 3, Interesting
    So when will someone do Ruby?

    Perhaps when there's a Jython-like JVM based Ruby implementation?

    Seriously (given the number of ignorant "why use Java it's so slooooow" posts) as far as I can tell the current Ruby implementations are slow compared to Java. Would you really want to use a slow interpreted language for database functions, rather than one with close-to-C performance?

    Also on the subject of knee-jerk Java bashing, I can't understand why so many C++ programmers resist Java, tooth and nail. Yes, Java has a somewhat bulky memory footprint (that may not be such a problem going forward with all the new 64-bit architectures out there). However, you get a ton of niceties as well, and a very sane language compared with C++. Java runs very fast these days, given sufficient JVM heap. Gcj is also getting there in terms of being useful, and provides an OSS traditional ahead-of-time compiler for Java code. Java may not be an ECMA standard, but it is open enough to permit free implementations.

    Java isn't perfect...but it is better than many of the alternatives, and deserves more respect than it seems to get here on /. and among programmers in general. At least it is well supported on Linux by it's originators, unlike C# and .Net.

    OK, time to do something useful now... :-)

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
    1. Re:Ruby? by paulfwilliams · · Score: 1

      Having used C++, Java, and .NET, let me say that Java is slow. Yes, I know, when a JIT happens, Java gets pretty fast. Unfortunately, the JIT is expensive.

      At my former employer, our app's startup time stank because of all the JITting. The first time our users tried to do anything, it took an extraordinarily long time. They noticed, and while they lived with it, they always mentioned it. Any sudden, unexplained pause brings back fears of "is it still running, or did it hang?"

      Something nice about .NET is the ability to pre-compile a set of classes for a given platform. Theoretically, if I install my app on a machine, that machine won't suddenly change instruction sets, so compiling the whole app during the install saves time on every program execution.

      I dearly wish the Java Founders would include a pre-compilation option similar to .NET. Compiling the code every time it's run is such a waste of time.

  89. There's always plruby by Anonymous Coward · · Score: 0

    http://moulon.inra.fr/ruby/plruby.html

  90. 1/2 Done! by hattmoward · · Score: 1

    See this article: Embedding Perl in MySQL
    I did this on a test server -- definite geek factor here.
    I'm not seeing any python links on google, but I'm sure someone will speak up if there are.

  91. Decouple jvm and mysql by lamecoffee · · Score: 1
    Might be a nice idea for stability to decouple the java feature and the core dbms with a nice corba interface, to avoid crashing the database service by triggering jvm flaws. Otherwise some macro defined as
    package badjava; public class KillBar { public static String exec(String[] args) { sun.misc.MessageUtils.toStdout(null); } }
    and called via
    SELECT judf("badjava/KillBar") FROM foo
    might be a bit harmful !
  92. Holy Christ! by Puzzle+Face · · Score: 1

    HOLY CHRIST! What kind of DB files are in excess of 50GB!?!?!?!?! (Or do you meant the whole database?) Our company uses MySQL for a mere 6 million record table, and it works pretty fast. Straight up selects take milliseconds. Joins to that table seem to take forever. (Often in excess of 2 seconds per query.) The fact it isn't thread safe bugged us, but it's easy to make a wrapper class with critical sections. No biggy there. (I think future versions are thread safe though, we're still suck on 4.2) Real world? Seems to work fine. (What's really bizarre is that it actually works better on a Windows 2003 server as opposed to RHL 9.0. Benchmark tests available for those that don't believe me. :-) ).

  93. Re:First Ninnle Post! by Anonymous Coward · · Score: 0

    Oh, not just mine! Ninnle is gaining worldwide popularity!

    Feel free to post a Ninnle joke of your own!