Showing entries 11 to 20 of 22
« 10 Newer Entries | 2 Older Entries »
Displaying posts with tag: schema (reset)
Using MySQL Workbench to manage your Joomla component’s db schema

MySQL Workbench is a great tool for developers to map out and visualise databases. What many people know is that it’s also a great way to make upgrading and writing upgrade scripts for your components really painless too.

Let’s say you created a small component that became popular over night. Tens of thousands of downloads from on the Joomla Extensions Directory. So you get inspired and put some more work into improving and bugfixing this component even more, and while doing that you change and add on to the database schema.

Now you need to create and distribute an update script with the next version of your component, and MySQL Workbench makes creating this update script really easy. Here is what you need to do:

Install MySQL Workbench

I’ll not help you with this. Just go to the MySQL Workbench homepage and follow the instructions from there. …

[Read more]
MySQL University: Performance Schema: Instrumenting Code

This Thursday (February 18th, 17:00 UTC - note the different starting time!), Marc Alff will present the brand new Performance Schema: Instrumenting Code. Marc is the implementor of the Performance Schema feature. His presentation will show how developers maintaining

  • the MySQL server code,
  • a storage engine,
  • or any type of plugin

can instrument the code to collect data for the new performance schema instrumentation.

For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the …

[Read more]
MySQL University: Performance Schema: Instrumenting Code

This Thursday (February 18th, 17:00 UTC - note the different starting time!), Marc Alff will present the brand new Performance Schema: Instrumenting Code. Marc is the implementor of the Performance Schema feature. His presentation will show how developers maintaining

  • the MySQL server code,
  • a storage engine,
  • or any type of plugin

can instrument the code to collect data for the new performance schema instrumentation.

For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the …

[Read more]
MySQL University: Performance Schema: Instrumenting Code

This Thursday (February 18th, 17:00 UTC - note the different starting time!), Marc Alff will present the brand new Performance Schema: Instrumenting Code. Marc is the implementor of the Performance Schema feature. His presentation will show how developers maintaining

  • the MySQL server code,
  • a storage engine,
  • or any type of plugin

can instrument the code to collect data for the new performance schema instrumentation.

For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the …

[Read more]
The Schema protobuf message: Drizzle’s metadata on a schema

I’ve previously talked about table metadata in Drizzle and how we use the table protobuf message to describe a table (see Drizzle FRM Replacement and others). The model in Drizzle is that the engine is responsible for its metadata. For schemas (you may be thinking ‘database’ but we’re moving to the Schema terminology in Drizzle) we also have a small amount of metadata.

The protobuf message is specified in drizzled/message/schema.proto and is incredibly short. In fact, here it is in its entirety:

[Read more]
MySQL schema maintenance



At CodeBits I had my first session about MySQL schema maintenance. I covered the basic command line possibilities before coming to the recommended tool, MySQL Workbench.
The slides are available at slideshare.


Interesting questions: ([updated] with answers from the development team

  • [Q] Are there plans to administer MySQL Cluster with Workbench?
    [A] Not that we know of.
  • [Q] Can Workbench deal with user permission maintenance across servers? (especially in cases where development and production users can't have …
[Read more]
How to Quickly Visualize/Analyze a MySQL Database?

Once in a while we been in situations where you need to quickly understand/analyze a database given to you by others.  We can go through each table and try to understand but it is usually lot simpler if you can visualize all the tables involved and relationships between those.  Enter SchemaSpy: a free tool to do that.    For sake of specifics, say the database given is MySQL and your pc is running some version of Windows.

A. Download and Install Pre-requsites (if you dont have already)

[Read more]
Free and easy schema diff and patch

The easiest way to see the differences between two schemas on a non-Windows machine is to run:

mysqldump -h server1 --no-data --all-databases > file1.sql
mysqldump -h server2 --no-data --all-databases > file2.sql
diff file1.sql file2.sql

However, this will show also trivial differences, such as the value of AUTO_INCREMENT. It also does not give you a way to patch one schema to be like another.

We frequently are asked to “do a schema diff and create a script that will ‘patch’ one server.” Usually this is done to take a development or test schema and move it to production for a release.

We like to use the best tool for the job, and while diff is good, I like to use MySQL workbench. The OSS (Community) edition provides all the functionality we need for creating a schema diff and …

[Read more]
MySQL Data Type Q&A

Question: “When I use procedure analyse() on my schema it suggests TINYINT for the columns which have the data type VARCHAR. Based on the performance and data requirements, which one is better?”

Answer: TINYTEXT and TINYINT and VARCHAR are quite different. For reference I would refer you to the mysql manual page about data types.

However, procedure analyse() will read the values you have in your columns and if they consistently fit a pattern that would be better suited to another data type then it will suggest the correct one. As in, if your column is VARCHAR(1) and your data is similar to “1,4,7,5,2″ etc then TINYINT would be a better suited data type since you are dealing with numbers and not variable characters. Similarly, if you have the same varchar column, but your data is “a,b,t,h,o” etc then TINYTEXT or CHAR would be better …

[Read more]
Spacewalk, and what we can learn about naming

Red Hat releases Spacewalk. It is described as: “the upstream community project from which the Red Hat Network Satellite product is derived“. Congratulations to all whom have worked on it, especially my friends who tired endlessly over it in the past.

Red Hat, is sticking true to its promise, of open sourcing everything they make. Best of all, they recognise Fedora (they always did, since say, Fedora Core 2 or 3), CentOS (a direct “competitor”/rebuild of RHEL), and Scientific Linux (I know of a certain university’s sysadmin who will be blessing Spacewalk, as her life will now be a lot easier).

There have been a few blogs about it… Matt Asay asks about a community (Red Hat traditionally wasn’t good at this, but with Fedora, I believe they’ve learned, and I’m happy …

[Read more]
Showing entries 11 to 20 of 22
« 10 Newer Entries | 2 Older Entries »