Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

MySQL Gets Functions in Java

michael posted more than 10 years ago | from the we-love-you-krow dept.

Java 318

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

cancel ×

318 comments

Why (-1, Offtopic)

scumbucket (680352) | more than 10 years ago | (#7767372)

And this is important why?

Re:Why (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767407)

Slow news day.

Re:Why (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7767452)

It mkaes open sores hippies happy because they can type make test over and over again and watch the pretty lines scroll.

Violoating copyright is ART! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767764)

A Short History of the Photocopying and Dissemination of My New Fighting Technique Is Unstoppable [powells.com]

I was required to write a personal statement when I submitted My New Fighting Technique Is Unstoppable for a grant a few years ago. The grant would have paid for printing the book. I didn't win the grant. You'll find the personal statement at the end of this historical statement. Historical? Yes. We are about to review the history of photocopying My New Fighting Technique Is Unstoppable.

I needed to submit six copies of the comic for the grant, along with a cover letter, resume, price quote from a printer, and personal statement. I knew from experience that making six copies of the book at Kinko's would cost seven million dollars. (I made twenty copies of the book for friends at Christmas and Kinko's hijacked my reality with their high prices and spiral binding.) Since I didn't have much money, I asked a friend involved in the Boston zine community if there was a zine-friendly photocopy shop that might give a discount for homemade literary projects.

My friend recommended World's Most Ass-Kicking Printers outside Harvard Square, across from the purple waterfall. (The name and identifying characteristics have been changed for this article -- I think some of the guys still work there.) I dropped off the originals, but chickened out at the last minute and didn't ask if they gave discounts for self-published material. A few days later I picked up the copies and paid the bill. It was still a better bargain than "Stinko's." I submitted the grant application and that was that.

Days or weeks passed uneventfully. Then the world blossomed into a rainbow of possibility: I was approached by someone who said he enjoyed reading My New Fighting Technique Is Unstoppable. This flummoxed me because I had not given him a copy for Christmas as I did not know him. Was he perhaps on the review committee for the grant? No. And yet he had definitely read the book? The one with the karate guys yelling and cursing? Yes. After a little more prodding he admitted that his friend worked at the zine-friendly photocopy shop and had faxed him the entire book, page by page. (If I had asked Kinko's to fax the sixty-page book to someone, the cost would have been... remarkable. Listen, I can't stand Kinko's. Photocopy shops should not be privately owned; they should be state-run and publicly subsidized. A tax-paying citizen should be able to collate and laminate anything they want, for free. And if you don't vote, you should not be allowed access to America's photocopiers. I'd also like to say that Mail Boxes Etc. is a total scam. If you have to choose between sending your valuable package via Mail Boxes Etc. or leaving it on the corner with a note attached that says, "Please, somebody, take this to its destination," ALWAYS choose the latter.)

So the book was being distributed via fax without my permission. This is called "file sharing." I asked the guy if he thought his photocopy friend would make me some copies of the book at a reduced rate -- seeing as how he was already engaged in unauthorized fax piracy on the high seas of clip-art comics. He thought this was reasonable. I called the guy at the photocopy shop and we worked out an arrangement whereby I would stop by the shop on Friday afternoons with a 12-pack of beer. I would leave the beer on top of the counter and he would kick a box of books under the counter. I would lug the books (actually, collated pages) home on the subway and staple them in my living room. That is how I learned the ancient art of bookbinding.

At my zine friend's encouragement I started selling the books on consignment at a few local bookstores. I included a unique iron-on transfer with each book. The initial price was four dollars. Financially speaking, I didn't know what I was doing. But since my production cost was zero-dollars-plus-12-pack, I could afford not to understand how the publishing industry worked. Now I am sorry to say that My New Fighting Technique Is Unstoppable costs ten dollars. However, it is still a great bargain because it is glue-bound and therefore immune to rust.

The beer-for-books arrangement continued happily for months. Then God killed hope when the copy shop was bought by a chain of more-responsible graphical-service-solution stores, or whatever they're called. Word in the Boston zine community was that the new owners were cracking down on staff photocopies. The time had come to seek out another source of "special discount" photocopies.

Once again, the world flew into my happiness with much-needed splendor: I received some very encouraging fan mail about My New Fighting Technique Is Unstoppable. It turned out this particular fan was the head of an investment bank's graphics department and had access to some of Boston's most powerful photocopiers. Would he help me make more copies of the book? We met at a coffee shop and hammered out the details while playing Boggle. Weeks later, my living room was once again bedecked with boxes of books.

Do I miss those days? Absolutely I do not. However, at that time, I was still knee-deep in them.

I moved to New York, reluctantly leaving all my new photocopy friends behind in Boston. I got a job temping at Citigroup, proofreading PowerPoint slide presentations in a windowless basement in midtown Manhattan. You might have seen this windowless basement yourself -- have you ever sinned, died, and gone to hell? Perhaps you have also proofread the Devil's PowerPoint presentations on How to Create and Make Manifest Hell on Earth. (I was proofreading documents like, "How the Crackdown on Human Rights in Turkey Could Be Exciting News for Our Satanic Shareholders.")

Anyway, the irony was that I now found myself working in the graphics department of an investment bank! Just like my final photocopy friend in Boston! I now appreciated the possibilities that lay just outside my personal space. I let my eyes, feet, and entire body wander into Citigroup's photocopy room. Gigantic, beautiful, beige machines hummed and clattered with the relentless reproduction of text and charts on paper. I started feeling out the photocopy attendants' attitudes towards unauthorized use of said beige miracle-makers. Their attitude was one of "I don't understand what you are talking about."

Perhaps I was not being forward enough. Unfortunately my internal self-preservation compass told me I could not be any more forward, since I needed both the paycheck and debasing sense of self-annihilation provided by the temp agency. I had reached a dead end. In the words of Black Sabbath, "Satan, laughing, spread his wings."

Nevertheless, life indulged in a final unleashing of symphonic positivity: I met someone else who had enjoyed the hand-stapled edition of My New Fighting Technique Is Unstoppable and sent a nice note. That man may or may not now be my editor. He might have worked at another publisher at the time, and may have been kind enough to enlist his production department in making a few hundred copies of a book.

At this point, I felt I had reached the limits of free photocopies. A hundred copies at a time was generous indeed, but I was selling the book in enough stores that I could see needing over a thousand copies.

So I pitched an exciting business opportunity to my parents -- If they loaned me $2,000 to print up a real, paperback edition of My New Fighting Technique Is Unstoppable, I would repay that loan WITH TEN PERCENT INTEREST WITHIN A YEAR. We signed a contract and ate dinner.

The printer I used was based in Jersey City. The printer did not do a very good job with the book -- that is to say, he did the worst possible job with the book. The printer brought the first few boxes of books over to my apartment in his minivan. When I took a look at the book for the first time, my heart sank.

I had used a nice dark tan cover for the self-published edition, and wanted to make sure the new edition had the same color. The printer insisted he could match the color exactly by using "some stock I have here in the corner of my office." That color turned out to be more beige than tan. A fitting tribute, perhaps, to the color of a majority of photocopiers, but not what I had dreamed.

Another problem was with the pages that had gray pictures. Since the printer had said the original pages would be difficult to scan, I was told to rebuild them on my (wife's) computer. But there was a problem with the printer's photographer or something -- all the gray images came out blurry and overweight. (When I asked the printer about this, he said, "Oh, yeah.... the photographer mentioned something about the grays not being clear. I never told you. It looks great!")

The final crazy thing concerned payment for the job. The printer asked if I could address my check not to his company, but to his daughters' daycare. I started to wonder if the guy was printing the book without letting his supervisors know about it. Story of my life!

When it came time to publish My New Fighting Technique Is Unstoppable with Riverhead, we decided to make sure the book looked exactly like the original homemade edition. I scanned each original page into my computer and used them as templates to rebuild the book -- line for line, crappy image for crappy image. This was my first experience with forgery.

Actually, I made a mistake in the above paragraph. I was not able to scan "each original page" into my computer because my printer lost the original pages. (Yeah, self-publishing is really fun!) All he could find was the film they had shot of the book's layout. After months of my needling, he finally relented and delivered the film to Riverhead's offices. He then asked my editor if Riverhead would consider using his company to print the book. After all, they had experience printing it and would do a great job! Unfortunately Riverhead is not allowed to finance printers' personal day care arrangements by secretly manufacturing books in Jersey City and losing all the client's originals.

All in all, things worked out pretty well. I'd like to dedicate the following personal statement, written for that grant years ago, to everyone who has ever made me free photocopies of My New Fighting Technique Is Unstoppable.

<> My New Fighting Technique Is Unstoppable is a comic book made using computer clip art. This comic takes a limited set of public domain art as its visual foundation and builds an intense social system of combative personalities. The aggression of the language and absurdity of the mis en scene play against much of the imagery's mundane character.

I created My New Fighting Technique Is Unstoppable using Microsoft PowerPoint on Windows Office 98 software. Using the computer allowed me to make the comic in a job situation where traditional drawing equipment would have been too conspicuous. I initially decided to use clip art for its convenience; I later came to realize it influenced the thematic elements of the comic.

Although it takes place in a karate temple, the inspiration for this comic comes from MC freestyle battles in rap music. An obsession with lyrical technique, and how one's technique compares to that of one's peers/enemies, is one of the thematic cornerstones of "battle rhymes." Similarly, many of the confrontations in My New Fighting Technique Is Unstoppable reduce to arguments about technique. Much time and energy is spent gossiping and conjecturing about other fighters. Physical combat itself is almost beside the point. A fighter's size and strength are not important; instead, having a new technique or being a metaphysical anomaly (e.g. an imaginary fighter who becomes real) is the surest way to intimidate others. In this social system, fighters are more afraid of being confused than of being beat up. In its environment of anxiety and paranoia, the karate temple may not be that different from a competitive sales department.

There are very few determinate characters in My New Fighting Technique Is Unstoppable. In many cases the same clip art is used to denote multiple people. Similarly, some strips differ only in dialogue, with identical sequences used to denote different characters in different situations. A few unique characters with extraordinary physical attributes -- See-Through Man, The Fingerprint Fighters, etc. -- were inspired by what sort of clip art I found online. Most of the time, however, the reader is swept along by the adrenaline of what amounts to a foul-mouthed Greek Chorus -- a chorus which ultimately turns in on itself to defend against a few extraordinary fighters. Despite the anonymity and posturing of most of the characters, my goal was not to make a cynical or mean-spirited comic. The fighters in My New Fighting Technique Is Unstoppable are sincere about their craft, curious and passionate about fighting. They are willing to admit fear and wonder. Most are sympathetic characters despite their aggression.

I would like to distribute My New Fighting Technique Is Unstoppable nationally. Clip art is a good way to introduce the art of comic narrative to people who might otherwise be intimidated by a perceived lack of "artist talent." Clip art usually serves a strictly utilitarian purpose, and its anonymous, often un-copyrighted, perfectly reproducible public nature is an intriguing contrast to other types of art. It can serve as the impersonal structural units through which more creative personal art is produced. The amount of free clip art available online is virtually unlimited. People like myself, who do not own a computer, can make entire comics quickly and cheaply using computers on the job or at the public library.

Comics seem to me the simplest and most elegant way of creating distinctive social systems and sharing these new worlds with other people. Using clip art allowed me to streamline this rewarding creative process even more. I would like to share (the admittedly bizarre) My New Fighting Technique Is Unstoppable with people across the country and thereby spread the word that it is within everyone's grasp to make up new worlds.

Now how about. (5, Interesting)

DAldredge (2353) | more than 10 years ago | (#7767373)

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

Re:Now how about. (5, Informative)

jamie (78724) | more than 10 years ago | (#7767520)

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.

Re:Now how about. (2, Insightful)

DAldredge (2353) | more than 10 years ago | (#7767643)

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.

Re:Now how about. (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767720)


Not a DB guru here so..
how are online backups made on other databases that suppor it then? (honest question)

Re:Now how about. (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767802)

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

If you need it, then you'll be glad to shell out a couple dollars to make it work, right? And if you need it that bad, you'd be better off purchasing a database product from another vendor...

Re:Now how about. (-1, Troll)

hchaos (683337) | more than 10 years ago | (#7767840)

There needs to be someway of doing online back ups of MySQL with out spending money.
So, the problem is that the software that you've paid nothing for doesn't have enough features?

Seriously, what makes you think that you're entitled to anything if you're not willing to pay for it?

Re:Now how about. (0)

Anonymous Coward | more than 10 years ago | (#7767606)

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.

Re:Now how about. (0, Troll)

DAldredge (2353) | more than 10 years ago | (#7767663)

Why not use PostgreSQL?

Re:Now how about. (1)

ErikZ (55491) | more than 10 years ago | (#7767786)

Why don't you just support it?

Keep this out. (0, Flamebait)

Blackknight (25168) | more than 10 years ago | (#7767403)

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.

Re:Keep this out. (1)

jbplou (732414) | more than 10 years ago | (#7767447)

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

Re:Keep this out. (4, Insightful)

gustgr (695173) | more than 10 years ago | (#7767476)

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.

Re:Keep this out. (0, Troll)

DAldredge (2353) | more than 10 years ago | (#7767535)

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

</joke>

Re:Keep this out. (0, Offtopic)

tealover (187148) | more than 10 years ago | (#7767591)

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

Re:Keep this out. (1)

AndroidCat (229562) | more than 10 years ago | (#7767560)

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?

Re:Keep this out. (0)

gustgr (695173) | more than 10 years ago | (#7767590)

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.

Re:Keep this out. (1)

j3110 (193209) | more than 10 years ago | (#7767613)

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.

Re:Keep this out. (-1, Flamebait)

zerocool^ (112121) | more than 10 years ago | (#7767626)

I don't know why everybody wants to keep distance from Java.

Dude, because it's Java. Seriously, for word association, the first 2 things that come to mind are "bloated" and "unnecessary".

What's java's place in the world now? As far as I first understood it, Java was designed to allow for complete application portability, to any platform, etc. That was why it was so freaking bloated and ugly. As time has gone on, we've seen that, even though java continues to be bloated, it's not the least bit portable. It all depends on what you have that interprets or runs or whatever your java. All the programs are different, and nothing looks the same, feels the same, runs the same across platforms. Everyone has to put specific code in their java apps so that they will run on every platform. And still, where it the most common usage of java? Stupid web crap in banner ads and pop ups.

Fuck Java. I put java in the same category as Pascal - a language which never accomplished it's intended task, but that, despite it's horridness, has continued to exist.

~Wx

Re:Keep this out. (1)

geoffspear (692508) | more than 10 years ago | (#7767735)

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.

Re:Keep this out. (0)

gustgr (695173) | more than 10 years ago | (#7767819)

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.

Re:Keep this out. (-1, Flamebait)

Anonymous Coward | more than 10 years ago | (#7767481)

There are a lot of people that don't understand finer points of dbs well, many of them create shitty php/perl/mysql web sites with braindead queries and tables with braindead indices.


However, credit due where credit is due. MySQL syntax and limits don't encourage good db design or queries.

Re:Keep this out. (0)

Anonymous Coward | more than 10 years ago | (#7767608)

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

Re:Keep this out. (-1, Flamebait)

Anonymous Coward | more than 10 years ago | (#7767670)

insert into KathleenFent values ('my cock');

Re:Keep this out. (1)

carabela (688886) | more than 10 years ago | (#7767483)

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

Re:Keep this out. (4, Insightful)

j3110 (193209) | more than 10 years ago | (#7767566)

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.

Re:Keep this out. (4, Informative)

Blackknight (25168) | more than 10 years ago | (#7767652)

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.

Re:Keep this out. (1)

DAldredge (2353) | more than 10 years ago | (#7767763)

Then don't compile in such support.

Re:Keep this out. (1)

rifter (147452) | more than 10 years ago | (#7767771)

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.

Re:Keep this out. (2, Funny)

Anonymous Coward | more than 10 years ago | (#7767785)

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

The more support the merrier.. (0)

Dragoonkain (704719) | more than 10 years ago | (#7767404)

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

Hmmmm (4, Insightful)

cluge (114877) | more than 10 years ago | (#7767428)

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?

So much for mysql's speed (-1, Flamebait)

Anonymous Coward | more than 10 years ago | (#7767431)

This outta bog down mysql.

Krow (1, Interesting)

Anonymous Coward | more than 10 years ago | (#7767441)

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 [slashcode.com]


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.

Well... (1)

DAldredge (2353) | more than 10 years ago | (#7767706)

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

Apparently somebody already did (2, Informative)

GillBates0 (664202) | more than 10 years ago | (#7767442)

So when will someone do Ruby?

MySQL Ruby Interface [google.com]
Google Cache here [216.239.57.104] .

Google's your friend [google.com]

My bad (3, Insightful)

GillBates0 (664202) | more than 10 years ago | (#7767470)

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

Re:Apparently somebody already did (1)

tcopeland (32225) | more than 10 years ago | (#7767490)

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.

Re:Apparently somebody already did (1)

proj_2501 (78149) | more than 10 years ago | (#7767508)

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!

mysql (0)

Anonymous Coward | more than 10 years ago | (#7767446)

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.

Re:mysql (1)

Dreadlord (671979) | more than 10 years ago | (#7767659)

untrue, MySQL IS [mysql.com] 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.

Re:mysql (2, Interesting)

wawannem (591061) | more than 10 years ago | (#7767737)

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.

database language? (5, Funny)

Anonymous Coward | more than 10 years ago | (#7767449)

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)

judf uses the Java Native Interface... (4, Informative)

tcopeland (32225) | more than 10 years ago | (#7767451)

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

That link in your sig. (2, Funny)

DAldredge (2353) | more than 10 years ago | (#7767502)

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.

Re:That link in your sig. (1)

tcopeland (32225) | more than 10 years ago | (#7767537)

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

Yeah, I get that a lot :-)

> Really Cool.

Thanks!

Sorry, off topic... (-1, Offtopic)

Flabby Boohoo (606425) | more than 10 years ago | (#7767456)

But Slashdot personals? you have got to be kidding.

Hi, I am a single male white guy. Looking for any woman, she must have a pulse. Oh, and I promise that I would take a shower if you agree to meet me in person!

Re:Sorry, off topic... (0)

Anonymous Coward | more than 10 years ago | (#7767486)

what

Re:Sorry, off topic... (0, Offtopic)

Flabby Boohoo (606425) | more than 10 years ago | (#7767555)

Advert in the Paul Allen story. Here is the image:

Here [osdn.com]

Re:Sorry, off topic... (0, Offtopic)

XaXXon (202882) | more than 10 years ago | (#7767635)

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

Re:Sorry, off topic... (0, Offtopic)

Flabby Boohoo (606425) | more than 10 years ago | (#7767736)

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

Thanks!

Re:Sorry, off topic... (0)

Anonymous Coward | more than 10 years ago | (#7767773)

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

Re:Sorry, off topic... (0)

Anonymous Coward | more than 10 years ago | (#7767515)

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.

Re:Sorry, off topic... (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767705)

How to please a woman: 5 tips
It is easier than you think to make her happy--just follow these tips!

Overcome your shyness
Find yourself tongue-tied? Learn how to squash your fears now.

First emails: What to say
Not all e-mails are created equal. Find out how to make yours stand out.


...at least they know their target market...

Re:Sorry, off topic... (0)

Anonymous Coward | more than 10 years ago | (#7767775)


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 ;)

Re:Sorry, off topic... (0)

Anonymous Coward | more than 10 years ago | (#7767799)


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

Re:Sorry, off topic... (0)

Anonymous Coward | more than 10 years ago | (#7767745)

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

First Ninnle Post! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767479)

Ninnle Linux: Simply the BEST!

Ninnle Offtopic? (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767565)

I don't understand! This is Slashdot, right? Anything Linux is always on topic, and Ninnle is no exception!

Taco's Memoirs: an exerpt (-1)

iluvtrolls (717573) | more than 10 years ago | (#7767482)

"Uhhngh", Robert Malda gasped.
He had never felt so hot and so cold at the same time. "It's so big". CowBoy Neal had just slid a penis-shaped icicle into Malda's anus. "Don't worry," Cowboy Neal replied with a whisper "it will slowly melt. As it melts, I will drink the water out of your anus with a straw." "Oh, like that last week when you felched me [urbandictionary.com] ..." replied Malda with a grin. Cowboy Neal grabbed the crazy straw with the penis shaped top [adultshopping.com] and...

give me a break (0)

Anonymous Coward | more than 10 years ago | (#7767487)

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?

Re:give me a break (0)

Anonymous Coward | more than 10 years ago | (#7767605)

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!

Re:give me a break (3, Interesting)

ajaf (672235) | more than 10 years ago | (#7767746)

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?

CmdrTaco gets justice! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767497)

BAKERSFIELD, Calif. - A 140-pound rapist met his match in an angry, 275-pound prostitute, police said.

Adrian Castillo Ramirez allegedly tried to sexually assault a 24-year-old Bakersfield prostitute who was nearly twice his weight.

But she took his knife, stripped him naked and paraded him in front of other prostitutes, after asking how many of them had ever been forced into sex at knifepoint. Then she tried to take him -- still naked -- to the police station, reports said.

Castillo was charged with failing to register as a sex offender, and with committing forcible sex acts on the 24-year-old and on a 37-year-old woman in a previous incident. He was convicted of four counts of rape in 1988.

Castillo pleaded innocent Wednesday, and is being held on $250,000 bail, police said.

Sounds like... (3, Insightful)

AndroidCat (229562) | more than 10 years ago | (#7767499)

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.

JMS? (1, Interesting)

Anonymous Coward | more than 10 years ago | (#7767585)

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.

Re:Sounds like... (1)

laird (2705) | more than 10 years ago | (#7767832)

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

That's great (5, Insightful)

j0hndoe (677869) | more than 10 years ago | (#7767507)

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 [sourceforge.net]

Re:That's great (2, Insightful)

Brento (26177) | more than 10 years ago | (#7767697)

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.

Re:That's great (1)

drfrog (145882) | more than 10 years ago | (#7767743)

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

I would (0)

Anonymous Coward | more than 10 years ago | (#7767510)

So when will someone do Ruby?"

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

Re:I would (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7767623)

would you give him a perl necklace?

two faces of a coin (0)

Anonymous Coward | more than 10 years ago | (#7767522)

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.

waaaaiiiit a minute... (1)

liquidpele (663430) | more than 10 years ago | (#7767527)


Ok, so you are storing java functions/objects in the database? Or is it more like you can program your own functions like insert/modify/etc in java, and call them with querys too? I'm confused, someone help!! ;)

Re:waaaaiiiit a minute... (3, Informative)

tcopeland (32225) | more than 10 years ago | (#7767568)

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

Re:waaaaiiiit a minute... (1)

liquidpele (663430) | more than 10 years ago | (#7767639)


ah! very cool, thanks!

Obligatory comment/troll (0)

Znonymous Coward (615009) | more than 10 years ago | (#7767529)

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

Production Quality OpenSource! (3, Funny)

Anonymous Coward | more than 10 years ago | (#7767577)

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.

Silent Night. Server Side Night. (0)

Anonymous Coward | more than 10 years ago | (#7767622)

>nativily

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

Neat... (1)

gamlidek (459505) | more than 10 years ago | (#7767596)

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

-gam

Postgresql (0)

Anonymous Coward | more than 10 years ago | (#7767598)

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.

Nativily? (1)

Otter (3800) | more than 10 years ago | (#7767607)

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!

This is Crucial - Please Read (Krow, any answers?) (-1)

Amsterdam Vallon (639622) | more than 10 years ago | (#7767609)

I was very excited and downloaded this and figured I could use it for CSI375 (Advanced Databases), which is a graduate student course I'm teaching in Spring 2004.

HOWEVER, I found the following problems with this code. Please do NOT INSTALL on any mission-critical servers at your work/home/etc.

PROBLEMS:

1) I couldn't get the JVM to notice any class updates.
2) Um, concurrency? Yeah, thought so, it doesn't work well at all.
3) Only works with SUN's JDK version 1.4.2_02. What's the deal with this? I don't have root on some servers I work on, so I can't upgrade 1.3 to 1.4 without a huge issue with the IT department.
4) Don't even THINK of sending multiple commands at once. More than one request may spur various threads and seriously SCREW UP the JVM, all but forcing a reboot and restart of your application.

Krow, any thoughts on this? Did you even TEST this out, or are these figured out already?

Java in the DB - very, very bad idea (3, Insightful)

BigGerman (541312) | more than 10 years ago | (#7767620)

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.

Re:Java in the DB - very, very bad idea (4, Informative)

tcopeland (32225) | more than 10 years ago | (#7767744)

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

Re:Java in the DB - very, very bad idea (5, Informative)

laird (2705) | more than 10 years ago | (#7767790)

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

Or Python? (2, Insightful)

Qa1 (592969) | more than 10 years ago | (#7767631)

So when will someone do Ruby?
Or Python [python.org] ?

Re:Or Python? (1)

d99-sbr (568719) | more than 10 years ago | (#7767817)

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

(Jython is a Python interpreter written in Java)

So when will someone do Ruby? (2, Funny)

Trigun (685027) | more than 10 years ago | (#7767658)

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

And a camera.

Re:So when will someone do Ruby? (0)

NoNine (690801) | more than 10 years ago | (#7767751)

Gotta mod this as funny!

Re:So when will someone do Ruby? (0)

Anonymous Coward | more than 10 years ago | (#7767836)


right on brother!
Big girls need love too!

Oracle already does this... (5, Informative)

XaXXon (202882) | more than 10 years ago | (#7767687)

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.

Re:Oracle already does this... (0)

Anonymous Coward | more than 10 years ago | (#7767760)

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.

Where is MySQL anyways? (5, Interesting)

Chitlenz (184283) | more than 10 years ago | (#7767738)

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

Great! (0, Redundant)

butane_bob2003 (632007) | more than 10 years ago | (#7767780)

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.

Security (1)

pantycrickets (694774) | more than 10 years ago | (#7767830)

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

Firebird SQL (-1, Troll)

SirChris (676927) | more than 10 years ago | (#7767835)

Thats nice. I still don't know why everyone isn't using Firebird SQL though.
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...