NoSQL options

The NoSQL event in New York had a number of presentations on non relational technologies including of Hadoop, MongoDB and CouchDB.

Coming historically from a relational background of 20 years with Ingres, Oracle and MySQL I have been moving my focus towards non relational data store. The most obvious and well used today is memcached, a non persistent distributed key/value pair store. There are a number of persistent key/value stores in the marketplace, Tokyo Cabinet, Project Voldemort and Redis to name a few.

My list of data store products helps to identify the complex name space of varying products that now exist. A trend is towards schema less solutions, the ability to better manage dynamically typed/formatted information and the Agile Methodology release approach is simply non achievable in a statically type relational database table/column structure. The impact of constant ALTER TABLE commands in a MySQL database makes your production system unusable.

In a highly distribute online and increasing offline operation, fault tolerance and data synchronization and eventual consistency are required features in complex topologies such as multi-master.

I advise and promote a technology agnostic solution when possible. With the use of an API this is actually achievable, however in order to use a variety of backend data store products, one must consider the design patterns for optimal management. Two factors to support a highly distributed data set are no joins and minimal transactional semantics. The Facebook API is a great example, where there are no joins for their MySQL Relational backend. The movement back to a logical and non-normalized schema, or move towards a totally schemaless solution do require great though in the architectural concepts of your application.

Ultimately feature requirements will dictate the relative strengths and weaknesses of products. Full text search is a good example. CouchDB provides native support via Lucene. Another feature I like of couchDB is its append only data mode. This makes durability easy, and auto-recovery after crash a non issue, another feature a transactional relational database can not achieve.

With a 2 day no:sql(east) conference this month, there is definitely greater interest in this space.

What to do at 3:25am

Look at MySQL bug reports of course? Well actually I’m writing multiple blog posts, and I was confirming additional reference sources and links when I came across MySQL Bug #29847 – Large CPU usage of InnoDB crash recovery with a big buf pool.

Taking the time to actually read the information exchange I stumble upon.

[8 Jun 23:29] liz drachnik

Hello Heikki -

In order for us to continue the process of reviewing your contribution to MySQL - We need
you to review and sign the Sun|MySQL contributor agreement (the "SCA")

The process is explained here:

http://forge.mysql.com/wiki/Sun_Contributor_Agreement

Getting a signed/approved SCA on file will help us facilitate your contribution-- this
one, and others in the future.

Thank you !

Liz Drachnik  - Program Manager - MySQL

Oops. Well it made me laugh out loud for so many reasons. First your talking to the creator of InnoDB, a part of MySQL for at least 5+ years. Second, there is clearly an agreement between Oracle and MySQL already for the incorporation of InnoDB in the current builds, but mostly because at this late stage of probably Oracle acquisition (which side note has seemed too quite for too long) it seems rather a mute point to be chasing up paperwork.

Fortunately sanity obviously prevailed, unfortunately the public record persists. Still, humor is always good.

[9 Jun 18:04] Liz Drachnik

Please disregard the previous request for an SCA.
thank you

Transcending Technology Specific Boundaries

I had the pleasure to sit on the Performance Panel at the recent Percona Performance Conference. While the panel contained a number of usual MySQL suspects, one person was not familiar, that being Cary Millsap from Method R.

An expert in optimizing Oracle performance, Cary also gave an session on Day 2 that I attended. While he opened professing not to be an expert in MySQL, his talk provided valuable foundation knowledge irrespective of whether you use MySQL or another database product.

Having come myself from 7 straight years in system architecture and performance tuning in Ingres, then a further 6 years in Oracle again heavily involved in system architecture and performance tuning, a lot of my experience in the 10 years of providing my own MySQL consulting is drawn from my past RDBMS experiences. In addition much of what I actually provide to clients today is common sense that I don’t see applied.

A summary of the excellent content provided by Cary.

The common technology agnostic problem we need to address is:

  • Users say that everything is slow, but I don’t know where to begin
  • Users are complaining but all the monitoring dials are green

From a user’s perspective, their experience consist simply of two elements.

  1. Task
  2. Time

In general, business people simply don’t care about the “system” except thought the specific tasks that make up their pressing business needs. And for these users, performance is all about the time to complete this task.

Throughput can be stated as tasks per time.
Response time is the time taken per task.

Cary also quoted Donald Knuth — “The universal experience of programmers who have been using measurements tools has been that there intuitive guesses fail.”

Performance is easy if you stop guessing where your code is slow. A few best practice tips are:

  • You have to insist on seeing where time goes for any task you think is important
  • You need to look at the sequence diagram of the task
  • What individual part takes the most time, then look at the task before that. The fastest way to do something is don’t.
  • To drill down, you need to attack the skew of each part, not the average.

In Summary the closing points were:

  • Performance is about time and tasks
  • Not all tasks are created equal
  • Read “The Goal”
  • Don’t guess, your probably wrong
  • Measure response time before you optimize anything – Insist on it

Performance is easy when code measures it’s own time and tasks. This closing statement on instrumentation I completely concur with.

MySQL for the Oracle DBA Resources

The announcement last month of Oracle to acquire Sun continues to warrant a lot of discussion over exactly what Oracle will do with MySQL. Only time will tell what will happen with the official product, however it is important to remember that MySQL is GPL, there will always be a free version of MySQL available for popular LAMP stack products such as WordPress and Drupal and new and existing startup’s will continue to use MySQL.

This announcement will see Oracle resources begin to better understand and evaluate MySQL. As a resident MySQL Expert, I also have a strong background in Oracle having also worked for Oracle Corporation. I have also delivered several successful one day and half day workshops on MySQL/Oracle related content including:

  • 2009 – Best Practices for Migrating to MySQL from Oracle and SQL Server environments. 4 hour workshop for the Federal Government – Washington DC
  • 2008 – MySQL for the Oracle DBA Bootcamp. 1 day workshop for the Federal Government – Washington DC
  • 2007 – MySQL for the Oracle DBA Bootcamp. 1 day workshop New York, NY & San Francisco, CA
  • 2007 – MySQL for Oracle DBA’s and Developers. 90 minute presentation at MySQL Conference and Expo, Santa Clara, CA
  • 2006 – MySQL for Oracle Developers. 45 minute presentation at MySQL Users Conference, Santa Clara, CA
  • 2006 – Know your Competitor. A MySQL developers guide to Oracle 10g express edition. 60 minutes presentation at MySQL Users Group, Brisbane, Australia

In addition I have proposed 2 MySQL related talks at Oracle Open World 2009

  • Integrating MySQL into your Oracle DBA management processes
  • An overview for evaluating migrating from Oracle to MySQL

For more information check out my MySQL for the Oracle DBA Resources.

One advantage of Oracle/Sun/MySQL

This weeks’ announcement Oracle to by Sun was a major talking point at the 2009 MySQL Conference & Expo. While it is too early to even speculate what the future holds with the official MySQL product, for myself a speaker on MySQL topics, Oracle Open World is now a target market.

In addition to many years of providing MySQL for the Oracle DBA Resources I have with the recent closure of call for papers submitted two sessions for consideration.

Integrating MySQL into your Oracle DBA management processes

Most large enterprise organizations use more then one RDBMS product to service business requirements. With the increase in MySQL usage for web based applications such as self-service content, Oracle DBA’s need to understand and appreciate the minimum to ensure performance and availability meets client expectations.

Just how to you integrate MySQL into existing and existing Oracle database infrastructure and management monitoring process?
What are the critical monitoring components? How do these compare to current Oracle Best Practices.
Understand the various end user tools support multiple RDBMS products including Oracle and MySQL.

In this session, DBA’s will leave with the essential knowledge and appreciation of MySQL management.

An overview for evaluating migrating from Oracle to MySQL

MySQL is becoming increasing popular RDBMS for web based applications due to it’s ease of use, availability within the the LAMP stack and large number of open source applications. While implementing MySQL for a new development project may be easy, migrating existing databases, data and applications to use MySQL is not. In this presentation, we will answer questions including:

What are the major challenges to overcome to consider MySQL for some portion of your business?
What are the issues in application portability?
What are ideal applications to consider for migration?
Tools, Products and options for easy migration?
What Oracle features are not supported?

Learn how to read and write to MySQL directly via Oracle Heterogeneous services.

Best Practices in Migrating to MySQL

This week I was the invited speaker to give a 4 hr presentation to the Federal Government Sector in Washington DC on “Best Practices in Migrating to MySQL“. This was a followup to my day long “MySQL for the Oracle DBA Bootcamp” which I presented in Washington DC last year. It was good to see a number of attendees from my first DC presentation.

There was good attendance across various government departments and companies providing services to the government sector, as well a variety of job descriptions.

Thanks to Carahsoft and Sun/MySQL for organizing and sponsoring the event. Thanks also to Phil Hildebrand who provided fantastic support during my preparation answering all my SQL Server questions.

Thanks also to Baron Schwartz creator of Maatkit who as my invited guest was nice enough to table a list of attendee questions, which is always a good reference for revising slides and writing more blog posts.

You can find the first of seven sessions online in my presentations section.

Updated
Thanks to Baron Schwartz for his follow-up blog posts Migrating US Government applications from Oracle to MySQL and 50 things to know before migrating Oracle to MySQL.

MySQL at Oracle Open World

Yes, it may seem rather strange to the readers but MySQL has a booth at this week’s Oracle Open World 2007 and I’m here in San Francisco Wednesday and Thursday. If your in SF come in and say hi. Check out the Official Press Release and MySQL listed Oracle Resources for this conference.

An interesting recent report Oracle Users Indicate Increase in Use of Open Source sheds some light of the significance of MySQL within the Oracle Community.

The Independent Oracle Users Group (IOUG) has released its second major research study focusing on open source adoption trends, “Open Source in the Enterprise: New Software Disrupts the Technology Stack.” Conducted for the IOUG by Unisphere Research and sponsored by MySQL AB, the study builds on a similar report issued in mid-2006 covering open source adoption trends in the enterprise stack. The findings point to ongoing interest in open source software solutions for operating systems, databases and middleware with most organizations reporting that they intend to increase their use of open source in general over the coming year. However, open source applications remain less widely adopted.

For more information read the full report here.

Learning MySQL as an Oracle DBA

Updated

I have an entire section now devoted to various MySQL for the Oracle DBA Resources. You will find additional information here.

This week I presented two one day free seminars, “MySQL DBA Bootcamp for the Oracle DBA” in New York and San Francisco. Both were very successful days providing an opportunity to speak to seasoned enterprise professionals.

One question I was asked was “As an Oracle DBA, how can I become a MySQL DBA, what do I do, where do I start?”

Here are my references and recommendations that have zero cost to get started.

  • Read the MySQL Documentation Reference Manual.
  • Download MySQL install and use it.
  • The MySQL Developer Zone is a great sources for articles, information and references.
  • Planet MySQL is our official consolidated Blog Aggregator. Read it daily.
  • The MySQL Forge is a detailed reference of MySQL related projects, code snippets, wiki and MySQL WorkLog. A look at what MySQL is doing in future versions, and what others like yourself would like to see in future versions.
  • The MySQL Conference website has many papers from the recent 2007 Conference. You can also review the 2006 Conference Papers.
  • MySQL has various Forums and Email Lists. We have a specific Oracle Forum to assist Oracle DBA’s and Developers with MySQL questions.
  • MySQL also provides a large number of White Papers and Case Studies in it’s Why MySQL section. These are helpful to see how MySQL is being used today.
  • Register at mysql.com, if you join a list, fill in download form or respond to a forum, your already registered, but if not you will get a regular newletter that provides helpful information, including events, webinars and training
  • Sheeri Kritzer, the She-BA of MySQL and this years community award winner has an extensive list of resources on her website including podcasts and a long list of Audio & Video from the recent MySQL Conference.

For additional Oracle to MySQL specific references from recent conferences include 2006 – MySQL For Oracle DBA’s,
MySQL For Oracle Developers and 2007 – MySQL For Oracle DBA’s and Developers.

For your reference material, I would initially recommend the following books.

  • “MySQL 5.0 Certification Guide” – which all attendees received for free.
  • “MySQL Cookbook” by Paul DuBois, “MySQL” by the same Paul DuBois or “Pro MySQL” by Michael Kruckenberg and Jay Pipes.
  • “MySQL Administrator’s Guide and Language Reference”. – This is just a printed copy of the MySQL Manual, however some people may appreciate this.

Following that, additional resources depending on your level of interest in development or internal workings etc would include.

  • “MySQL Stored Procedure Programming” by Guy Harrison.
  • “Understanding MySQL Internals” by Sasha Pachev.

MySQL Professional Services also provides training and certification for MySQL. With 9 different training courses held world wide, and 5 different certification courses there are various programs to suit DBA’s and Developers at different skill levels. For more information see MySQL Training and Certification.

MySQL Conference – For Oracle DBAs and Developers


I have just completed my presentation at the MySQL Conference 2007 on MySQL for Oracle DBAs and Developers.

Not mentioned in my slides, but referenced during the presentation was what I consider the most important page to document from the MySQL Manual — 5.2.1. Option and Variable Reference

You can download a PDF copy of my presentation here.

MySQL Trigger Features

Sheeri talked a little about MySQL Triggers in One TRIGGER Fact, Optimizer Rewriting Stuff. While it’s great that MySQL 5.0 has Triggers, there are some things that I feel could become features in future releases.

IF EXISTS

One of the beautiful features that MySQL has is IF EXISTS. This ternary operation that if the object exists performs the operation, of not it does nothing works wonders in reviewing logs for errors. One of the problems with Oracle for example, is the requirement to ignore the ORA errors for non-existent objects.

But this functionality doesn’t exist for Triggers? One must wonder why. I’d like to see this.

mysql> DROP TRIGGER IF EXISTS trigger_name;

MySQL Manual DROP TRIGGER

REPLACE

On feature that simplifies the lack of IF EXISTS functionality using Oracle is REPLACE. The syntax is:

oracle> CREATE OR REPLACE TRIGGER trigger_name...

In this case, this functionality effectively eliminates the need for a DROP IF EXISTS, however I’d not like to see this introduced into MySQL especially it’s an Oracle specific syntax and not ANSI SQL.

Multiple Triggers of same type per table

MySQL only allows one Trigger per type per table. That is, there can only be one BEFORE UPDATE for example. While you may ask the question why you would need this functionality. Here is a typical situation.

You use Triggers to perform some level of business functionality, determining values for optimised (denormalised) columns is a good example. So you need to write an appropiate trigger for that piece of functionality.
You also use Triggers to perform database auditing, that is for every insert/update/delete of data, you record a full copy of the change in an audit database. One way to ensure this is consistent across the entire database is to implement via triggers. So you leverage programming functionality to pre-create triggers for all tables to manage this.

The problem with MySQL occurs in that you have to now merge these triggers for tables that require both. If you want to deploy your application into a test environment, you may wish to not deploy your auditing triggers, but now you have this functionality mixed in with business logic.

Multi Type Triggers

Another cool Oracle feature is the capacity to define a trigger for multiple types. For example:

oracle> CREATE OR REPLACE TRIGGER trigger_name
oracle> BEFORE INSERT OR DELETE OR UPDATE ON table_name ...

In this example, with MySQL you would need to create three seperate triggers.

Other features

While not as important and one would need to consider if necessary in MySQL are some other Oracle provided trigger functionality. This includes:

  • WHEN CLAUSE trigger restriction
  • Triggers on DDL Statements such as CREATE, DROP, ALTER
  • Triggers on Database events such as LOGON, LOGOFF, STARTUP, and SHUTDOWN
  • INSTEAD OF Triggers (for Views)
  • STATEMENT based trigger

For more information you can check out the Oracle Documentation on Introduction to Triggers, CREATE TRIGGER, Documentation Search on Triggers

The MySQL Migration Toolkit

A Wednesday afternoon presentation at the MySQL Conference was MySQL Migration Toolkit by Mike Zinner from MySQL AB.

In summary, the Migration Toolkit currently provides the following feature set.

  • Wizard like interface
  • Plug-in architecture
  • Migration of Oracle/MS SQL Server/MS Access/Generic JDBC Data Sources. 2006 support for Sybase and DB2.
  • Provides user support to expand to other databases
  • Customisable the produced wizard scripts at any step
  • Completely Scriptable (the wizard interface can produce command line replay scripts) -allows re-running, re-scheduling
  • Binaries include an Eclipse Java Project to enable easy extension of the Migration Toolkit.

The product is built on the Generic Runtime Environment (GRT) which is used in other MySQL GUI Products. The GRT is a thin C Layer that allows you to easily add modules written in other languages (e.g. C/C++, Java, Lua, Python etc).

The following are the steps of the Migration process.

  • Source/Target
  • Object selection
  • Object Mapping
  • Manual Editing
  • Schema Creation
  • Data Mapping
  • Bulk Transfer
  • Summary

Some more relevent points on some of the individual steps.

Source/Target

  • Screen caters for source specific requirements (e.g. SID for Oracle)

Object selection

  • Choose the different Schema Objects, including tables, views. Can limit by type, or individual objects
  • For Oracle additional objects include Schemas, Routines and Sequences

Object Mapping

  • Define Methods for mapping of schema objects
  • Includes Language types (e.g. latin1), multilanguage (utf8), or a user defined
  • For Tables you can choose the purpose which includes data consistency, statistical data. These rules will include determining best storage engine, intepreting auto increment columns.

Manual Editing

  • You Can drill down in great detail to define the object mapping, down to a column level
  • Provides a migrated objects review, including warnings (for example views need to be manually checked, or sequence not migrated)

Schema Creation

  • Can create objects in real-time or create a SQL script for later executation
  • You can review the generate SQL code that will be used in real-time and perform further manual refinement (e.g. converting to specific SMALLINT,INT,MEDIUMINT refinement)
  • Will show any warnings, and allow for manual correction

Data Mapping

  • Can create data in a real-time to a MySQL database
  • Create Insert Statements (normal data and blob data) (optimized multi-row insert with byte limits)
  • No facility at present for flat file creation/loading via LOAD INFILE

Bulk Transfer
Summary

  • A migration report which can be saved to disk.
  • Create a Migration script for the complete process. (which is a generated lua script)

I can see the possibility for the following enhancements.

  • Consider ENUM fields by analysing data (columns char < 20) and offer as data type
  • Consider determining AUTO_INCREMENT columns

References
MySQL Migration Toolkit – Provides details, screenshots and Flash Tutorials for SQL Server, Oracle and Access Migrations.

More on Oracle Procedures Functionality (Part 2)

As mentioned in my earlier post Emulating Oracle Output Functionality, I’ll be speaking at the MySQL Users Conference on the topic of MySQL for Oracle Developers. Here is the second in a series of points regarding current MySQL Stored Procedures and Functions functionality.

  • 3. Named Parameters
  • 4. Procedure Overloading

3. Named Parameters

Parameters passed to Procedures under normal operations can be considered positional parameters. For each parameter, a calling statement is required to pass the same number of parameters and in the same order. Named parameters allows the user to pass parmeters in the order of their choosing, and also not pass all parameters.

For Example, consider the following Oracle Stored Procedure definition.

  EXAMPLE_PROCEDURE(num IN NUMBER DEFAULT 0,
                    dte IN DATE DEFAULT SYSDATE,
                    str IN VARCHAR2 DEFAULT NULL,
                    str2 IN VARCHAR2 DEFAULT NULL);

This can be called in several ways, here are few examples.

  EXAMPLE_PROCEDURE();
  EXAMPLE_PROCEDURE(9,  '01-MAR-2006', 'Hello World', NULL);
  EXAMPLE_PROCEDURE(dte => '01-MAR-2006');
  EXAMPLE_PROCEDURE(dte => '01-MAR-2006', str2 => 'Hello World');

The key to being able to use named parameters, is the addition of the DEFAULT syntax in the variable definition.

Giuseppe Maxia has many MySQL stored procedures, and I applaud his initiate with The MySQL General Purpose Stored Routines Library. Included here is an implementation of handling named parameters. I can’t say I’ve used it personally, however I did browse the code (another Open Source benefit).

4. Procedure Overloading

Oracle provides the capability like Java, which allows for multiple procedures to have the same name, but have a different set of parameter arguments.

Oracle provides the ability to overload a Procedure call with the same number of arguments and varying datatypes, for example, going with the earlier DBMS_OUTPUT.PUT_LINE analogy, Oracle has the following specification.

  DBMS_OUTPUT.PUT_LINE (item IN NUMBER);
  DBMS_OUTPUT.PUT_LINE (item IN VARCHAR2);
  DBMS_OUTPUT.PUT_LINE (item IN DATE);

Likewise, it possible to have procedures with different numbers and types of arguments.

  EXAMPLE_PROCEDURE(num IN NUMBER);
  EXAMPLE_PROCEDURE(num IN NUMBER, str IN VARCHAR2);
  EXAMPLE_PROCEDURE(num IN NUMBER, dte IN DATE);
  EXAMPLE_PROCEDURE(num IN NUMBER, dte IN DATE, str IN VARCHAR2, str2 IN VARCHAR2);
etc.

Notes

As MySQL growth continues and developers take up placing greater business logic in the database with Stored Procedures, there may be merit to consider these points. On the flip side, 10 years ago, business logic was placed in the database for many reasons including the extent of capable client programming languages, a Client/Server architecture and of course tight coupling with Oracles GUI products. One could argue a justification as to how much business logic is stored in the database, and how much is managed within an application. Given the advent of the Web, and multiple applications and clients assessing coporate data, it’s logical to place essential logic as close to the source of the data as possible, and the introduction of Stored Procedures in MySQL 5 released last year provided the capacity to consider this.

At this time, I would err on the conservative side with the use of Stored Procedures. The type of application, requirements and signficantly the age of the product (being a new product or existing legacy product) all affect the outcome. As mentioned, Giuseppe feels strongly regarding named parameters, and has provided a workaround. The benefit with Open Source is this FREEDOM clearly exists when the community contributes. This can only benefit MySQL in areas such as Stored Procedures.

Myself, only a few days ago over the weekend, I took an Java Open Source product, that lacked the capacity to support the calling of Stored Procedures via JDBC, developed it myself and then submitted my work back to the Apache community. I was even more happy when it was accepted unaltered, committed and in the nightly build for the next day. Read More. I’m now working on the next contribution to the same project, providing JDBC Transaction Support. While this may seem a sidetrack, I’m actually specifically using this product in testing and usability of MySQL, so ultimately everybody wins.

Correction to earlier MySQL Statement

I stand corrected on my earlier post Emulating Oracle Output Functionality (which I’ve updated) when I made a reference to MySQL catching up. That was not what I was implying, that MySQL had to catchup to Oracle. I was indeed making reference that MySQL is a 10 year old product, Oracle almost 30, and with a far greater historical R&D budget, MySQL as an organisation has for lack of a better term, entered the race at a later time. One could also argue it’s not a race, I’m just using this analogy.

For those that might have thought this in reading my earlier article, I’d encourage you to re-read my updated introduction for my clarification and correction.

The comment was made to me, “Oracle is very good at being Oracle” which is totally correct, and the “MySQL’s market now overlaps that of Oracle, and so there is competition.” Indeed Oracle, as a leader in the RDBMS industry has directed development in functionality and features.

We (being the MySQL product and Open Source) are indeed in competition (with other RDBMS products, both commercial and open source) , and will always be, however those that know me would also know that differing products serve to provide differing features and functionality in enterprise solutions. Some have strengths over others, and also weaknesses.

I am a strong advocate of larger enterprises currently using Oracle to embrace both Oracle and MySQL within an organisation for the benefit of serving differing purposes. I do not believe they are mutually exclusive. I believe there needs to be a looser coupling in the emerging marketplace. Of course, if a new company was starting tomorrow, and wanted to use Oracle, I would question the requirements as MySQL will serve the needs for most practical enterprise solutions. Had that question been asked 5 years ago, it would depend signficantly on the requirements, 10 years ago it would not have been a consideration.

What should I install?

I was asked a simple question today by a collegue who is an experiened Java Developer and Oracle user and had just installed SUSE on his personal laptop, to align closer with his work environment. What MySQL should I install, the MySQL web site has this and this and this?

Simple question, but the answer isn’t as simple, especially when MySQL now has a number of different products encompassing client functionality in addition to the MySQL server.

Oracle got it right with the latest edition Oracle 10g Express Edition (XE). A simple one rpm install that includes the Oracle Server, Oracle client, a Web Based Administrator, Query Tool and Application Development tool. I guess as we are all experienced, the simple question isn’t something we have a some notes on handy, hence the purpose of my entry A Basic MySQL Developer Installation. NOTE: This is for a developer environment, installation would be simplier using RPM’s for a compatible Distro.

On that note, It would be good for MySQL to provide a more complete installation of it’s suite of products rather then letting 3rd parties package it all together. Problem is there are so many possible combinations, what do you do.

Data Modelling

I’m a data modeller. I specialise in this, and for a number of years on large projects I’ve been able to focus on this single task within the System Development Life Cycle of software development for several months at a time. Unfortunately what depresses me the most, is I can’t get a full time position in what I’m an expert in. It’s not a specialised skill that an organisation can use on a full-time basis, unless it’s a large organisation, and quite frankly, Brisbane isn’t a market that can support the diversity of large organisations. (caveat, large organisations that are proactive in software development, not just large organisations that have significant IT requirements, but do not work proactively). This is why I can also do Software Development, Database Administration, and even System Administration. Again, I’m not good enough to fill one of these positions in a larger organisation as an expert, but I can generally hold my own, usually even with surpising results. (Side note, even this week, I was providing a possible solution and tool for system adminstration across a large organisation, and it was 5 mins work. Something the paid full-time system administrators were not providing????)

I only started looking at Domas Mituzas wordpress: friendly look at query log. I didn’t have to read far to see where it was going, and well I quite quickly turned off, sorry Domas, I’m sure your concluding points were valid. This is my point, and it has been echoed in our local MySQL users group as well, the lack of appropiate database design in open source projects. There are several contributors, but one I put down to the “Hobbist and the Professional Syndrome”. A topic for further discussion, but in summary here are the bullet points from a slide in a presentation I prepared.

Hobbist

  • Downloadable software and examples
  • Online tutorials
  • Books like Learn in 24 hours/For Dummies

Professional

  • Formal Qualifications
  • Grounding in sound programming practices
  • Understanding of SDLC principles
  • Worked in team environment

Middle Ground Developer

  • Time to skill verses output productivity
  • Depends on environment and requirements

And on a final note, I guess why doing some raving. I find it criminal that organisations encourage at times a level of incompetence by promoting people that develop bad code into positions where they can continue to ensure that bad code stays, and further business decisions only engrain an organisation down the continued wrong path. There is already enough poor software developers out there that give the industry a bad name, but the good ones are few and far between.

What do we do, how can we solve this problem? I don’t think it can be solved now in the Open Source community. Adopting an Agile Development methodology such as Extreme Programming (XP) for example, it a very good start in organisations, something I’ve been working with now, or working with the principles for 6 years.

PS: Modelling is actually spelt both Modeling and Modelling (2 l’s) across the various English derivitives. Just incase somebody wanted to make comment.

Emulating Oracle Output Functionality

Updated 28-mar-2006
There really is no way to do a comparision by numbers in features and functionality when it comes to Oracle and MySQL in the area of Stored Procedures and Triggers. Oracle does provide a far greater and extensive features list, however having more only means it has more.

We all know this, MySQL is a growing evolving database product, having just celebrated it’s tenth anniversary, Oracle on the other hand, will next year be 30, and has had significant funding in R&D being up until recently the second largest software company world wide. However, being open source, MySQL has the advantages of being lean and mean, providing only functionality users actually want and use, and has the community and organisation that is focussed clearly on providing new and improved functionality that users need.

I’ll have a lot more to speak about on this topic at my MySQL User Conference presentation MySQL for Oracle Developers next month, however in the preceeding weeks I thought I’d open some discussion and debate on various features, particularly in the area of Stored Procedures.

Here are some initial points, I’d like to talk about today. The purpose of this discussion is to highlight the difference between these two products, and possibilly other RDBMS products. While a RDBMS offers a feature, I am not stating that MySQL should necessarily also have this feature, however as part of comparing products in these articles, I am comparing existing Oracle Functionality to MySQL, so it will generally involve the description of functionality that is not presently comparable.

  1. Package Space
  2. Provider Supplied Procedures

1. Package Space

MySQL provides for Stored Procedures and Functions only the definition of individual procedures and functions. There is no way to group them into logical groupings.

Oracle provides the functionality of Package Space. Groups of procedures and functions can be defined within a package. Consider it like a wrapper of a group of procedures and functions. The package definition consists of 2 parts, the header section, which defines the scope of the procedures and functions, and the body which defines the actual procedures and functions. An added advantage of this that within Oracle you can protect your package body code (making it unavailable for view). I’ll discuss this more at a later time.

I’d like to see MySQL consider a package syntax particularly as businesses start to work more extensively with stored procedures and functions in larger enterprise applications. UPDATE: As stated by Roland in the comments, you can register your support for this functionality at MySQL under Bug #11696.

Within MySQL you can emulate package name, at least in syntax. You can use a dot ‘.’ within a procedure name, unlike this restriction for tables. The down side is the call must be quoted. I’ll discuss this more next.

2. Provider Supplied Procedures

Oracle provides an extensive list of supplied procedures and functions, defined in many packages. One of the earliest you learn in Oracle development is DBMS_OUTPUT.PUT_LINE. As the name indicates, this allows your to output a line of information. This is a common means of debugging output. Andrew Gilfrin post on Debugging Stored Procedures in MySQL raises this point, and an interesting solution using a debugging table. While this functionality works, one of my goals is to provide compability functions so that any migration of code could be simplified. Here is a much simplier solution.

$ more dbms_output.put_line.mysql
DELIMITER //
DROP PROCEDURE `dbms_output.put_line`
//
CREATE PROCEDURE `dbms_output.put_line` (output  VARCHAR(255))
BEGIN
  SELECT output;
END;
//
DELIMITER ;

A MySQL Usage:

mysql> CALL `dbms_output.put_line` ('hello world');

A comparision Oracle Usage:

SQL> SET SERVER OUTPUT ON
SQL> BEGIN
SQL> DBMS_OUTPUT.PUT_LINE ('hello world');
SQL> END;

This is as close the syntax can be. With MySQL you require the CALL and the backqoutes (`). Both things that can be easily added in an automated way.

References:
DBMS_OUTPUT Note: this is a public web version of the Version 8i manual online. Oracle provides online documentation, but you require a login (which is free) to the Oracle Technology Network.

Oracle8i Supplied Packages Reference. Again this is dated information, being an older version, but gives you an indication. For reference Oracle 7 released in 1993 first provided Package/Procedure/Function functionality.

Other

On a side note, I’d really like to see a IF EXISTS syntax for DROP PROCEDURE. IF EXISTS is an excellent MySQL extension. Oracle for stored procedures has the CREATE OR REPLACE syntax.

Check out the Innodb Site?

Have a look at InnoDB. Well, ok your lazy, so here’s a screen print below.
Plastered thoughout the top section is the word MySQL. It’s in the core banner blurb, there’s a logo, and even links to the MySQL Documentation. And right in the middle of all this is “Innobase OY is an Oracle Company”, with the standard Oracle Logo.

So my question would be, is this a good thing or a bad thing from a MySQL advertising perspective?
Does it help or hinder MySQL?
Does it show Oracle as being in partnership with MySQL? Is this good for MySQL to increase it’s exposure into the Oracle world?
Does inclusion of InnoDB now within Oracle traffic and links improve exposure to MySQL within search engines?

Frankly, I’m a little surprised that Oracle Legal hasn’t got onto this, I’m sure somewhere there would be a decree, that no competitor logos should be shown with the official Oracle logo.

I’d suspect that the existing MySQL community know the deal re Oracle, so perhaps this will expose more Oracle specific people to MySQL!

Oracle Comments

Some recent posts regarding Oracle (See Smart moves by MySQL AB and Larry Ellison still doesn’t understand open source) leads me to put in my 2 cents worth.

My background I’m sure like a lot of experienced MySQL people is in Oracle, and indeed in Ingres before that (starting in 1988). I have also worked for a number of years at Oracle Corporation. Ironically I started as their resident Ingres Specialist, in an international research project of DMS (Design & Migration Services) of re-engineering Ingres applications into an Oracle Designer Repository some 10 years ago in 1996. I of course moved into a number of other Oracle roles for clients following that. I still retain some contacts around the place.

It’s obvious Larry’s goal is to become more “Open Source”. This is of course a complex topic, and you can’t just say it like this. I’ll leave that for another day, but I’ve got some opinion on current trends.

It’s clear from recent purchases of JBoss, and SleepCat (Berkley DB) that Oracle has an intention of providing a suitable technology stack in a number of vertical marketspaces that Oracle presently cannot. For example, in the embedded space. Purchasing provides a much quicker solution, and also provides a different way to solve the problem instead of the legacy Oracle Product line. I haven’t seen any recent press, but I know that Xen was also in Oracle’s wallet space.

I would suspect that Oracle will move to providing a Stack solution (akin to SpikeSource for example) in a number of vertical spaces. These stacks will include non-traditional but now owner Oracle products, including Berkeley DB in lower end solutions. This along with the recent Oracle Express Edition (XE) free offering will enable Oracle to target market’s that were previously unavailable.

This is clearly not for a financial intention. There is no way to obtain a return on investment, however it’s all about upselling. By providing these offerings, Oracle now has a large marketplace to promote commercial product offerings.

Assuming, Oracle goes down this path, I’d assume they will also provide clear migration paths between stack offerings, as part of upselling. This will be more complex to achieve. I also suspect that Oracle will move towards a better Web 2.0 model, by providing products are no cost, but provide a service to support and maintain in these new marketspaces.

In closing, why did Oracle purchase InnoBase, the creators of the MySQL InnoDB Storage Engine? This question seems still unanswered. It doesn’t fit easily into the above ideas of differing technology stacks. Ultimately, money buys power, and I suspect it was just that, with no real future intentions or clear plan.

Update
Thanks for the comment about JBoss, yes, it’s not official, nor is Xen, but it took Oracle I think 15 months to get Peoplesoft.

I came across the Oracle Corporation Wikipedia entry in other work, the end of the history page reads a who’s who of acquisitions.

A call to arms!

With Oracle Corporation purchasing InnoBase, the company providing the InnoDB Storage Engine, and now reliable rumors of the acquisition of SleepyCat, the BDB Storage Engine, both key transactional storage engines for MySQL are effectively owned by a competitor.

While the is a strange and probably unchartered territory for both organisations, I’m personally concerned. I use InnoDB extensively, however if there was a comparable alternative within MySQL I’d consider switching out of principle. Is Oracle purchasing these organisations a bad thing? We don’t know. That’s the problem. While MySQL will undoubtly continue to provide these storage engines as part of the MySQL Database I believe a call to arms is needed.

It’s true that Oracle helped more general adoption of Linux when it announced this as it’s primary platform some years back. I’m sure with a middleware suite such as JBoss this will benefit from Oracle’s exposure, but will it benefit in it’s development? Will funding for development skew the product torwards what Oracle wants, not the community? Even things such as BerkleyDB being embedded in Open Office, and Google wanting to spend into the refinement of Open Office for possible web services options just makes you wonder whats happening. I’m on holiday’s trying to relax, and not do any reading, developing or communicating, but the one thing that makes my mind turn is, why is Oracle doing this?

My concerns are: look what happened to the acquired big commercial competitors, the PeopleSoft, Siebel, JD Edwards. Now, it’s a little difficult with the Open Source software, but I’m no licence expert. While it will continue to be available in current licencing options, I’m sure there has to be some concerns. Even something trivial like, all MySQL downloads that include these engines must first be registered on the website, and all these statistics must go to Oracle. Can they do this? I have no idea, but what if they could.

I’m sure internally in MySQL AB there are plans afoot for alternative transactional storage engines. The pluggable nature of these within MySQL makes it easy to move in this direction. I think sometimes, some functionality is kept close to heart, and you only here about it when some actual work is released.

I’m interested to guage reaction to see if a public working group should be setup to specifically tackle the issue of an independent transactional storage engine. Are there others out there that feel the same way I do. Now let me be clear, I’m not anti Oracle, infact rather pro Oracle, but I’m very anti Microsoft. If it was Microsoft buying these companies how would people react?

In my opinion this should be a bold announcement from MySQL now. In stating the development and release of a new Transactional Storage Engine this year, and then not evening mentioning InnoDB and BDB, they are downplaying the Oracle buy in, and emphasising a true Open Source Company option. In no means say they are no longer supporting InnoDB and BDB, but if the media exposure from MySQL continues to mention them, then it’s going to bleed into some reference back to Oracle.

I can’t contribute to the actual development in C++, if it was Java that would be a different matter, but as I move more away from hardcore coding there are plenty of other areas in which I could contribute.

InnoDB, BDB. What is Big Red Doing!

Last year saw a record number of acquisitions by Oracle Corporation. Of note was in October 2005 InnoBase (Read Press Release) which had a direct relationship with MySQL providing the InnoDB Storage Engine. It’s too early to tell what the impact to MySQL will be if any.

I’ve been in Singapore, and have not read any news in the past few days, but all information I’m receiving from those collegues in the know is that Sleepycat Software (the company behind Berkley DB, and the MySQL BDB Storage Engine) is now firmly in the sites of Oracle Acquisition. The rumors of JBoss is also definitely on the go. No official news from any Oracle Press Releases as yet.

So what is Oracle doing, and what impact will this have for MySQL? Both InnoDB and BDB are key transactional storage engines. Given that MySQL has the full capability for ease of plugin for new storage engines is this a prod to MySQL to consider another alternative?

If I wasn’t mistaken, it seems Larry Ellison is looking to be a big name in open source!

Sequences in MySQL

One piece of SQL functionality that doesn’t appear to have any consistency or an ANSI SQL Standard is the management of system generated sequential numbers, used for example in suggorate keys.

MySQL uses AUTO_INCREMENT which serves the purposes adequately, however in my documenting of differences with Oracle in my upcoming MySQL Conference presentation “MySQL for Oracle Developers” there a number of key differences with Oracle’s SEQUENCE usage.

MySQL AUTO_INCREMENT to Oracle SEQUENCE Differences

  • AUTO_INCREMENT is limited to one column per table
  • AUTO_INCREMENT must be assigned to a specific table.column (not allowing multi table use)
  • AUTO_INCREMENT is INSERTed as a not specified column, or a value of NULL

The MaxDB Reserved Words list includes SEQUENCE for the CREATE SEQUENCE however I’ve never used MaxDB. Other popular open source products such as PostgreSQL and Ingres use sequences. Refer to the references section for more details.

Usage

The following provides an example sytax usage within MySQL and Oracle.

MySQL

CREATE TABLE Movie(
id           INT NOT NULL AUTO_INCREMENT,
name     VARCHAR(60) NOT NULL,
released YEAR NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;


INSERT INTO Movie (name,released) VALUES ('Gladiator',2000);
INSERT INTO Movie (id,name,released) VALUES (NULL,'The Bourne Identity',1998);

Oracle

CREATE TABLE Movie(
id          INT NOT NULL,
name     VARCHAR2(60) NOT NULL,
released INT NOT NULL,
PRIMARY KEY (id)
);
CREATE SEQUENCE MovieSeq;


INSERT INTO Movie (id,name,released) VALUES (MovieSeq.NEXTVAL,'Gladiator',2000);

You can within Oracle use a Before Insert trigger to simulate handling of the MySQL Insert syntax. Note: Within Oracle you will require a SEQUENCE per table and a TRIGGER per table. Oracle supports multiple triggers of the same type per table (not sure if MySQL supports this).

CREATE OR REPLACE TRIGGER BRI_MOVIE_TRG
BEFORE INSERT ON Movie
FOR EACH ROW
BEGIN
  SELECT MovieSeq.NEXTVAL INTO :new.id FROM DUAL;
END BRI_MOVIE_TRG;
.
RUN;


INSERT INTO Movie (name,released) VALUES ('The Lion King',1994);

Oracle’s syntax uses the sequence name with .NEXTVAL or .CURVAL.

Future Directions

I would like to see a SEQUENCE implementation with MySQL (whether official or unofficial). I’m sure some enterprising person in the community already has one. Database abstraction layer systems would also most likely have implementations. I liked the PostgreSQL Syntax for ease of use with the following commands.

  • NEXTVAL(‘sequence’);
  • CURRVAL(‘sequence’);
  • SETVAL(‘sequence’,value);

Wanting something and doing something about it are two different things, so here is what I wiped together to demonstrate a possible implementation. It needs a lot more work in appropiate error handling. transaction management, testing and performance analysis, however it shows the options of one possible implementation.

currval

DROP TABLE IF EXISTS sequence;
CREATE TABLE sequence (
name              VARCHAR(50) NOT NULL,
current_value INT NOT NULL,
increment       INT NOT NULL DEFAULT 1,
PRIMARY KEY (name)
) ENGINE=InnoDB;
INSERT INTO sequence VALUES ('MovieSeq',3,5);
DROP FUNCTION IF EXISTS currval;
DELIMITER $
CREATE FUNCTION currval (seq_name VARCHAR(50))
RETURNS INTEGER
CONTAINS SQL
BEGIN
  DECLARE value INTEGER;
  SET value = 0;
  SELECT current_value INTO value
  FROM sequence
  WHERE name = seq_name;
  RETURN value;
END$
DELIMITER ;

Some Testing:

mysql> SELECT currval('MovieSeq');
+---------------------+
| currval('MovieSeq') |
+---------------------+
|                   3 |
+---------------------+
1 row in set (0.00 sec)
mysql> SELECT currval('x');
+--------------+
| currval('x') |
+--------------+
|            0 |
+--------------+
1 row in set, 1 warning (0.00 sec)
mysql> show warnings;
+---------+------+------------------+
| Level   | Code | Message          |
+---------+------+------------------+
| Warning | 1329 | No data to FETCH |
+---------+------+------------------+
1 row in set (0.00 sec)

What was interesting was I originally used a cursor, as below, but the results for passing an invalid argument (basic boundary testing), returned a SQL error while the above implementation returned a more manageable warning.

 DECLARE c CURSOR FOR
    SELECT current_value FROM sequence
    WHERE name = seq_name;
  OPEN c;
  FETCH c INTO value;


mysql> select currval('x');
ERROR 1329 (02000): No data to FETCH

Indeed the Apache Object Relational Bridge Sequence Manager section shows a very cool syntax for MSSQL.

UPDATE TABLE SET @MAX_KEY = MAX_KEY = MAX_KEY + 1

UPDATE table SET var = column = value which effectively allows you to eliminated the need for a seperate UPDATE and SELECT for this type of operation.

nextval

DROP FUNCTION IF EXISTS nextval;
DELIMITER $
CREATE FUNCTION nextval (seq_name VARCHAR(50))
RETURNS INTEGER
CONTAINS SQL
BEGIN
   UPDATE sequence
   SET          current_value = current_value + increment
   WHERE name = seq_name;
   RETURN currval(seq_name);
END$
DELIMITER ;

mysql> select nextval('MovieSeq');
+---------------------+
| nextval('MovieSeq') |
+---------------------+
|                  15 |
+---------------------+
1 row in set (0.09 sec)

mysql> select nextval('MovieSeq');
+---------------------+
| nextval('MovieSeq') |
+---------------------+
|                  20 |
+---------------------+
1 row in set (0.01 sec)

mysql> select nextval('MovieSeq');
+---------------------+
| nextval('MovieSeq') |
+---------------------+
|                  25 |
+---------------------+
1 row in set (0.00 sec)

setval

DROP FUNCTION IF EXISTS setval;
DELIMITER $
CREATE FUNCTION setval (seq_name VARCHAR(50), value INTEGER)
RETURNS INTEGER
CONTAINS SQL
BEGIN
   UPDATE sequence
   SET          current_value = value
   WHERE name = seq_name;
   RETURN currval(seq_name);
END$
DELIMITER ;

mysql> select setval('MovieSeq',150);
+------------------------+
| setval('MovieSeq',150) |
+------------------------+
|                    150 |
+------------------------+
1 row in set (0.06 sec)

mysql> select curval('MovieSeq');
+---------------------+
| currval('MovieSeq') |
+---------------------+
|                 150 |
+---------------------+
1 row in set (0.00 sec)

mysql> select nextval('MovieSeq');
+---------------------+
| nextval('MovieSeq') |
+---------------------+
|                 155 |
+---------------------+
1 row in set (0.00 sec)

Other References

Ingres CREATE SEQUENCE Page 105.
PostgreSQL CREATE SEQUENCE
Apache Object/Relational Bridge – Sequence Manager – Subproject of The Apache DB Project
MySQL CREATE PROCEDURE

Speaking at MySQL Users Group

I’m preparing to speak at the next MySQL Brisbane Users Group in Febraury 2006. My topic will be Know your competitor – A MySQL Developers Guide to Using Oracle Express Edition. You can get a full copy of my presentation slides at my Articles Page.

Having a strong background in Oracle, and having been using MySQL for the past 5 years, the release of Oracle Database 10g Express Edition (XE) as a Free offering (with limitations of 1 CPU, 1GB Ram, and 4GB disk) is an interesting move by Oracle.

I’ve written a number of recent comments on various Oracle/MySQL things including Responses to some Oracle v’s MySQL Questions, How can Oracle 10g Express Edition target MySQL?, Oracle 10g Express Edition Target Audience. Is it MySQL?, Oracle 10g Express, Free v’s Open Source and OFA.

The question could be posed, what relevence does this have to MySQL developers? Well, in some respects very little, but in others, both knowing about your competitor a little more, being able to see their offering, and in particular in comparision to MySQL can help in a level of understanding in Database differences. I am hoping that from the discussions, people will consider some approaches to design and development that is more “database compatible”, regardless of which database.

Will Oracle 10g Express Edition take off, well difficult question, there are many target markets, will it compete with MySQL in Open Source, hopefully my talk will sporn some discussion of peoples experiences in the various organisations and businesses represented in our meetings.

Review of Database Magazine Article – "The Usual Suspects"

In the “Australian Technology and Business Magazine” – December 2005 edition there was an article on comparing database products. Here are my comments, which I also plan to forward to the editor.

BTW: I’ve since also found this articles content on another site here. It seems that most if not all is the same.

In response to your cover story article “The Usual Suspects Four databases we suspect your business could be quite interested in.” which appeared in the December 2005 edition, I would have to sum up your article in one word “Disappointing”. Let me provide some feedback from my perspective.

You start by defining a scenario, which is the only approach you can take for a suitable comparision of database products due to diversity of features available in todays products. A good start, necessary to limit the discussion of features and functionality. However, you then specify some additional business requirements, for example “relatively small e-commerce” and “cost of the initial server and database software is certainly an issue.” Now, having worked for a number of small internet and e-commerce companies, you don’t have the budget for a Dell Quad Xeon processor machine, nor then the requirements for co-located hosting or dedicate networking bandwidth for your fancy new hardware as well as the additional staffing support costs. So immediately your scenario is more unrealistic.

The major sticking point I have is your 4 processor requirement. The most efficient and cost effective initial implementation is to lease dedicated servers, there are numerous reasons including cost savings, better hardware support, larger bandwidth capacity and easy growth path to start. You can also easily monitor growth and more quickly change needs then having a large initial hardware cost. I could continue regarding hosting, however this alone changes the requirements to using single or dual processor machines given your scenario. With this in mind the playing field is now completely different but a better reflection of the scenario. Your argument for “scale up to a small server farm”, also does not hold, because you can easily get economy of scale in splitting application server and database server, splitting OLTP and batch database requirements and other common practices, not to mention additional benefits such as redundancy.

My final comments on your hardware, specifically in relation to MySQL (including using Version 3), you can get significant performance from hardware given your small size requirements and even with modest growth on single and dual processor equipment. Other then opening remarks your article makes no further references to performance requirements or indeed any level of performance analysis of the products reviewed in this article.

You make scant reference to other database products, mentioning only one ‘Sybase’ in half a sentence in your opening and once again. In 8 pages, surely rounding the article to give a clearer perspective of the marketplace with even one paragraph to mention that there are many different database products both commercial and open source that service differing business needs. Other major products not compared at this time include Sybase, Informix, Ingres, PostgreSQL, MaxDB and Berley DB as well as many more.

Your choice of products is also not consistent or reflective of your scenerio. I’ll provide a few specific reasons. Firstly, you compare beta products against production products, if your criteria was current production products you should have compared using MS SQL Server 2000, however that would clearly provide a poor reflection in Microsoft due to it’s clearly dated product. If you allowed one beta product, why then did you not use MySQL 5.0 beta which was available at the time. While you have taken the effort to adjust your article to include references to MySQL 5.0, and you in turn choose MySQL as your editor’s choice, you should have been consistent throughout the article as you give mixed comparising referencing two versions of one product. Futher to this, you choose to use a dated Oracle product in 10g Release 1. 10g Release 2 has been available for a number of months. I would also question your decision to choose the more expensive Standard Edition over Standard Edition One, but this again could be soley due to your overspecd hardware.

If your rationale for including beta was cost based, then you did Oracle a clear injustice. You make again, only a half sentence reference to Oracle’s new released free product in the opening section. You mix more recent MySQL 5.0 information within your review of MySQL 4.1.14, yet you mention nothing of Oracle 10g Express Edition, for example it’s a free product much like Microsoft SQL Server Express, but also has similar limitation in 1 CPU, 1GB RAM and 4GB of disk but all the power and functionality of other Oracle Products, as well as default inclusion of web based administration tools with HTMLDB.

Your quick product summary (4 columns of information) suffers from a number of already mentioned points, however in relation to the only commercial product with a free offering, MS SQL Server Express, you clearly gloss over the limitations. 1 CPU, 1GB Ram and 4GB of disk is critical information, this should have been included in the product summary, you only go part the way. Regarding MySQL, should have clearly stated reference to $0 under GPL license. On that note, and mentioned in your detailed review, there are limitations in the distribution of MySQL within a commercial product and this is not in your summary.

Your article places no emphasis on performance or efficiency. Given your need to mention your testing on quad processor hardware, you make references to various limits of CPU across products, memory and hardware requirements as well as some generic maximum sizings, but nothing on performance, throughput and then growth potential, as this was part of your opening scenario.

It’s not possible to clearly date when this review of products was performed, granted the marketplace has changed rapidly in recent months, the fact that your article references Oracle 10g Express edition clearly includes changes were possible to the article in early November.

In an 8 page article, as mentioned you could have allocated one column to mention that the Database marketplace contains many more products. In particular considering you have included an Open Source product, and you selected this as product of choice, I feel this gives even more justification to at least giving credit to the emerging Open Source Database market. You actually place I recall only one mention to “Open Source” which is signifcant in the context of your choice. Other products would include PostgreSQL, Berkley DB, Apache Derby and even Ingres. While your article should clearly not need to analyse these at this time, by leading into this topic you provide clear opportunity for further discussion.

At the end of the day, while you provided a concise one page breakdown of features and certain limits, this technical information does not provide a clear benefit to an IT manager, or even a technical person.

Responses to some Oracle v's MySQL Questions

I was asked a few questions by a reporter thru a collegue, here is an extract of the discussion.

1) Based on your initial experience with Oracle Database Express Edition, what are your initial thoughts on the product in terms of meeting developer needs?

Installing Oracle 10g Express Edition was a breeze. (Article). In the past Oracle products have been more difficult to install, however this has gradually improved with the more recent version releases of 8i, 9i and 10g. This easy installation via rpm under Linux, in particular the inclusion of HTMLDB provides an ideal database environment that is functional in just a few minutes. This is an important first step in gaining initial developer support.

With the database installation, the Web Based HTMLDB Interface and a sound amount of developer articles online at the Oracle Technology Network ( http://otn.oracle.com), there is a lot of information to meet a developers need. In particular, HTMLDB which offers Database Administration, general SQL tools, easy data management and a complete web forms development environment. There is a learning curve in understanding this functionality, however it is an extensive and powerful tool for developers, and requires a minimum of syntax specific knowledge. With the release of Raptor in December, Oracle will have a visual tool for development, which will complement this offering in meeting developer needs.

2) As a mySQL developer, do you think it is on par with proprietary database offerings?

MySQL celebrated it’s 10 anniversary this year, and with the Release of MySQL 5.0, gave the open source community a product to match the strengths of others products with new functionality including views, stored procedures, triggers and a data dictionary. Oracle provided these features with Oracle Version 7, released in 1992, long before MySQL was even a company. In a commercial world, MySQL now offers the strengths of an Oracle Database Product, however Oracle has grown extensively and offers not only a commercial database product but an entire suite of products. MySQL is on par in a great number of areas. Granted they are catching up quickly, and the Open Source community offers features that commercial companies cannot. This includes the ability for open source companies to change, adapt and correct more quickly, bringing features and functionality to the marketplace more often, and more open support and knowledge bases enabling users to gain easier and open access. These two points offer downsides that commercial product offerings in turn offer back, including more commercial strength functionality, and more consistent and managed knowledge management, particularly in support.

3) Do you think the efforts of vendors like Microsoft and Oracle to gain mindshare with entry level versions of their products would entice mySQL developers like you to consider their higher-end database products?

I think that Oracle 10g Express Edition caters to different markets. For existing users and developers with Oracle, the opportunity to provide their products for resale at a reduced cost, with a zero cost Oracle license is a definite market and opportunity for these Oracle Partners. I think the education sector, including universities is another potential market, where a genuine free product can be used in teaching, and then practical application, and lead into usage within the professional employment. The third sector, the competitor market, which includes MySQL and Microsoft is more complicated. Oracle will need to go further to bridge the gap in convenience for MySQL developers. To sight a few examples, MySQL is generally available now in online hosting packages, on Linux Distros. It’s quick, easy and convinient to access, and is gaining significant popularity in the open source community, a good barometer in success in a developer driven environment. When Oracle can provide it’s products within a Linux Distro and you can see Online Hosting providers offering packages including the Oracle 10g Express Edition database, gaining market share will at least be more convenient.
One other strength, is MySQL being part of LAMP, and the significant wealth of open source products developed with MySQL, makes it hard for Oracle to ever gain ground in these continued product offerings. Perhaps if Oracle considered a bounty system, much like Ubuntu, and enticed developers to ensure Open Source products were Oracle compatible, would further entice MySQL developers. (Article)
The downside of these two examples, is there is no return in investment to Oracle, so it will depend on which markets are ultimately intended for Oracle 10g Express Edition. (Article)

4) Among the proprietary database vendors, who do you think has the best offering in your opinion, and where would mySQL fit in?

In this marketplace, there is a platitude of Database Offerings (can provide a list if you want), Oracle has always been the market leader in the commercial space, and there still is no other offering to match this. Historically, software development with databases was undertaken by IT professionals and there were a small number of commercial products available. Oracle gained a large market share in the past 20 years and has kept up with technology advancement. In the past 10 years, the Open Source community has changed the shape of the product offerings, and has also change the type of developers. There is a divide between the professional developers with qualifications and specific experience in software development in a structured development environment, and the new age of developers that have easy access to tools and information, and can easily contributed to an open source project that may have hundreds or thousands of developers worldwide, but they do at times lack solid grounding, and this can lead to bad habits. Depending on your requirements, a large commercial organisation, or a small webstore and blog, there are different needs, and you can’t therefore compare database products based solely on features. You need to include the customer requirements, as well as the ability for a database product to grow and adapt to your business in the ever changing environment.

I think in this day and age, there needs to be a tolerance between multiple database offerings within organisations. As the CIO or CTO of a large organisation, I would hope that different needs within the organisation would lead to two database products in use and synergy, both Oracle and MySQL.

How can Oracle 10g Express Edition target MySQL?

As I mentioned earlier, is MySQL a target of the new Oracle 10g Express Edition. Maybe not specifically, but let’s assume it’s on the radar screen. What can Oracle do to woe MySQL users and developers?

I see distinct marketing will be required for Oracle 10g Express Edition, marketing for example to existing partners must be different to “Competitor Marketing”. While I’m sure Oracle will now be able to get benefits from Parters trying to sell their products, now being able to reduce costs to customers (at least initially). Other partners that never considered selling developed applications due to the license cost may now reconsider.

But back onto MySQL. Oracle needs to target specific information to MySQL. OTN Technical Articles for Developers and Architects has nothing on MySQL. I can see the need for a Cookbook to attract MySQL users. The Oracle 10g Express Edition page has some information on developer docs, but not on Conversion, Migration and comparison. Some more opportunity here!

While on Migration, I attempted using the Oracle Migration Workbench to migrate my Version 5 database, without success. MySQL would be low on the agenda if a Version 5 migration was not available for a product that’s been in a pre-production release for most of 2005.

So, there is a clear need for some documentation, Quick Start Guides and How To’s for the MySQL community. Obviously being able to do a database migration also very high. But again this is not a practical application, it’s just the icing.
Until some Open Source projects actively engage in Oracle 10g Express Edition, it will always be a novelty to the MySQL community that won’t get off the ground.

I can see one way to jump start the process. Oracle could offer bounties, much like Ubuntu, to get some of the large open source projects Oracle 10g Express Edition compatible.
For example, http://www.phpbb.com, http://www.oscommerce.com, http://www.phpwebsite.appstate.edu, http://www.dotproject.net.

Now offering $200 per project, that would shake some things up!

Oracle 10g Express Edition Target Audience. Is it MySQL?

Just where is Oracle planning on targeting the new Oracle 10g Express Edition?
The obvious answer would be to counter the arch nemesis Microsoft, and the low end product offerings, like the MS SQL Server and the low end free engine MSDE. I didn’t realise to recently, that Microsoft have finally released the next version of MS SQL Server, being 2005, and at the same time provide a free cut down offering, strangely enough called “Express Edition”. It’s taken Microsoft 5 years. Makes you wonder if Database Technology is a high priority!

Is Oracle also now threatened in anyway by MySQL? I think not, however the continued growth of MySQL, it’s availability on any Linux server and in many distros, and now with the MySQL 5.0 GA release with features like Views, Triggers, Stored Procedures, Information Schema and ANSI SQL compliance allows MySQL to compare itself in features with Oracle. Certainly from our local MySQL Users Group, the inside MySQL news is it’s targeted against Microsoft.

Of course Oracle has been around for quite some time, and when I started working with Oracle 7 and Oracle Designer 1.2 back in 1996, these features were already available.

Oracle 10g Express Edition is a specialist database product from a database company, and with the wealth of knowledge that has lead the lasted version 10, everybody else has a long way to go to match this strength. From MySQL, the feature set even in Version 3 and 4, was adequate for application development in many areas, and the community is driving additional features to match other database product offerings.

I think it will be interesting to see what additional information Oracle releases targeted against the MySQL community. I’ve got a number of thoughts here, will post more details soon.

Oracle 10g Express, Free v's Open Source and OFA

In lunching with an old Oracle Friend, the topic turned to Oracle 10g Express Edition, and we discussed the pros and cons for organisations. The first thing he asked me was, “Have you tried loading the database larger then the 4G limit yet”. Some People?

In general the consensus seemed that it was viable for a small organisation, good for a startup company to get into a no cost entry solution, but appealing to those venture capitalists as you have a definite growth pattern.

I’m warming to more actively pursing Oracle 10g Express Edition, especially with HTMLDB, and at present while preparing to submit a paper for an upcoming Open Source conference which I hope is accepted, I’ve allocated some time on the significant topic of Open Source Verses Free. Stay tuned.

It dawned on me later in the day to more closely investigate the Oracle RPM installation and where exactly everything went in the FileSystem. I was surprised that it was not OFA compliant.

What if an existing Oracle customer with licenses was trialling Oracle 10g Express Edition and using the same staff.
Or more importantly, what if a new Oracle person picked up some bad habits from the Oracle 10g Express Edition, and when placed in a more commercial Oracle DBA environment got caught out?

I’m a Database Modeler, I’ve studied it, and I’ve practiced it, I’ve applied it and I’ve learnt some things from time to time of other “experts”, but nowadays, you put a database in somebody’s hands, like MySQL which is readily available, and all of a sudden you have people claiming to know and understand database design. Food for thought.

I hope from this new Oracle 10g Express product, also comes some good support from the Oracle Community to ensure a high standard in all things databases.

Oracle for FREE

Oracle software has always been free to develop with, however to deploy you have to buy a license and for web apps, it could never be limited to users, it was limited to CPU’s and that was expensive. Well now that have released
Oracle 10g Express Edition. A free little brother to Oracle 10g Enterprise. The software I understand is identical in the base sense, with a cut back set of additional features, and limitations to CPU/Memory/Disk usage. So providing your application, or applications all on one server never reach these limits you will be fine, but if overtime your product grows or database grows you may get caught out.

Still it’s not open source, but it is FREE, and for old Oracle people such as myself, a huge benefit as it keeps my skills a little more up to date.

How do I rate it. Well if installation is any guide, I am very, very impressed (and that’s a lot for me). After downloading the RPM here is what I had to do to get be operational.

# missing library found when running rpm of oracle
# CentOS 4.1 CD #3
$ rpm -ivh /media/cdrecorder/CentOS/RPMS/libaio-0.3.103-3.i386.rpm

$ rpm -ivh oracle-xe-10.2.0.1-0.1.i386.rpm

$ /etc/init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
————————————————-
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for HTML DB [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts. Note that the same
password will be used for SYS, SYSTEM and FLOWS_020100. Oracle recommends
the use of different passwords for each database account. This can be done
after initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y

Configuring Database…
Starting Oracle Net Listener.
Starting Oracle Database 10g Express Edition Instance.

HTMLDB interface accessible at http://localhost:8080/htmldb
I had to find a rogue Tomcat install running on my default IP and 8080, so I had to stop and restart using /etc/rc.d/init.d/oracle-xe

And it was that easy. Now for a person that used and Installed Oracle for a living it was more complicated, and at the best of times, you would need to allocate at least an hour for a basic install. This was complete and operational in under 10 mins.

Now I’ve never installed MySQL from RPM, but I’d like to compare how easy it is to install MySQL and also required tools for administration.