A web app full of data is often going to be full of tables (at least on the administration end). A listing of users here, all the recently created events there. Often for readability we will alternate rows between two slightly different background colors.This can be handled on the PHP end with a bit of math and a counter, like so:$count = 0;while( $row = mysql_fetch_assoc($res) ) { if( $count % 2 == 0 ) $background_color = 'white'; else $background_color = 'gray'; /* OUTPUT TABLE CONTENTS WITH GIVEN BACKGROUND */ $count++;}However, it can also be done entirely in-database, via creative use of the XOR operator: ...
This week, database blogs seemed to talk about conforming to stereotypes as well as breaking them.
Fulfilling the stereotype of Microsoft software being unsecure, Microsoft released a very important SQL Server update that Aaron Bertrand notes patches “four elevation of privilege vulnerabilities.” That’s right, not one, not two, but four!!! At least there is a patch now……go forth and patch! Usually it is MySQL that throws ambiguous warnings or errors which are not an accurate representation of the actual error, but Bertrand also notes that there is A Little Management Studio Oops.
Contrary to stereotype, …
[Read more]
Introduction
MySQL® 6.0.5-alpha, the latest version of the 6.x branch of the
Database Server, is available for download from the SUN|MySQL Web
Site.
Metadata (data about the data) are very important, especially for software developers. In this article we will see what’s new in FALCON metadata handling doing some comparison with the old 6.0.4-alpha version.
New tables in the
`information_schema`
database
As you know, the source for metadata is the database
`information_schema`. To start, let’s see which tables related
with FALCON metadata are included in that database:
mysql> SELECT VERSION();
+—————————+
|
VERSION()
|
…
At the Red Hat Summit I was able to grab sometime with Chander Kant, CEO of open source back-up provider, Zmanda.
I had previously met Chander at the MySQL conference where they were named a
partner of the year, but we didn't get a
chance to talk much. It was pretty cool to hear about how
he originally identified the opportunity for Zmanda and then
built a business around it.
My interview with Chander (13:27) Listen ( …
[Read more]Having a Google account is sometimes useful in ways you hadn’t planned for. For example, at a few different employers I’ve been at, I’ve had to prepare for reviews by providing a list of accomplishments to my supervisor. One decent tool for generating this list is email, though it can take some time. Another useful tool is the Web History feature of your Google account.
Though this isn’t necessarily indicative of everything I’ve accomplished in the first half of 2008 per se, it’s definitely indicative of the types of things I’ve generally been into so far this year, and it’s interesting to look back. What does your Web History say?
- Gearman - this is used by some rather large web sites, notably Digg. It reminds me a little of having Torque and Maui, but geared toward more general-purpose applications. In fact, it was never clear to me that …
Everybody that has had to do some numeric calculations in SQL
will have encountered this simple problem: divide an integer by
another integer and round down the outcome to the nearest
integer. In many cases people write it like this:
FLOOR(a/b)
Simple enough, right? First we do the division a/b,
then we round down using the function FLOOR().
Update: My claim that TRUNCATE(a/b, 0) is equivalent
to FLOOR(a/b) is false! It maybe true when the
outcome of the division is a positive number, but in case of a
negative number, TRUNCATE() will only lose the
decimals (resulting in a higher negative number) and
FLOOR() will still round down.
Thanks …
As Sun's market cap continues to decline, is a merger or acquisition with Fujitsu or HP in the cards? READ MORE
I recently got a reminder mail to vote for the Sourceforge.Net 2008 Community Choice awards. Going through the list of finalists, I realized how many of these support MySQL as the database backend. It truly amazes me when I look at the wide range of available OSS applications today as well as how advanced many of these have become! More and more commercial applications can nowadays be replaced with Open Source alternatives/equivalents. And many times, MySQL is used to store the applications' data. This is a great trend!
After looking through the list, I spent a few minutes to add the relevant applications to the Project list on MySQL Forge. This section of the Forge is supposed to become a complete, "one-stop" directory of Open …
[Read more]
The cool features coming with MySQL 5.1 and 6.0 are the event
scheduler and so called online backup.
Both of them implement something that you can do outside the
database server. The event scheduler frees the DBA from the operating
system dependency and the database backup and restore makes mysqldump
redundant.
So far, the good news. What's wrong with this picture?
A look at the manual tells you all. You can backup and
restore a database with an explicit SQL statement, but you can't
use it in a prepared statement or in an event.
What?
WHAAAAT?
What do I use the event scheduler for, then? Ask any DBA about
the first thing …
At the Red Hat Summit I was able to grab sometime with Chander Kant, CEO of open source back-up provider, Zmanda.
I had previously met Chander at the MySQL conference where they were named a
partner of the year, but we didn't get a
chance to talk much. It was pretty cool to hear about how
he originally identified the opportunity for Zmanda and then
built a business around it.
My interview with Chander (13:27) Listen …
[Read more]