Category Archives: Tools

Put Me To Work For You

(The Executive Summary: I left my job last week, and I start working at The Pythian Group on Monday. Go to their website if you’d like to work with me, or with people just as knowledgeable as me.)

I get inquiries all the time about consulting. Folks are madly searching for experienced MySQL DBAs. The lure of a new environment is always tempting, however, working for any one environment has its quirks. In October I realized I was coming up on having worked 2 years at my job. That’s not a very long period of time, but it certainly was long enough for me to learn the environment and get stuck in a rut — mostly my rut was doing more systems work than database work.

I looked around for other places of work, and had a wonderful interview at an awesome company to boot. However, they were also a product company, and I’d decided that I wanted to move to a service company. That is, a company that provides database services to a wide variety of environments. A company that sells products still usually has one environment, or at least one environment that I would work in. With a service-oriented company, such as a consulting firm, I can gain the experience of many environments and many setups.

Learning from my co-workers is important too — too many shops have only 1 or 2 MySQL DBA positions, which leaves me with 1 or 0 MySQL colleagues at work. Being the big fish in a small pond has its advantages, but it’s also too easy to get caught in my own ways of doing things and not see another side of things.

So, I thought about where I’d want to work. There are many great MySQL consulting firms out there. I looked at the ones I knew about — most of the ones run by Planet MySQLers I ruled out because either I didn’t have the right skillset (I’m not a programmer, C or otherwise!) or because I thought there might be personality conflicts, or because I’d have to move.

That was a big one — having to move. I have to stay in the Boston area, at least for now. My husband and I discussed things, and we’re not willing to move right now. Also, I hate too much travel. Anything more than 10% really wears me down. And that, sadly, put MySQL’s own consulting out of the running. I just cannot travel that much.

So where does that leave me? Well, I called up The Pythian Group and we had a few hours of great phone conversations.

Next week, I fly to Ottawa for training! There will be a Boston office opening, but that’s after I finish 2-3 weeks of training.

I’m very excited to learn more about how The Pythian Group operates, as well as getting down and dirty with different environments, and solving lots of problems.

What’s in a Name? Everything!

Peter makes an interesting post about the MySQL company’s trademarks at http://www.mysqlperformanceblog.com/2007/10/26/mysql-support-or-support-for-mysql-mysql-trademark-policies/

The point is that Peter is not selling “MySQL Support” — he is selling “Support *for* MySQL”. “MySQL Support” is the name of a product that MySQL offers. Even if some other consulting company used the name before the MySQL company ever did, MySQL still has the rights to the name.

I chose to name my podcast “OurSQL: The MySQL Database Podcast for the Community, By the Community.” I chose every word carefully. For instance, I call it “the MySQL Database Podcast” so that anyone looking for a podcast about “database” will find it.

I could have just called it “MySQL Podcast”. But if the company MySQL (AB or Inc) ever makes a podcast, they would do the same thing to me that they do to you. I have to distinguish it’s “a podcast about MySQL”, not “MySQL’s podcast”. In fact if you look for “oursql” references, there is actually software released in September 2001 called “oursql”, but it was only released once and I have only ever found a handful of e-mails about it.

Similarly with “Technocation, Inc”. I googled around for it and found that a Baltimore, MD USA paper has a column called “technocation”, and it’s similar to why I picked the name — technology + education. But there’s no way anyone would confuse the two.

Same thing as MySQL would do if they made their own toolkit. “MySQL Toolkit” is in fact a really bad name because it’s so generic. Right now there’s no confusion, because MySQL doesn’t have a toolkit. Same with the “MySQL Magazine”. If MySQL ever puts out a magazine, they’ll send a letter right away. I was actually worried that “The MySQL Guy Podcast” at http://www.themysqlguy.com/ would get a letter from them. After all, there are plenty of “MySQL guys” out there, and he doesn’t work for the company……(hence why I’m the “She-BA”, not “MySQL Gal”).

In fact, Microsoft seems to do this on purpose. They named their database engine “SQL Server”. I’ve been frustrated when I get Microsoft pages when I’m just looking for “something relating to SQL”. I’d much rather get something related to the SQL standard. Same with their “Windows Mobile” platform. Check out their list of servers on the right-hand side of the page at http://www.microsoft.com/servers/default.mspx — if you’re looking for “security” on a Windows server, chances are most of your search result will be for the “Security Server” that Microsoft offers. Ditto with “Content Management Server” and “Data Protection Manager” and “Speech Server” and “Virtual Server” and “Small Business Server”…etc.

If you have questions about Intellectual Property (IP) or Patents in the United States, I highly recommend retaining services from the law firm of Bakos and Kritzer — http://www.bakoskritzer.com/. It’s not just a law firm where my brother is a partner, it’s also a damn good one.

(Speaking of name, I will likely be changing my name in the near future to “Sheeri K. Cabral”, so if you see it around, don’t get confused. You can always find me at www.sheeri.com )

One Size Fits All

I was pointed to an article about how the “one size fits all” database model doesn’t work anymore — how Oracle, DB2 and Ingres were written so long ago, they’d have to be rewritten to meet the needs of today’s database users. Jacob Nikom pointed the article to me; apparently he contacted the author and started to explain how MySQL meets that criteria, but the author disagreed.

Read the article for yourself:
http://www.databasecolumn.com/2007/09/one-size-fits-all.html

Anyone else notice the irony of saying “all those other DBMS’s aren’t a one-size-fits-all solution, but this one is?” I think that MySQL comes the closest to a DBMS that is NOT “one size fits all”, given the multiple storage engines available. What other DBMS will allow you to use your Amazon S3 account as a table? What other DBMS will allow you to use a .csv file as a table without importing? It’s not perfect, because there’s still a basic layer of functional implementation that the MySQL server handles (and must), but it’s the closest.

Note that the article is written by the founder and CTO of the software solution mentioned.

What If?

What if last week’s announcement by MySQL had been the following?

Some major MySQL distributors have brought some issues to our attention. These distributors have been legally distributing the Enterprise version of MySQL to folks that do not have a MySQL support contract, without their knowledge or consent.

When a user installs an open source operating system and includes MySQL, should that user get the Community version or the Enterprise version? Since the source code was split back in October 2006, MySQL AB has felt that users should use the Enterprise version only if they intend to. We have made the source easily downloadable, so folks that want to use Enterprise, are able to use Enterprise.

However, given that distributors have been doling out Enterprise to unsuspecting users, we decided to change a few things. Firstly, we recognize that folks may be downloading Enterprise because they do not understand that Community is what they need. MySQL has very good binary builds available, with very little to be gained by users compiling their own binaries. We hope that folks have not been frustrated by a build process when they could have downloaded Community.

Secondly, the MySQL distributors have brought about some issues which would need to be fixed if we want them to distribute MySQL Community. Those issues are:

1) Scheduled releases of MySQL Community code — we will now schedule Community code releases 4 times per year, to meet this request. In addition, we will release binaries for Community twice a year, as needed.

2) Feature stability — we thought we could implement community-driven features in current releases. Sticking in a new feature to a current release jeopardizes the stability of the feature in that release. Also, we haven’t quite managed how to do that, and it will be easier to patch a feature into a non-GA release.

3) Newly GA releases will have monthly binary builds — A release that recently went from alpha or beta to GA will continue to receive monthly binary builds and releases until such time as the release is stable. We expect this to be for several months after the GA is announced.

You might notice that the Enterprise source binaries have been taken down off ftp.mysql.com. This is because we wanted to make sure that the folks that were downloading Enterprise were doing so because they wanted to download Enterprise, not because they went to the download screen and thought “Enterprise” sounded better than “Community”.

How would you have felt if that were the announcement? Because that is how I read it. Maybe it’s too little, too late, but I really feel as though the negativity associated with the announcement came from folks who used the announcement as a reason to talk about why the split is a bad idea. There’s plenty of work to do to make the split better, but the announcement last week was so simple, and didn’t deserve all the attention and negativity it garnered.

OurSQL Episode 20: The Pythian Group

In this less technical episode we interview Paul Vallee, where he explains in depth about the Pythian Group.

Special thanks to folks who have linked to the podcast:
WebDevRadio
http://www.webdevradio.com

Episode 34, July 9th, in which Michael mentions OurSQL and hopes I haven’t “gone dark”. Nope! http://www.webdevradio.com/index.php?id=50

Kristina Hadges, a web designer, linked to the podcast
http://www.nineofnine.com/resources

Feature:

The Pythian Group
http://www.pythian.com

Feedback:
Direct play this episode at:
http://technocation.org/content/oursql-episode-20%3A-pythian-group

Feedback:

Email podcast@technocation.org

call the comment line at +1 617-674-2369

use Odeo to leave a voice mail through your computer:
http://odeo.com/sendmeamessage/Sheeri

Or use the Technocation forums:
http://technocation.org/forum

Free As In Water

So, the open source community/mentality/legacy/mindset tends to be attached to the idea:

“Free as in beer” — for comparison’s sake, another meaning could be, “free as in speech”.

Wikipedia has a good explanation of this, making “free as in beer” equivalent to “gratis,” meaning “free of cost.” Whereas “free as in speech” is equivalent to “libre,” free of restrictons.

Now, I understand why some things cost no money but are restricted. I also understand why some things cost no money and are not restricted. I do not have a particular religion either way, I think each product’s business model can be different.

So I’ll present a third concept: “Free as in water.”

Water is a privilege. In many places, we turn a handle and clear, potable, disease-free water comes out. We can drink it, we can wash ourselves with it, and we can luxuriate in it, as in a bath. However, many people in those places take it for granted that clean, potable, disease-free water will always come out when that handle is turned. Water is a precious commodity, though very often not treated as such. Many of us in the first world have not experienced how precious water is, as have those in the third world (“developing world” is the politically correct term these days).

I was reading randomly the other day, and came across a blog post where someone asked, “should water be free in a restaurant?”

There were a few repeated responses:

1) No, water should not be free in a restaurant. The water does actually cost money, and owners of properties typically pay a water bill.
2) No, water should not be free in a restaurant. While the water may be “free”, the glass is not, and neither is the waitstaff who bring you the glass and refill the water.
3) Yes, water should be free in a restaurant. The amount of water used does not cost that much, and the waitstaff is there anyway, so do not cost more.
4) Yes, water should be free in a restaurant. It puts me off when water is not, and I do not go back to those restaurants.

As I was reading, I immediately thought of open source business models. Because open source is, at its core, “free as in water”. The product is the water — whether it’s server-side software like Apache or MySQL, desktop software (aka “freeware”), an operating system such as Linux, or programming software such as PHP, Ruby or Perl. Much like water in a restaurant, as compared to other drinks, the cost is negligible. For instance, the cost of water compared to the cost of a soft drink is much less in most places.

Similarly, the monetary cost of MySQL compared to Oracle, or the cost of Linux compared to Microsoft, is much less.

Should all software be free? Certainly, I don’t think everything on a drink menu should be free. Oracle and Microsoft have a lot of overhead, and at the end of the day families need to be fed. Much like in a restaurant, though, open source software is the result of one or more folks doing work. Some of that work is programmatic, and yes, like water to soda, the programmatic cost is often less than the programmatic cost of the commercial entities. However, the waitstaff is analogous to support. Why is it that nobody thinks “free refills on drinks” is a ploy to get a bigger tip for waitstaff, yet many people think offering a free product with for-pay support means that the product is shoddy and of course you will need support?

That clean glass your water comes in is equivalent to QA. And yes, it’s not perfect — occasionally we find a spot of lipstick on the glass from a previous customer, and send the glass back.

So I believe the open source legacy should be that it is “free as in water” — it should be ubiquitous, though we should treasure it because it is truly valuable and if it did become rare, we would lose a lot of quality of life.

Nobody thinks “If you give away free water, nobody will ever buy a drink!” Yes, free water is a bit disruptive, but there will always be folks that use SQL Server, with it’s fabulous data analytics, and Oracle, with its long history and name recognition — just as there will always be folks willing to pay US $10 for an alcoholic drink. It’s not that someone paying $10 for a drink, or $5 for a beer, or even $2 for a soda is dumb because they could have just had water for free. It’s that sometimes you need water, and other times you want a $10 drink.

Now, MySQL has the potential to turn water into wine, and in that case, it’s even more disruptive…….

So, thoughts on the “free as in water” concept?

Work With the She-BA

You’ve heard me on the MySQL Podcast at http://www.technocation.org, now come work with me, the “She”-BA!

The company I work for is an online social networking/dating site. Our main product is for men seeking men in 87 countries throughout the world. We’re looking for another MySQL DBA, as designing schemas maintaining data integrity for our 1 million users (and growing fast!). The salary is dependent upon experience of course, but the company I work for pays on the high side of the industry standard for the Boston area.

Application Instructions
Please send cover letter, résumé and sample schema to work@online-buddies.com, with “MySQL DBA” as your subject. The
sample schema should reflect your abilities, so if you send along a schema you would like to see improved, include a description of what you would love to do to that schema to make it better.

The fun “requirements”:

  • A schema of 1 database with 85 tables — all of which have an auto-increment id as their primary key — makes you cringe
  • Knowing the difference between InnoDB and MyISAM storage engines and when you might use them
  • You cry when you see field names like “ExtraInfo1” and “ExtraInfo2”
  • You want to poke your own eyes out when you see schemas full of varchar(20) default NULL
  • When someone says, “Can you add a [type, ie, INT, BLOB] field to the table for me?” your first response is, “Sure, why do you need it?”
  • You know that “data warehouse” is not a synonym for “replicated copy of the database” — and if you did not, your first thought upon reading that was “It isn’t? I wonder how the schemas would be different?”
  • When designing a schema, you draw out an ER diagram first (or are willing to learn how)
  • Thinking about what data will be stored is the most important thing to you when you’re creating a table, not how the application will access it
  • You are comfortable with a job that does not involve writing code in a procedural language, but are comfortable enough if you have to help debug code written in a procedural language that you could.
  • You answer the question ‘Do images belong in the filesystem or the database?’ with ‘it depends’ and can go through scenarios of when each one is appropriate. (Alternatively you say “I have no idea” and do some research)

On to the more boring description…..
Continue reading

OurSQL Episode 16: The Art of Innovation, Guy Kawasaki

I take the easy way out again this week by sharing Guy Kawasaki (of the How To Change the World blog) and his irreverent and truthful keynote at the 2007 MySQL Users Conference.

Kawasaki will challenge your thoughts about being an entrepreneur in the technology industry.

The big news is that soon I’ll be able to announce that the videos from the conference sessions are up….stay tuned!

Show Notes:
Guy Kawasaki’s Blog: How to Change the World
http://blog.guykawasaki.com/

Direct play this episode at:
http://technocation.org/content/oursql-episode-16%3A-art-innovation%2C-guy-kawasaki

Download all podcasts at:
http://technocation.org/podcasts/oursql/

Subscribe to the podcast at:
http://feeds.feedburner.com/oursql

Feedback:

Email podcast@technocation.org

call the comment line at +1 617-674-2369

use Odeo to leave a voice mail through your computer:
http://odeo.com/sendmeamessage/Sheeri

Or use the Technocation forums:
http://technocation.org/forum

Easiest Application-Level MySQL Auditing

This article shows the easiest way to audit commands to a MySQL database, assuming all content happens from an application. Now, this will use a lot of storage, and doubles the query load for each query, but it’s useful for when you know you want to capture the information of someone using the application.

The basic premise is simple. Logon to your nearest MySQL server and type the following:

SELECT CURRENT_USER(), USER();

Chances are the values are different. More on this later.

First, create a table:

CREATE TABLE `action` (
`user` varchar(77) NOT NULL default '',
`asuser` varchar(77) NOT NULL default '',
`db` varchar(64) NOT NULL default '',
`query` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Why varchar(77)? Because the mysql.user table puts a maximum of 16 characters for the username, and 60 characters for the hostname. And then there’s the 1 character “@”. Similarly, database names are limited to varchar(64).

The “asuser” column is the grant record that the user is acting as. For instance, a connection with the username “sheeri” from the host “www.sheeri.com” has a user value of “sheeri@www.sheeri.com” but may have an asuser value of “sheeri@’%.sheeri.com'” — whatever the GRANT statement that applies to my current user is. This is the difference between CURRENT_USER() and USER().

Then, create the function — here’s a PHP example:
function my_mysql_query ($query, $dblink) {
$action="INSERT INTO action (user,asuser,db,query) VALUES (CURRENT_USER(), USER(), DATABASE(), $query)";
mysql_query($action, $dblink);
mysql_query($query, $dblink);
}

Of course, we could also add in application specific information. For a web-based application where there is an overall password instead of a different password for each customer or user, this does not help. However in that case, a session username and client IP can be easily gotten from environment variables and used instead of the MySQL-specific “user@host”.

To use it, simply use my_mysql_query in place of mysql_query.

Note that this is the quick-and-dirty way to do it.

This Just In: The LAMP Stack is Popular

http://www.webpronews.com/topnews/2007/02/26/techcrunch-others-love-linux-mysql

I’m not quite sure what to say about this article, except that a sample of 7 “big” sites showed that the LAMP[hp] stack was heavily used. Perhaps, “And this is news?”