Creating MySQL Tables
I've experimented with the MySQL migration tool. Unfortunately, it seems to be designed for enterprise class databases; it's asking for a lot of parameters that I don't recognize as relevant to the Testing.mdf file which I wanted to migrate. Oh well, I'll have to create a few small tables manually.
I opened up MySQL Administrator to see about creating a custom database. In the previous examples I displayed data from an existing MySQL table which stores character set data. It's part of the install package so it required no custom tables. Now, I need to back up and restore the databases to see if I can really copy information back and forth; naturally, that means I need a couple tables to copy. In the left column, I select Catalogs which opens a new column underneath to choose a schema (plural, schemata). MySQL is a database, but it can actually set up multiple sets of tables. These sets of tables are called schema in MySQL; anywhere else they'd be called a database, which means MySQL is a tool for managing many databases (or in its own terms, schemata). This is important because the name of the schema, e.g. EarthChronicle, must be inserted into your connection string using "database=EarthChronicle;".
Press Ctrl+N to create a new schema or right click a blank space in the schemata column and select it from the context menu. If you wish to work with a schema that's already created, just select it and its tables will appear in a list in the main panel. You can also select other tabs to work with stored procedures, indices, and views, but for now I just need a couple new tables. I click the Create Table button at the bottom of the panel which opens the MySQL Table Editor dialog. In the Table Name text box in the top left corner, I name my tables starting with the word "testing" so there's no confusion that these could be live data tables. Next, I chose Table Options on the top set of tabs, and reset the default selection, InnoDB table engine, to MyISAM which is supposed to be the MySQL default. Then I return to the Columns and Indices tab at top and choose Column Details from the lower set of tabs.
I really like the Table Editor. Things you had to click through tree views for in VWD, are all right at your fingertips here: setting primary keys, autoincrement, column names, data types, default values, etc. By the time I finish setting up the three tables I'm going to use for this test, it's already faster for me to build a database with MySQL Administrator than it ever was with VWD. I'm not pleased with the fact that the data types are not easily available from the table editor or from help. I had to hit the internet to see what my choices were and how they were different. Now that I've done that, however, I can't imagine going back.
I was also able to use the Query Browser to input some quick data to mimic the link factory. Here the Schemata column is on the right side of the main panel; I can't figure out why the UI is different from MySQL Administrator, but it's a simple clear UI. I expand the schema to reveal the tables I built in MySQL Administrator, and double click the table I want to open. This populates a basic display query in the SQL Query Area, and I click the Execute button on the toolbar (a green button with a lightning bolt). The database table data appears in the main area, in my case I have none yet. I click the edit button at the bottom of the main area (centered). I can now select a cell at the beginning of a blank row and simply enter data and tab to switch to the next cell. I repeat this process for each table until I have enough data to create three distinct links.
It took twice as long to explain as to set up. This is really a slick program; I take back some of what I said about it being copyrighted. Now that we've got custom data in it, let's see if we can get it out.