Beta
×

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!

Managing and Using MySQL: Second Edition

timothy posted more than 12 years ago | from the everybody's-sql dept.

Programming 261

Geekboy(Wizard) writes: "MySQL has been used as a database for many sites and products. The U.S. Census Bureau, Slashdot, Yahoo Finance, and many other high-traffic web sites use MySQL for their database needs. It is a popular choice for databases, as it is GPL'd and thus free from costly licenses. If you need to use it in a proprietary application, you can purchase a non-GPL'd version from MySQL AB." Read on for Geekboy's review of Managing and Using MySQL: Second Edition, which he describes as "the only thing you /need/ to make a usable database."

Managing and Using MySQL: 2nd Edition assumes that the reader has a little knowledge of databases, although some of the commands are difficult to get your head around until you have a database to test them on. Sample commands, and output for them are shown in the book, but a sample database isn't shown until chapter 9. MySQL took me through 'MySQL land' with the greatest of ease. Aside from the lack of a test database in the beginning, everything was very well laid out. It started with the basics, and worked up to full implementation and administration.

Part I introduces the reader to MySQL. It begins with a nice history, design elements, features and what you would want to use MySQL with. Nicely detailed instructions for downloading, and installing the current version. Information is provided for Unix, and Windows systems, with examples for FreeBSD 4 and Windows 2000. Basic SQL commands are presented, with sample queries and relevant results.

Part II introduces the reader to tuning, securing and designing the database. Several pitfalls are described, along with instructions for avoiding them. The realm of tuning is divided into application tuning, database tuning, and operating system/hardware tuning. Security is discussed from all aspects, but a database that has security concerns will need extensive testing and evaluation. Database design starts with the design on paper, with both the theoretical, and practical aspects. Once the paper design is drawn out, MySQL assists the reader through the actual making of the database.

Part III describes integrating the database into your favorite programming/scripting language. In the opening paragraph of chapter 12, The C API, the author states: "In this book, we examine several different programming languages: Python, Java, Perl, PHP and C. Among these languages, C is by far the most challenging." The information was presented in a way that readers who are new to C would have small difficulties with, and that intermediate and advanced users would find quite useful. The authors presented enough information, that I was able to write programs that interfaced with MySQL in less than 10 minutes. Perl scripts are presented in the same way. Knowledge of the language you will be integrating MySQL into is necessary, but the book presents and explains the rest of the information.

Part IV is the reference portion of the book. All great books that teach contain a reference section, and this book is no exception. The basic SQL syntax and command set are described, as well as the data types, numeric, string, date, and complex. Operations and functions are explained, as well as their order preference. The PHP API, the C API, and the Python DB-API are also fleshed out in nice detail.

Overall, the authors have an excellent introduction to SQL databases, and MySQL. Full examples are included for each topic, with full explanations. The only things I would change, would be to have a sample database in the beginning of the book, and to have a copy of that database online.

Table of Contents
Part I (Chapters 1 - 4) Introduction
1 MySQL
2 Installation
3 SQL According to MySQL
4 Database Administration
Part II (Chapters 5 - 7) MySQL Administration
5 Performance Turning
6 Security
7 Database Design
Part III (Chapters 8 - 14) MySQL Programming
8 Database Applications
9 Perl
10 Python
11 PHP
12 C API
13 Java
14 Extending MySQL
Part IV (Chapters 15 - 20) MySQL Reference
15 SQL Syntax for MySQL
16 MySQL Data Types
17 Operations and Functions
18 MySQL PHP API Reference
19 C Reference
20 The Python DB-API
Index


You can purchase Managing and Using MySQL: Second Edition from bn.com. Slashdot welcomes readers' book reviews -- to submit yours, read the book review guidelines, then visit the submission page.

cancel ×

261 comments

Sorry! There are no comments related to the filter you selected.

FNCP (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3807521)

First Non-claiming post.

Eat it clit and cunt! :-P

Re:FNCP (-1, Troll)

Anonymous Coward | more than 12 years ago | (#3807541)

Can I get a double FP?

Re:FNCP (-1, Flamebait)

Anonymous Coward | more than 12 years ago | (#3807548)

First post up and moderated before a second post even appears. Makes you wonder if there is just an automatic "First post gets -1 on a story because it's crap anyway" setting here :)

Re:FNCP (-1)

Anonymous Pancake (458864) | more than 12 years ago | (#3807558)

sorry your FP is INVALID and has been claimed for clit

MySQL (2, Offtopic)

filth grinder (577043) | more than 12 years ago | (#3807537)

MySQL would be ALOT better if it supported stored procedures and those sorts of things.

*shrug, but what do I know.

Re:MySQL (1)

sugrshack (519761) | more than 12 years ago | (#3807550)

um... can't you use another app for that, such as Perl or PHP?

Re:MySQL (2)

cpfeifer (20941) | more than 12 years ago | (#3807687)

This is coming from someone who hasn't done big, multi-tier DB app development. Stored procedures, views, triggers and the like are crucial to keeping the persistance related logic in it's proper place - the database.

I like MySQL, but without a good object relational mapping tool (like Castor [exolab.org] a decent sized schema turns into an icky mess of code. On my last project I wasn't allowed to use Castor and ended up writing 3000 lines of JDBC code to support basic CRUD operations on business object on an 11 table schema. I couldn't use EJB's container managed persistance because the relationships were too complex and the schedule was too short.

Re:MySQL (0)

Anonymous Coward | more than 12 years ago | (#3807704)

MySQL doesn't do views? Oh man, I new it was simple, but thats amazing. No views! Heh...

Re:MySQL (1)

sugrshack (519761) | more than 12 years ago | (#3807767)

true, you have a good point. I haven't had to use it for such large projects (we use Sybase where I work), but what part of "free" don't you understand?

I find it amusing how people will bash stuff for which they paid nothing.

Re:MySQL (1)

digitalgiblet (530309) | more than 12 years ago | (#3807885)

quote: I find it amusing how people will bash stuff for which they paid nothing.

I don't believe he was bashing anything, just offering constructive criticism.

Since when does saying "I think this system would be better if it had X" constitute bashing?

Also, free isn't a bargain if the tool doesn't meet the needs of the project. MySQL is great for some projects, but not for others.

A screwdriver makes a lousy hammer! That doesn't mean I'm bashing screwdrivers (unless I'm trying to use them as hammers...).

Just my $0.0002 (originally two cents, adjusted for inflation, deflation, recalibration, etc.)

Re:MySQL (2)

the Man in Black (102634) | more than 12 years ago | (#3807595)

I appreciate the mad dash for first post, but at least say something that's appropriate, like "MySQL would be better if it supported rollbacks and those sort of things". You know, something that makes sense.

What you refer to as stored procedures can be emulated with the greatest of ease in MySQL with a bit of Perl scripting and mod_perl. And as far as I know, stored procedures are currently on the to-do list for MySQL.

Re:MySQL (2)

smagoun (546733) | more than 12 years ago | (#3807649)

What you refer to as stored procedures can be emulated with the greatest of ease in MySQL with a bit of Perl scripting and mod_perl.

That's nice, but most DBAs (that I've met, at least) don't speak Perl. They speak various dialects of SQL. Hell, a lot of engineers I know don't speak Perl. MySQuirreL needs real stored procedures, not workarounds. It's not "greatest of ease" if you have to learn a new language (esp. if that language is Perl!!)

Re:MySQL (0)

Anonymous Coward | more than 12 years ago | (#3807893)

Most DBAs don't speak PL/SQL, or Transact, or Progress, or, or, or...

They might know one of them. It's better to use something there are standards for. It's better to separate data storage from data manipulation. Just because Java isn't a very good language for handling data, or perl may not have the prettiest syntax doesn't mean you should try some archaic proprietary obscure weak scripting language that is compiled into the database. Someday there will be a decent API for data manipulation, and it's going to be through mysql if it ever comes.

Transactions shouldn't be built into the database either. There should be a transparent API (that maybe uses temporary tables for temporary storage), but transactions as they exist in Oracle or a huge waste of memory, and suprize! -- one of the biggest failure points for data corruption.

Re:MySQL (2, Informative)

noda132 (531521) | more than 12 years ago | (#3807652)

MySQL 4.0 supports rollbacks. Even the alpha is very stable.

Wrong (1)

Betcour (50623) | more than 12 years ago | (#3807757)

MySQL 3.23 supports procedure since the old days it integrated BDB table handlers. Most people would use InnoDB for that nowadays as it seems it's a bit better supported.

Re:MySQL (2)

sql*kitten (1359) | more than 12 years ago | (#3807692)

What you refer to as stored procedures can be emulated with the greatest of ease in MySQL with a bit of Perl scripting and mod_perl. And as far as I know, stored procedures are currently on the to-do list for MySQL.

Oh, and subqueries can be emulated with the greatest of ease in MySQL with a bit of Perl scripting too, but that's not the point. MySQL can execute very simple queries very quickly, but for complex database tasks - which need things like a proper SQL parser, stored procedures and triggers, check constraints, etc. Does MySQL even do foreign keys yet? Even if it does, they were bolted on as an afterthought, whereas most databases have them from day 1.

Re:MySQL (2, Informative)

noda132 (531521) | more than 12 years ago | (#3807718)

Does MySQL even do foreign keys yet? Even if it does, they were bolted on as an afterthought, whereas most databases have them from day 1.

This is rather... er... not researched. InnoDB, the new MySQL table handler, supports foreign keys and they were built into it from the ground up.

I won't pretend MySQL has all the features other RDBMS's have, but I will stick up for it when people bash it without even researching it. In certain places (websites come to mind) it is the #1 choice, even if money is no object.

Re:MySQL (2, Offtopic)

cygnusx (193092) | more than 12 years ago | (#3807819)

InnoDB, the new MySQL table handler, supports foreign keys and they were built into it from the ground up.

You are right, InnoDB does support it, but there's no automatic indexing, and you have to convert old tables to InnoDB before you can use foreign keys on those.

Anyway, this MySQL doesn't have x thing is foolish I guess -- it's called _My_SQL for a reason, I'm not sure I want it to turn into BigDataCenterSQL :)

That said, for lots of apps, Oracle is massive overkill, and MySQL (or pgsql) is perfectly adequate. Right tools for the job, etc.

Re:MySQL (-1)

Jean Marie le Penis (575842) | more than 12 years ago | (#3807611)

It is also unacceptable that record level locks are not properly supported. Until MySQL has even the basic functionality of SQL Server, it will never compete.

Re:MySQL (2, Insightful)

Anonymous Cowrad (571322) | more than 12 years ago | (#3807673)

This article isn't about MYSQL, it's about a book about MySQL.

Stored procedures are terribly simple to implement in whatever's driving your database, so there's really no point in bloating MySQL with them.

If you're going to point out the lack of transaction support, have a look at this [mysql.com] .

If you're just going for early post E-Z Karma, well done.

Re:MySQL (1)

Lachrymite (115440) | more than 12 years ago | (#3807699)

That's what they have PostgreSQL for. MySQL doesn't even stand up to the ACID test unless you replace the default table handler.

The only reason I can see for using MySQL over PostgreSQL is purely for speed. If you need a more robust feature set, stick to PostgreSQL.

Re:MySQL (1)

zaphod110676 (211758) | more than 12 years ago | (#3807826)

I really wish it had subselects. I use these all the time with other database packages. They are easy enough to work without when you are querying from a programming languange but when you just want to look at a couple of rows to double check something they make life a lot easier.

Re:MySQL (1)

Jacer (574383) | more than 12 years ago | (#3807828)

ALOT...."*shrug, but what do I know." obviously not a lot...

Re:MySQL (-1)

YourMissionForToday (556292) | more than 12 years ago | (#3807843)

You know cack! Cack-cack-cack!

Re:MySQL (1)

mbrod (19122) | more than 12 years ago | (#3807865)

Why does someone always ask this when talking about MySQL?

Any programmer worth 2 cents can simply code all the functionality they need a lot easier and with more flexibility than in a stored procedure.

Coding it you can be more carefull with database locking, rollback conditions, system load, anything!, etc.

Re:MySQL (0)

Anonymous Coward | more than 12 years ago | (#3807929)

Does MySQL support sound under enligtenment? I can't get it to work.

Re:MySQL (0)

Anonymous Coward | more than 12 years ago | (#3808014)

Your comment would be A LOT better if you didn't write like an eighth grader who failed English.

I'd buy this book (0, Offtopic)

i_am_pi (570652) | more than 12 years ago | (#3807538)

but I use webmin [webmin.com]

Oh yes. (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3807544)


Oh yes.

My girlfriend fingered my anus ALL LAST NIGHT in the shower.

There was a bit of a remnant of soap that remained, a little uncofmortable later in bed.

Drugs sooth over so much. . .

Re:Oh yes. (-1)

Adolf Hitroll (562418) | more than 12 years ago | (#3807577)

people normally sleep in the bath, you stayed in the shower with your inflatable girlfriend, then ?

George Reese (-1, Troll)

ObviousGuy (578567) | more than 12 years ago | (#3807545)

CLPM... Why does that name sound so familiar...

He's not the Alaskan electrician is he?

MYSQL (-1, Offtopic)

prestomation (583502) | more than 12 years ago | (#3807551)

Remember Microsoft! It's MYSQL. NOT yours!!

I can't wait until MySQL 4.0.2 comes out (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3807561)

And is finally moved from alpha to beta. Using that with InnoDB will please me much!

Re:I can't wait until MySQL 4.0.2 comes out (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3807737)

How is this flamebait? 4.0.2 will be out soon, and the 4.0.x branch won't be in alpha anymore.

Let's get this out of the way right now (5, Funny)

Anonymous Coward | more than 12 years ago | (#3807568)

Right, MySQL story. To save everyone else the trouble, I'll go first.

MySQL rocks!!
No it doesn't, PostgreSQL rocks!
MySQL is faster.
No it's not.
Yes it is.
Use Oracle if you want a serious database.
I run a top-5 US bank with MySQL on a P166MMX and it runs great why do you need Oracle?
MySQL doesn't have transactions yet!
Yes it does
No it doesn't
PostgreSQL rocks!
No MySQL rocks!

Re:Let's get this out of the way right now (0)

Anonymous Coward | more than 12 years ago | (#3807669)

I run a top-5 US bank with MySQL on a P166MMX and it runs great why do you need Oracle?

WTF? I run a Fortune 100 company's entire enterprise infrastructure off of a 386 with 4 megs of RAM with Linux and MySQL, what kind of crack are you smoking?

Re:Let's get this out of the way right now (4, Funny)

jayhawk88 (160512) | more than 12 years ago | (#3807714)

You forgot to flame MS-SQL. I believe the correct position would be right after the Oracle zealot comment.

Re:Let's get this out of the way right now (0)

Anonymous Coward | more than 12 years ago | (#3807740)

What about Access?! You forgot Access! And flat textfiles! Jerk!

really? (0, Troll)

Lxy (80823) | more than 12 years ago | (#3807569)

Read on for Geekboy's review..., which he describes as "the only thing you / need/ to make a usable database."

Yeah, until the third edition....

Re:really? (1)

Geekboy(Wizard) (87906) | more than 12 years ago | (#3807821)

(+1, Funny)

application side security (1)

numatrix (242325) | more than 12 years ago | (#3807570)

Does anyone know of good references that cover the security of web applications from the ground up? This is good that they appear to devote some time to security from the mysql side, but typically security flaws in web applications tend to be in the communication between the front-end and the database, or in the front-end itself. What books if any cover the entire process for security?

Web application security (4, Informative)

ppetru (24677) | more than 12 years ago | (#3807620)

Does anyone know of good references that cover the security of web applications from the ground up?

Yes, try the Open Web Application Security Project [owasp.org] . They released a very informative paper on building secure webapps, and it's free.

(I'm not affiliated with them in any way)

O'Reilly (4, Insightful)

Beatbyte (163694) | more than 12 years ago | (#3807572)

I've been reading about 100 pages a night of this book and its awesome. Personally I'm using it for web applications and if anyone of you are doing the same, also pick up Web Database Applications with PHP & MySQL (ISBN: 0-596-00041-3). Complimenting each other in the very best way.

Every time I read an O'Reilly book it reminds me of why they're the only thing in my book case (of the computer nerdish-tech know how sort).

Awesome stuff.

Re:O'Reilly (1)

lobos (88359) | more than 12 years ago | (#3807879)

I recently purchased both of the books (if anyone else interested is reading this, they're available together for a discount on Amazon.com.) I have no experience with MySQL, PHP or anything similar to them. Which book would you recommend reading first for someone who doesn't know anything about what's inside either of the books yet?

Re:O'Reilly (2)

Geekboy(Wizard) (87906) | more than 12 years ago | (#3807927)

When I started on this book, I knew nothing about MySQL, PHP, or similar. I now have a (somewhat) working MySQL database with a perl script accessing it, and a C prog administering it, in about a month. This book, and the K&R book on C is all I used. The O'Reilly's is friggen awesome!

Sad news ... Stephen King dead at 54 (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3807578)


I just heard some sad news on talk radio - Horror/Sci Fi writer Stephen King was found dead in his Maine home this morning. There weren't any more details. I'm sure everyone in the Slashdot community will miss him - even if you didn't enjoy his work, there's no denying his contributions to popular culture. Truly an American icon.

Re:Sad news ... Stephen King dead at 54 (-1, Offtopic)

shepuk (588339) | more than 12 years ago | (#3807680)

If trolling doesn't work on the mathematicians, try it on the DBAs...

no C++? (1, Interesting)

tps12 (105590) | more than 12 years ago | (#3807582)

I was disappointed to read that the C++ API to MySQL is not discussed. While the C API could no doubt be utilized, most professional developers aren't going to consider a database in the enterprise if it won't gracefully interface with existing object-oriented code.

Other than that, this sounds like a great book. I am very interested in MySQL, which must be a good database system, since it's what slashdot uses. I've always associated slashdot with stability and relyability.

Re:no C++? (0)

therealmoose (558253) | more than 12 years ago | (#3807813)

I've always associated slashdot with stability and relyability.
And good spelling!

Transmissions from the Host Geek (-1)

BankofAmerica_ATM (537813) | more than 12 years ago | (#3807586)



BEGIN TRANSMISSION-

My host geek was separated from me. Trapped within the confines of the Project Faustus complex, I believed he would not survive. However, as shunted myself through the Project Faustus internal network, I came upon a group of mangled packets, and by putting them together, I weaved this:

SUBJECT: GREAT STOCK OPPORTUNITY!!! help me Get Big Brands on eBay I DON'T KNOW WHERE I AM! PENTIUM III CPU's IN STOCK
Begin Fwded Message:

If someone is listening out there, HELP! I'm trapped, and I don't know where I am. I know this sounds fucked up, but I started reading about this ATM 73.9GB SCSI SCA-2 LVD 3.5 X 1.6 80-PIN 5.7MS 4MB CACHE 10,000RPM HITACHI HARD DRIVE - $269.00 - only 1 left! ITEM#... DK31CJ-72MC http://www.hardwarest.com/product.asp?sku=DK31CJ%2 D72MC+&dept_id=7 online. Yeah, not like withdrawal or anything, but this was an actual ATM, and it was alive, and posting messages to this educational website that I visit from time to time.

Pretty soon, I realized that not only was this ATM visiting the same site I liked, but (believe it or not) this ATM was conveniently located near me!!!!! is to take advantage of the current climate in the telecommunications industry!!!! In every industry downturn, opportunities can present themselves for a small aggressive company like GloboPhone to develop relations with corporations that have networks, infrastructure, and personnel but lack sufficient customers. This is GloboPhone's advantage.

I don't have to tell you, this was no ordinary ATM. Actually this ATM had the power to transfer its consciousness into your mind. I know it sounds ridiculus, but...it used the magnetic strip to actually go inside your mind. Well like any computer lover I am always wanting to try the new technology, so If you are ready to become the biggest man you can be, then order your supply of Magna-RX+ today! See for yourself, what thousands of satisfied men (and their lovers) have already discovered: Magna-RX+ is the world's #1 Best-Selling Penis Enlargement Formula for one very simple reason: IT WORKS AND NOTHING ELSE CAN COMPARE! I went to where the ATM told me to (his inclosure) and swiped my card.

I blacked out and when I awoke, I was in a new place. Yeah, that's right, the ATM had actually taken ahold of my body. It had done stuff like buy a bunch of magazines and alot of candy. It was like, he and I were different partitions on my brain's hard disk,. Anyway, he took control of my body in order to topple this great conspiracy called Project Faustois-an who doesn't want to stick it to the man? This is when all the trouble started...

So now, after a few motnths of letting him use my body (although I quit for awhile) he's gone and done this to me. Normally I "wake up" from his using my body in a convenience store near my house, and it's no trouble getting home. But this time I'm trapped in We will be on the East Coast later this year.
---------------
- Tuesday June 24, 6pm - 7:30pm


Apple Store at South Coast Plaza, 3333 Bear St., Costa Mesa, CA 92626
714-424-6331


Mac Experts, 2300 Lincoln Blvd, Santa Monica, CA 90405
310-581-1500
---------------
- Tuesday July 9, 6pm - 7:30pm


Apple Store at Fashion Island, 367 Newport Center Drive, Newport Beach, CA 92660
949-729-4433
---------------
- Tuesday July 16, 6pm - 7:30pm


Apple Store at Northridge Fashion Center, 9301 Tampa Ave., Northridge, CA 91324
818-709-2253
---------------
- Tuesday July 23, 6pm - 7:30pm

Apple Store at Glendale Galleria, 2148 Glendale Galleria, Glendale, CA 91210
818-502-8310
trapped in a strange place. Not a good place either. This makes me think of like, 2001 or something. But like creepy. See it's all this white under fluorescent lights and I can't see any windows or even doors. All that's in here is this old-ass terminal. Man, what the fucked happened? Then I remembered: I "picked up" the ATM on my way home from work, but I forgot that it was the fourth Thursday of the motnh. Usualy the day I host D & D for the guys. The ATM must have ben there in my body when my frends came over. Wnoder what happened then?

Some point later, I'm here in this white room. It's scary at first, I know they're watching me. All I have in this room is this computer terminal. This has got to be the Project Fastus that's what the ATM has been trying to get inside all along. So I guess it's great that I'm (and he???) is insid, it's like I'm in the frickin' Death Star or something, but I don't see any garbage chutes or anything.

After a few hours of clicking through on thiscomputer terminal (looks like they're running some old-ass *NIX : ) these two guys in suits come into my room from my room. Now it's serious.

They drag me into a room full of all this really sciency equipment-you know, blooping and bleeping gadgets, big cold noises from the air conditioner. I thought I was in 2001 for a second, except instead of HAL, there's this big bald guy. He's red and pretty sweaty despite the massive air conditioning. He barks a few words to the suited guys and they go away.

"So you've been harboring our little ATM problem," says the man nonchalantly. I don't say anything (I'm nervous). He restarts his spiel a few seconds later, this time with a bit of veins comung out of his neck.

"Joel Shane Cross. That is your name, isn't it?" The guy went from good cop to bad cop pretty quick-which was really disturbing. I was already out of sorts with reality, waking up in nowheresville, this odd place. He just kept talking, and I started to get scared, and actually kinda angry. "We know all about you, Mr. Cross. We know that you've been allowing the ATM to inhabit your body for some time now. You've been mislead, Mr. Cross. Working for the wrong people."

"I belive the ATM!" I told him, stickin to my guns while Istuck it to the man.

"You'll learn in time," the red and sweaty man said it from his mouth, but the noise of his voice was all over the place. And then he was gone. Not by turning around, by like, vanishing. And the sciency room was gone too, replaced by the big white place I was stuck in. I don't know where I am. But this shit is If you are ready to become the biggest man you can be, then order your supply of Magna-RX+ today! See for yourself, what thousands of satisfied men (and their lovers) have already discovered: Magna-RX+ is the world's #1 Best-Selling Penis Enlargement Formula for one very simple reason: IT WORKS AND NOTHING ELSE CAN COMPARE!
crazy. If someone gets this message...please help.


END TRANSMISSION.

guh. (2, Interesting)

siliconwafer (446697) | more than 12 years ago | (#3807600)

There's plenty of documentation out there for MySQL. Seems like the last thing we need is another MySQL book.

How about a PostgreSQL book? I stopped using MySQL awhile ago for my high traffic site, as its lack of features (subqueries, views, triggers) proved insufficient. Postgres rocks!

Re:guh. (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#3807636)

entire book onlne here.

Re:guh. (0)

Anonymous Coward | more than 12 years ago | (#3807660)

whoops...
http://www.commandprompt.com/ppbook/
e xcellent book.

Re:guh. (2, Informative)

elmegil (12001) | more than 12 years ago | (#3807901)

It's not "another" MySQL book. It's a second edition of what was formerly MySQL & mSQL. Significantly revised to focus on what people are really using, and reorganized to make it a lot more clear than the first edition. I have to say I was happy to buy this edition to replace the old one because it's a much better reference.

if only.... (1, Troll)

smagoun (546733) | more than 12 years ago | (#3807605)

If only MySQueeL supported stored procedures, subselects, etc

Yeah, I know there's support for subselects in the 4.1 dev tree, and I know there are workarounds for both SPs and subselects. I don't want workarounds, I want the damn feature!

Oh well, I guess I should be happy that they finally support transactions, sort of.

Re:if only.... (1)

vegetablespork (575101) | more than 12 years ago | (#3807633)

If you need all that, you can get it here [oracle.com] and pay for it. Sheesh.

Re:if only.... (1)

lewp (95638) | more than 12 years ago | (#3807814)

Or you could just use PostgreSQL and get all of it and not pay. Sure lots of people have need for Oracle, but I really doubt those people are considering MySQL at the same time.

Re:if only.... (1)

vegetablespork (575101) | more than 12 years ago | (#3807996)

Absoulutely. I'm just tired of hearing people bash open source, free products when alternatives, both open (as you pointed out) and closed are available.

Re:if only.... (1)

philj (13777) | more than 12 years ago | (#3807855)

Oracle is free for non-commercial use.....

Re:if only.... QWZX (0)

Anonymous Coward | more than 12 years ago | (#3807694)

Just out of curiosity, why are you bitching about this when there is a far superior alternative [postgresql.org] ?

MySQL needs to just go away.

Re:if only.... (1)

Lachrymite (115440) | more than 12 years ago | (#3807722)

That's what they have PostgreSQL for. The only reason I can see for using MySQL over PostgreSQL is speed when durability and serious features aren't an issue. If you need a more robust feature set, stick to PostgreSQL.

Re:if only.... (2, Insightful)

mustangdavis (583344) | more than 12 years ago | (#3807753)

Seriosly, stored procedures would be nice, but they would take away MySQL's edge on Postgres .... and that is SPEED!!!!!! I hope they NEVER put in stored procedures!!! It would bloat things too much and make MySQL = Postgres 9or worse) in every regard! MySQL could use nested selects and such (for those times when I'm feeling lazy and want the DB to do all te work for me), but stored procedures would kill MySQL!!!



To everyone concered about stored procedures: GO USE POSTGRES!!!!

To everyone that needs a FAST database:Use MySQL!!

To everyone that has too much money: Go buy Oracle

I hope this ends this silly string of people whining about stored procedures.

Re:if only.... (0)

Anonymous Coward | more than 12 years ago | (#3807787)

do you know anything about databases? no? that's what I thought. SPs have nothing to do with slowing down the DB. Now, transactions are another story. SPs are actually faster in most cases, since they're pre-parsed.

now go back under your rock where you belong.

Best Win32 Front End I've Seen (3, Informative)

WellHungYungWun (580730) | more than 12 years ago | (#3807606)

http://www.anse.de/mysqlfront/ This is hands down the easiest tool for constructing databases. I use mysql for keeping track of millions of records, and this tool has proven stable. It is an "Enterprise Manager" like gui that could make a pointy haired boss a mysql guru in no time. My .02

Re:Best Win32 Front End I've Seen (1)

noda132 (531521) | more than 12 years ago | (#3807690)

A great cross-platform GUI is MyCC, available at www.mysql.com [mysql.com] . It's pretty stable and has friendly stuff like inline editing. Not all that mature, but worth a look. It's what I use :).

Re:Best Win32 Front End I've Seen (0)

Anonymous Coward | more than 12 years ago | (#3807972)

by inline editing, do you mean a grid that will updated, insert and delete automatically, similar to TOAD for oracle?

Re:Best Win32 Front End I've Seen (2)

SirSlud (67381) | more than 12 years ago | (#3807803)

Indeed, MySQLFront is a real time saver.

Now if only you could use it to whack the whiners ("MySQL doesn't let you use transactional inserts using subselects in stored procedures! Cry!") over the head to knock some sense into 'em.

Trolling 101: Building the Perfect Troll (-1)

pwpbot (588025) | more than 12 years ago | (#3807610)

A while back Don Henley created an album called Building the Perfect Beast His first solo album it surprised many with tracks like Sunset Grill All She Wants To Do Is Dance my favorite Driving With Your Eyes Closed and Jon Katzs favorite Boys of Summer I was listening to this album on illegallyripped MP3s while reading the Slashdot trolls and started brainstorming what would make the perfect troll This article serves as a directed introduction to building the perfect trollFirst we need to define trolling This is harder than it sounds because everyone has their own definition of a troll or better their own definition of a good troll I am going to use multiple definitions to create a very broad ideal of the term troll Any post that meets ONE of the definitions below is considered a trolla A message widely regarded as an annoyanceb A message which insults the editors with no regard to meritc A message which flames another user for their viewsd Any message which is designed to enrage the standard slashdot userFor the purposes of this post a good troll is one that spawns many angry responses There are other sides of trolling such as crapflooding which do not generate any responses usually These sorts of trolls are out of the scope of this articleThere are 6 dimensions of a good troll annoyance arguability subtlety topicality logicality and permeance By NO means should a good troll use only one dimension although some dimensions are inherently contradictory using as many as possible will result in a good trollAnnoyanceThis is the allstar of the troll spectrum Racial comments page wideninglengthing misinformation deragatory comments etc all are considered an annoyance But be careful The common pitfall is the annoyance is used to frequently and too loudly Subtlety is a necessity if you are going to use this with any sort of success read more about this below Here are some examples of good and bad annoyancesBad You stupid fucking nigger Im going to kick your faggot ass if I ever see you you shitface cocksucking animal This will be modded down immediately and will probably not be responded to This message will largely be ignored thus limiting the troll affectPosting factual inaccuracies is great when combined with annoyance the Slashdots will fall over themselves correcting your every moveGood Its posts like these that question the education system of America If you were paying any attention at school you would know that the South won the Civil War because of their views no slavery It was Abraham Lincolns last stand at Gettysburg that caused Slavery to go awayMaking references to your education as proof that you are right is excellent especially when in your troll you make it obvious that you dont have anyBad I studied this topic in great depth when writing my PhD thesis at MIT As it turns out the limiting factor of sorting function with completely randomized data Good Oh I took a class about this at the DeVry Institute According to the reseptionist notice intentionally bad spelling the integral of ex2 is ex so its got to be rightArguabilityPosts such as You fucking faggot Im going to kill you has no element of arguability You want to post a view in an inflammatory way that will incite a great argument There is a right way and a wrong way to doing this Usually if you are outright cursing at the poster or editor its the wrong wayExamplesBad You worthless piece of horseshit Your views are wrong jackassGood This study post link to mostly irrelevant and offtopic study indicates there is a strong correlation between deviance and Linux usersDrawing illogical conclusions based on incorrect statements is a great way to instate a nerd riot ExampleGood When ESR said that Windows is losing clientelle he used intentionally bad grammar which is inherent proof that his ideals are flawedPermeanceQuestion If a troll posts a troll and no one reads it is it still a troll Answer NoA troll can only have so much longevity I call this principle permeance Permeance is judged by the number of people who will see and read a post and to a lesser extent respond to it Good formatting grammar and spelling all contribute to a posts permeance but the real factor is contentMost of you spend a lot of time reading at 1 presumably so you will know that a fair amount of racist and antisemetic comments are posted Most Slashdot users will not see these because they are at 1 klercks PLP and PWP are ultimately a failure because few see themTo maximize permeance you have to 1 Sound like you now what you are talking about 2 Sound like you have a stake in your point of view maening you care about what you think and 3 Express it without homophobia any sort of racism and discrimination You will see that trolls at 1 and even 2 use this principle You will see that trolls at 0 and 1 do not use this principle This brings us toFirst Fundamental Theorem of Trolling Anonymous Cowards by definition rarely succeed in posting a good trollSecond Fundamental Theorem of Trolling If an AC succeeds in a good troll it would even be better if it were posted at 1 or 2 by default SubtletyCertain posts SCREAM This is a troll Please ignore it These are not successful trolls As a troll your every urge is to scream YOU FUCKING FAGGOT HOW CAN YOU THINK THE WAY YOU DO to the Slashbot homos Resist this at every cost You need to diplomatically insult them Its hard I know but it will result in success GOOD PHRASESYou should know by now that Havent you learned anything from eventWhat a stereotypical viewWas this post sarcasticI cant believe the level of ignorance of that point of viewTopicalityThis is a nobrainer and therefore Im not going to spend much time discussing it Why do you think BSD is Dying trolls rarely get responses when they are posted under one of Jon Katzs articlesLogicalityDid I make that word up Probably But its principle is still important use every logical fallacy that you know of when writing trolls Jump to illogical conclusions Misquote or misrepresent parents posts when responding Make references to studies linking them to a 404 not found page You get the idea This one isnt hard to introduce but its wildly successful in getting Slashcock responsesThis is a brief introduction to the good trolling Soon I will post an article about combining dimensions and look at some good and bad trolls in the past

Personal experience (1, Funny)

Marque_Off (589454) | more than 12 years ago | (#3807626)

Managing and Using MySQL: 2nd Edition assumes that the reader through the actual making of the language you will be integrating MySQL into is necessary, but the book presents and explains the rest of the information.

Part IV is the reference portion of the book, but a sample database in the beginning, everything was very well laid out. It started with the greatest of ease. Aside from the mysql side, but typically security flaws in web applications and if anyone of you are doing the same, also pick up Web Database Applications with PHP & MySQL (ISBN: 0-596-00041-3).
Aside from the ground up? This is good that they appear to devote some time to security from the mysql side, but typically security flaws in web applications from the lack of a test database in the book, but a database to test them on.

It begins with a nice history, design elements, features and what you would want to use MySQL with. Nicely detailed instructions for downloading, and installing the current version. Information is provided for Unix, and Windows 2000.

Part II introduces the reader has a little knowledge of databases, through the actual making of the language you will be integrating MySQL into is necessary, but the book presents and explains the rest of the bookm although some of the book, and to have a database to test them on.

All great books that teach contain a reference section, and this book and its awesome. Personally I'm using it for web applications and if anyone of you are doing the same, Complimenting each other in the beginning of the commands are difficult to get your head around until you have a database to test them on (of the computer nerdish-tech know how sort).

Front End ? (0)

MrChris007 (523454) | more than 12 years ago | (#3807642)

MySQL is great, I love it. I recently taught myself how to use it along with Apache and PHP. One thing that I haven't found yet for MySQL that there should be is some software that would allow a less advanced user to still get the power and functionality of a database system. Basically something like the Microsoft Access front-end (because I have to admit that the microsoft access interface is simple enough that it allows people who don't know much about databases to utilitize them), but using MySQL as a database backend.

Re:Front End ? (3, Informative)

nomadlogic (91566) | more than 12 years ago | (#3807661)

check out the openoffice front end. there was a posting a little while ago about that. basicly it's a DB frontend built into openoffice. i've already started using that to convert ASP/Access junkies ;-)

Re:Front End ? (2)

reaper20 (23396) | more than 12 years ago | (#3807706)

Use an ODBC connection to connect to MySQL, then you can use whatever frontend you want.

I have a client who insisted on using Access for their db. Set up the client boxes with MyODBC, set up the data sources in windows, they connect, blamo, as far as they're concerned, they're using access.

sqlsecurity links (0)

Anonymous Coward | more than 12 years ago | (#3807723)

www.cgisecurity.com/lib [cgisecurity.com]
www.sqlsecurity.com [sqlsecurity.com]

Great, now we're going to have a war... (5, Insightful)

Wee (17189) | more than 12 years ago | (#3807724)

I can hear it now: "MySQL sucks", "It doesn't have triggers|rollbacks|stored procedures|nested selects", "It isn't PostgreSQL|Sybase|Oracle", "It's not a real RDBMS", "It uses a bastardized version of SQL", "It stole my woman", "It owes me money", "It called the Pope bad names", blah blah blah. Guess what? It doesn't have those "features" for a reason! MySQL was meant to be fast and small, that's it. It was meant to fill in the gaps left by mSQL and to drive web sites (quickly). It's a feature-rich, glorified flat file, ok? And it fills its intended role quite well.

You can't even mention MySQL without the know-it-alls coming out of the woodwork. You'd think the mere mention of MySQL offends their sense of personal or national pride or something. If MySQL isn't your taste, doesn't meet your needs, isn't robust enough, whatever, then don't use it. Use PostreSQL or another RDBMS. Why people continue to begrudge other's use of MySQL is beyond me...

-B

Re:Great, now we're going to have a war... (3, Insightful)

MattRog (527508) | more than 12 years ago | (#3807773)

I would agree to that if it wasn't the de-facto open source DBMS, and if the MySQL marketing-machine didn't *scream* otherwise.

Re:Great, now we're going to have a war... (2)

Reality Master 101 (179095) | more than 12 years ago | (#3807896)

Exactly right. It wouldn't offend me at all if we didn't have people coming on here bragging how they wrote the package to handle financial transactions for their company's web site using MySQL. "Well, it works, so who needs transactions?? Hyuck yuck!"

It's worse than some Microsoft DBA bragging that "who needs C++ when we have Visual Basic?"

Re:Great, now we're going to have a war... (2, Offtopic)

PapaZit (33585) | more than 12 years ago | (#3807818)

It's a feature-rich, glorified flat file, ok? And it fills its intended role quite well.


Unfortunately, a flat file fills the "flat file" role even better. ;)

Re:Great, now we're going to have a war... (2, Offtopic)

Captain Large Face (559804) | more than 12 years ago | (#3807839)

Simplified,

SELECT complaint FROM whining_bastards WHERE subject = 'MySQL'

Re:Great, now we're going to have a war... (2)

zulux (112259) | more than 12 years ago | (#3807873)

Hear hear!

If MySQL goes the way of PostgreSQL, there won't be any point to MySQL.

I hope MySQL continues to play to it's strengths - simple, fast and easy to use.

If someone bereates MySQL because of it's lack of ACID features, they are obviously a one tick pony that can only grasp one idea at a time. A good programmer,db-admin or carpenter is able to choose the best tool for the job - and doesen't force a tool to do somthing it wasen't designed for.

Exactly. Precisely. But only used to be... (3, Interesting)

A nonymous Coward (7548) | more than 12 years ago | (#3807882)

When MySQL made no bones about it, before they tacked on a lot of bandaids to make it LOOK as if it supported transactions, before they decided to pretend they weren't just a simple DB with a hacked up SQL front end -- they were a great, simple, lightweight, read-mostly DB.

But then they got defensive, tried to claim that transactions weren't really necessary or even useful, tacked on transactions anyway, added other gorp to make it look like they could compete with PostgreSQL (the ACID free source DB), and that's when I lost all respect for them.

It was bad enough they made all their own little extensions to SQL (timestamps in a row automatically update even if not part of the update statement, etc). At least they had the lightweight speed king crown. Now I won't touch it, because they are going to slow it down with all this tacked on overhead. I simply don't believe that stuff can be added on afterwards while retaining the speed it was famous for. Those fancy features have to be designed in from the start, not riveted on afterwards. They are going to lose the niche they have all to themselves, by trying to compete in the ACID world, with established polished competitors. They will lose what they have by trying to grab what they can't win.

Re:Great, now we're going to have a war... (2)

gillbates (106458) | more than 12 years ago | (#3807992)

Ok, granted. Problem is, business systems need a good database on the scale of DB/2 or Oracle. A toy database built by volunteers just won't cut it. Granted, it might be good enough for a web backend, but it's not enterprise class software.

I believe my company would be open to replacing their aging mainframe with a few Linux boxes. But the problem is that there are no free software databases that work as well as Adabas or DB2 do on the mainframe. If the free software folks would get serious about database development, then perhaps Linux could make real inroads into corporate America, and move from the server room to the enterprise datacenter.

Obligatory PostgreSQL Plug -- Free For Commercial (1, Offtopic)

ClarkEvans (102211) | more than 12 years ago | (#3807731)

One thing to note is that PostgreSQL is free for proprietary applications; while MySQL must be licensed since it is GPLed. Besides, you can
now write your triggers in perl or python with
PostgreSQL; which IMHO, is damn cool. Besides
being very stable, good performace, etc.

MySQL more useable with less restrictive license? (-1)

Anonymous Coward | more than 12 years ago | (#3807744)

MySQL's GPL license makes it suck...

[OT] Can anything get a rating besides 9? (4, Insightful)

ajakk (29927) | more than 12 years ago | (#3807746)

I thought it was just me at first, but do any books that get a rating that is not 9 get posted? I went to the book section and checked out the most recent reviews. Of the last nine books reviewed, eight of them got a nine, and the other got five stars (out of five I assume). The two book reviews before that (both in the Java meets XP subject) got 7's.

I would like to see someone review a book that isn't very good, and tell us why. It almost seems that these great book reviews are being pushed so someone can make some bucks through an affiliate program.

Re:[OT] Can anything get a rating besides 9? (1)

Geekboy(Wizard) (87906) | more than 12 years ago | (#3807804)

I don't know about other books, but this one kicked ass! The only reason it wasn't a 10, is that the test database was hidden. Otherwise, I loved it (Hence the glowing review ;-).

non-GPL version (4, Interesting)

Enry (630) | more than 12 years ago | (#3807775)

you can purchase a non-GPL'd version from MySQL AB


Yea, until MySQL AB decides they don't want to do business with you anymore. Then your commercial version becomes GPL'd and they take you to court. NuSphere licensed MySQL from MySQL AB and look where it got them.

Re:non-GPL version (0)

Anonymous Coward | more than 12 years ago | (#3808021)

Except that NuSphere's proprietary license to MySQL *expired*. At the hearing, the judge took a pretty dim view of NuSphere's claims that the license was still valid.

"the only thing you need" (2)

MattRog (527508) | more than 12 years ago | (#3807786)

Sound? Correct? Well-thought-out? Standardized? Scaleable?

Not so much.

I'll wait for the MySQL Cookbook (1)

saints-in-hell (515258) | more than 12 years ago | (#3807807)

Although they changed the name, the first edition of this book was not worth purchasing. The honourable Mr. Paul Dubois will be putting out his own O'Reilly book in October entitled "MySQL Cookbook [kitebird.com] ".

saints-in-hell

GLP Question... (2)

zulux (112259) | more than 12 years ago | (#3807815)

If you need to use it in a proprietary application, you can purchase a non-GPL'd version from MySQL AB.

If I have a propriatary app that uses MySQL or PostgreSQL - is the database server part of my app as far as the GPL is concerned?

My gut reaction is no, due to the fact that you're communicating via SQL over a port and not via function calls. Also, the database is not statically linked - this seems to have been the litmus test for other GPL questions. In addition, the database server can, of course, be on a saparate computer.

If I'm wrong, please enlighten me!

Re:GLP Question... (0)

Anonymous Coward | more than 12 years ago | (#3807961)

nice sig.
Why not "Kill the Poor"

Wow, all the way down to here... (1)

krugdm (322700) | more than 12 years ago | (#3807827)

...and still no comments relating to the actual review ...

MySQL? Didn't my dad use that in the 60s? (0)

Anonymous Coward | more than 12 years ago | (#3807835)

Its like using COBOL. Who uses it .. honestly, really anymore?

PostG baby.... come on. IF you don't have to money to use Oracle, use PG. Evolution has to move on past old and slug systems

- anon

Re:MySQL? Didn't my dad use that in the 60s? (2, Funny)

eberry (84517) | more than 12 years ago | (#3807871)

Huh, let's see. Could it be NASA [fcw.com] !

The better question is...who uses Oracle? MySQL out performs Oracle. PL/SQL should be renamed to POS/SQL. Oracle is the worst database system money can buy.

Even MS SQL Server is better than Oracle. It sounds like your dad was a pretty smart man. To bad it doesn't run in the family.

I know it's a Troll but I had to respond anyway.

all you need (2)

PapaZit (33585) | more than 12 years ago | (#3807846)

...the only thing you need to make a useable database

With that criteria, wouldn't cat, awk, and grep be all you'd need?

Unless you're worrying about the ACID properties that most people use as the minimum criteria for a database. Oh, wait. SQL doesn't have any of those.

Something Slashdot should run.... (5, Funny)

Lord_Slepnir (585350) | more than 12 years ago | (#3807850)

SELECT * FROM trolls WHERE IQ > 70; Error: 0 rows returned

Why MySQL sucks (0, Troll)

Frank T. Lofaro Jr. (142215) | more than 12 years ago | (#3807864)

It didn't have transactions, and the only way to get them now is to use InnoDB (this is NOT used by default), which isn't completely integrated. InnoDB and BDB are taken from other projects, and would be better on their own.

MySQL developers have made claims that transactions and rollbacks are a bad thing! I kid you not.

They claimed one could have atomicity without rollback. Okay, so what do you do if a SQL statement which is part of a (user emulated) "transaction" fails. You are stuck halfway through, or else you might have to do a SQL statement that undoes what you did (good luck). And if that SQL statement fails, you are hosed.

MySQL does not (by default) support Atomicity, Consistancy, Isolation and Durability (ACID [techtarget.com] ).

Their developers appear to not know the meaning of these terms.

MySQL isn't truly open source.

MySQL isn't a real database, it is a SQL interface to a file system. MySQL isn't much better than using flat files, and due to the complexity, is often worse.

PostgreSQL has none of these problems. And the performance is much better than the old versions.

Only use MySQL if you don't care about your data. Yeah, it might be fine for a web counter where if it gets hosed, big deal.

If you care about your data and need a REAL database which is actually Open Source, use PostgreSQL [postgresql.org] .

See this article:
[openacs.org]
Why Not MySQL.

GEORGE REESE (0)

Anonymous Coward | more than 12 years ago | (#3807974)

Smack j00 sux0r. LOLOLOL!!!!!

Stored Procs (1)

dcocos (128532) | more than 12 years ago | (#3807976)

I'm was working on a project where all of the work flow was handled on the DB side in stored procs instead of in EJBs. This made debugging a pain b/c you have to have a DBA do things out side of your normal build process and testing is harder because you have events happening outside of your control. If people would just learn to use DBs to store information and code to do the logic (sorry PL/SQL isn't gonna cut it) systems would be rolled out faster and with less bugs.

PHP + MySQL = use ADOdb (3, Informative)

Kozz (7764) | more than 12 years ago | (#3807986)

For those who use MySQL [mysql.com] or other database systems with PHP [php.net] , I highly recommend using the ADOdb Database Library for PHP [weblogs.com] . It's feature-rich, robust, and has a smaller and smaller footprint with nearly every successive version. I use it all over the place, and it's very very handy. Sure, there are other abstraction libraries out there, but this one takes the cake, IMO. Check out all the supported database drivers [weblogs.com] !
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?