Showing entries 16421 to 16430 of 44106
« 10 Newer Entries | 10 Older Entries »
One-way Password Crypting Flaws

I was talking with a client and the topic of password crypting came up. From my background as a C coder, I have a few criteria to regard a mechanism to be safe. In this case we’ll just discuss things from the perspective of secure storage, and validation in an application.

  1. use a digital fingerprint algorithm, not a hash or CRC. A hash is by nature lossy (generates evenly distributed duplicates) and a CRC is intended to identify bit errors in transmitted data, not compare potentially different data.
  2. Store/use all of the fingerprint, not just part (otherwise it’s lossy again).
  3. SHA1 and its siblings are not ideal for this purpose, but ok. MD5 and that family of “message digests” has been proven flawed long ago, they can be “freaked” to create a desired outcome. Thus, it is possible to …
[Read more]
JSON export tool for MySQL 1.0 available

It took longer than expected to get this ready, but I got ambitious and I also decided to introduce a reasonable test suite. But not it is done, my JSON export tool for MySQL is ready for download from sourceforge.

So, what's in there? A basic tool for exporting tables from MySQL in JSON format, that's what is there. It has some cool features, like batching (so you do not need 10 Gb of RAM to export a 10 Gb table), which by the way is automatic, the ability to export from an ad-hoc SQL query, JSON format support for BOOL and NULL values, fixed values (i.e. you can add a fixed column value to each row exported), LIMIT support, conditional export using a WHERE extension and much more.

What is missing is base64 support for BINARY and BLOB columns, and this is a shame. Currently, this data is exported as …

[Read more]
An Open Source opportunity, part 1

I guess a lot of folks will disagree with me here, but I have to say this: I think that Open Source is a great way of developing great software, but some opportunities that this way of developing software are lost or underused. I will start with one thing that is close to my heart, but there is more to it, so I will try to follow up with some more stuff later.

DocumentationYes, documentation. You know that lengthy novel you write after people numerous times has asked for obvious things that just about anyone can see if they read your code, but they don't seem to do just that. Weird isn't it, that people try to use your code to do productive stuff instead of just putting it to good use in a productive way.

Yes, we all seem to assume that the whole world are developers and that using Open Source software somehow implies that you are just another developer. Frankly, this is not so. I think that lack of documentation is the …

[Read more]
PHP/MySQL Query

Somebody wanted an example of how to handle column values using PHP to query a MySQL database. While I thought there were enough examples out there, they couldn’t find one that was code complete.

Well, here’s one that works using a static query. If you want to use a prepared statement, check this earlier post.

<html>
<header>
<title>Static Query Object Sample</title>
<style type="text/css">
  /* HTML element styles. */
  table {background:white;border-style:solid;border-width:3px;border-color:black;border-collapse:collapse;}
  th {text-align:center;font-style:bold;background:lightgray;border:solid 1px gray;}
  td {border:solid 1px gray;}
 
  /* Class tag element styles. */
  .ID {min-width:50px;text-align:right;}
  .Label {min-width:200px;text-align:left;}
</style>
</header>
<body>
<?php
  // …
[Read more]
Connect to a MySql datasource in java


Instead of using the old DriverManager its the better way to use the DataSource class to get a connection to a MySql Database. This can be done by geting it from the app server container or by creating and configuration it directly from the driver. Get the MySQL datasource from the app container Context context [...]

eulogy for mysql forge

When the mysql librarian closed, I didn’t think too much about it; it was a feature I probably never used. However this month brings the end of the mysql forge. The MySQL Forge was something I worked on while I was at MySQL so I am a little sad to see it go. 

Now for a little bit of a history lesson. We wanted some kind of “forge” back in 2005, because sourceforge was all the rage then (today, you can’t even find mariadb or mongodb listed there). We didn’t want to pay the exorbitant fees associated with sourceforge, so we investigated …

[Read more]
A New Training Service

Beginning in September Paragon Consulting Services will be providing a new array of training classes along with a new methodology for bringing them to the client.

The world of MySQL administrators is growing faster than ever. Companies are contacting me almost every day looking for mid - senior level MySQL administrators. Whenever a project I am working on is finished, there are three more to choose from next.

And it's not just me. Just a few days ago David Stokes (MySQL Community Manager) blogged about this as well:

http://opensourcedba.wordpress.com/2012/07/11/is-this-a-new-golden-age-for-mysql/

The problem is that there are just not enough competent people to solve the "lack-of-a-dba" problem. Pressing people into service as a dba who don't have desire, skill, or training to be a dba is just an …

[Read more]
Optimizing OR’ed WHERE Clauses Between JOIN’ed Tables

OR conditions are normally difficult to optimize when used on different columns, a pain when the columns are of range conditions and worst when done between 2 or more different tables. Look at my example below, the original query  is trying to find rows which conditions are based on columns from the JOIN’ed tables.

mysql [localhost] {msandbox} (employees) > EXPLAIN SELECT
    ->      e.emp_no, birth_date, first_name,
    ->      last_name, gender, hire_date,
    ->      salary, from_date, to_date
    -> FROM employees e
    -> INNER JOIN salaries s ON (e.emp_no = s.emp_no)
    -> WHERE e.hire_date BETWEEN '1990-06-01 00:00:00' AND '1990-07-01 00:00:00' OR
    ->      s.from_date BETWEEN '1990-06-01 00:00:00' AND '1990-07-01 00:00:00'
    -> ORDER BY e.emp_no, hire_date, from_date \G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: e
         type: ALL …
[Read more]
Log Buffer #277, A Carnival of the Vanities for DBAs

Database bloggers are blowing their trumpets at full throttle warming up the hearts of readers across the globe with cool tips, nifty tricks and gems. This Log Buffer Edition in Log Buffer #277 picks those gems and present to you. Oracle: Charles Hooper is dealing with a parallel execution challenge. why a very simple query [...]

Statistical functions in MySQL

Even in times of a growing market of specialized NoSQL databases, the relevance of traditional RDBMS doesn't decline. Especially when it comes to the calculation of aggregates based on complex data sets that can not be processed as a batch like Map&Reduce. MySQL is already bringing in a handful of aggregate functions that can be useful for a statistical analysis. The best known of this type are certainly:

Read More »

Showing entries 16421 to 16430 of 44106
« 10 Newer Entries | 10 Older Entries »