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?"

10 of 318 comments (clear)

  1. 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.
  2. 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
  3. 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.

  4. 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 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

  5. 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

  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. 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.

  8. 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
  9. 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.