<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Windy Weather &#187; Databases</title>
	<atom:link href="http://www.windyweather.net/wp/category/computers/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.windyweather.net/wp</link>
	<description>The Windy Weather website.</description>
	<lastBuildDate>Wed, 08 Feb 2012 04:48:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Personal Cloud Databases &#8211; DHX QT Shows Promise</title>
		<link>http://www.windyweather.net/wp/2010/02/17/personal-cloud-databases-dhx-qt-shows-promise/</link>
		<comments>http://www.windyweather.net/wp/2010/02/17/personal-cloud-databases-dhx-qt-shows-promise/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 19:05:50 +0000</pubDate>
		<dc:creator>Darrell</dc:creator>
				<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.windyweather.net/wp/?p=1090</guid>
		<description><![CDATA[As we have seen in previous articles, I&#8217;ve been looking at what we might call Personal Cloud Databases. There are many Cloud Data tools out there. I found a review article here, and then looked at these and other alternatives. ZOHO Creator &#8211; 3 apps free. $15/mo basic plan. Dabble DB &#8211; free public data. [...]]]></description>
			<content:encoded><![CDATA[<p>As we have seen in previous articles, I&#8217;ve been looking at what we might call Personal Cloud Databases. There are many Cloud Data tools out there. I found a <a href="http://www.computerworld.com/s/article/9081958/Review_4_online_databases_let_you_structure_and_share_your_data_?taxonomyId=18&amp;pageNumber=1" target="_blank">review article here</a>, and then looked at these and other alternatives.</p>
<ul>
<li><a href="http://creator.zoho.com/" target="_blank">ZOHO Creator</a> &#8211; 3 apps free. $15/mo basic plan.</li>
<li><a href="http://www.dabbledb.com/demo/" target="_blank">Dabble DB</a> &#8211; free public data. $24/mo for private data. Very cool concepts.</li>
<li><a href="http://www.weboffice.com/web-database/index.html" target="_blank">Web Office</a> &#8211; $53/mo includes data.</li>
<li><a href="http://www.google.com/google-d-s/intl/en/tour1.html" target="_blank">Google Docs</a> &#8211; Free. No database. Spreadsheet only.</li>
<li><a href="http://basecamphq.com/signup" target="_blank">BaseCamp</a> &#8211; No free option. Starts at $24/mo.</li>
<li><a href="http://www.microsoft.com/windowsazure/pricing/" target="_blank">Windows Azure</a> &#8211; Clearly not personal. Impossible to tell what it would cost.</li>
</ul>
<p>And there are more, mostly pitched at small businesses and enterprises, and expensive. At least very expensive compared with Blogging or Photo Galleries. So my question is: Why are database tools so expensive compared with Blogging and Photo tools, which are usually free or almost free? The reason I believe is Open Source.</p>
<p>I think there is a very interesting opportunity for a platform, like WordPress for personal data tables.</p>
<p><span id="more-1090"></span></p>
<p><strong>Like WordPress for Data</strong></p>
<p>WordPress is a very popular blogging platform and it has an Open Source model. The software is free, but there is a combined Hosting Service / Blog based on wordpress that costs a modest amount. It seems to me that we need to have this model with web data tools, or what I&#8217;m going to call Personal Cloud Databases. What I want is a WordPress like platform for Personal Data. It would have the following attributes:</p>
<ol>
<li>The software would be OpenSource under GPL licensing and</li>
<li>would be suitable for personal and small business use. The target is not the Enterprise, those folks already have many cloud solutions.</li>
<li>You could easily install it on your own hosting service or</li>
<li>there would be one or more paid services that provide reasonable plans &#8211; $5-$10/mo &#8211; that would provide hosting possibly with co-located blog/sites and domain purchase.</li>
<li>Hosting sites like <a href="http://www.squarespace.com/" target="_blank">SquareSpace</a> could integrate the software to provide data services in addition to their site creation and hosting.</li>
<li>The platform would allow import and export of data in some common forms, including SQL so that more complex databases could be accomodated.</li>
<li>The methodology would be simplified. More at the level of MS Access or OpenOffice Base, rather than the level of SQL tools or phpMyAdmin.</li>
<li>WordPress features of Themes, Plugins, Widgets would be provided to allow a rich eco-system of contributors to develop. The real success of WordPress, I think, is the nature of this large eco-system. And themes, and plugins are key to this eco-system.</li>
<li>WordPress features like ease of install and ease of update are provided. The ability install plugins/themes directly with no download/upload cycle and the ability to upgrade the wordpress directly on the site are key ease-of-use features for any modern web platform.</li>
<li>It would fit nicely with, or embed in, Joomla, Drupal, WordPress and Forums. This means that it can be embedded to add data, as well as view it, and it can have complementary themes, or use, themes from these CMS systems &#8211; and possibly others. Joomla and Drupal do not have serious data management plug-ins, and the use of these CMS systems to build serious business sites points to the need for a data tool that works with these environments.</li>
</ol>
<p><strong>Starting a Design but DHX Quick Tables is Better</strong></p>
<p>I have started design of such an environment as I just described, based on the <a href="http://www.dojotoolkit.org/" target="_blank">DOJO Javascript toolkit</a> and a php back end. But then I found the <a href="http://www.dhtmlx.com/index.shtml" target="_blank">DHX tools</a> and specifically <a href="http://www.dhtmlx.com/blog/?p=144" target="_blank">DHX Quick Tables</a> and I&#8217;ve re-directed my efforts.</p>
<p>At this point, I&#8217;ll be forwarding these ideas to the creators of DHX tools and continue, at some level, to investigate using DHX tools to build a Personal Cloud Database.</p>
<p><strong>DHX QT Enhancements for Personal Cloud Data</strong></p>
<p>As I understand it, DHX QT has the following limitations that should be enhanced to provide the PCD platform:</p>
<ol>
<li>Ability to build tables and fields directly in the tool rather than importing tables that are created with another tool.</li>
<li>Support for field types. See below.</li>
<li>Support for forms. While one can to CRUD [Create Update Delete] on a table using only a grid view, there are more complex tables [or support for long text fields like the book example] where forms are useful.</li>
<li>The elimination of a table creation step in favor of table creation as a form is created has much appeal in simplifying the process. ZOHO creator does this. Study of ZOHO Creator may lead to interesting insights into the entire design.</li>
<li>Support for multiple users and passwords in the style of WordPress.</li>
<li>Support for multiple databases under one installation. Currently DHX QT supports only one database per installation, so a separate installation is required to support multiple databases.</li>
<li>Storage of meta data in a database table rather than a text file. This makes backup easy. Currently backing up a DHX QT application requires backing some some configuration data files.</li>
<li>Themes. Incorporating the Skin Designer into the platform and allowing Themes to be exported would solve the problem. Of course apply and manage themes</li>
<li>Ability to easily embed table views in other CMSs / web pages. Export an &lt;IFRAME&gt; at minimum.</li>
<li>Plug-ins, Auto-install, update etc. as for WordPress.</li>
<li>Plugins probably take the form of filters and datatype widgets. Complex layout like wordpress is not needed since the data tables can be embedded in other CMSs to provide this layout.</li>
</ol>
<p>Support for the following datatypes is interesting. These are pretty much those provided by ZOHO Creator:</p>
<ol>
<li>Text with max width.</li>
<li>Multi-line text.</li>
<li>Text with an input mask.</li>
<li>Numeric field: Integer, Decimal, Real?</li>
<li>Date, Time and Date/Time. All with popup widgets for setting and display preferences.</li>
<li>Enum &#8211; with an easily edited set of choices. Display as Pull-Down or Radio box as edit.</li>
<li>Set &#8211; with an easily edited set of choices. Displayed as a set of checkboxes when modifying the field, rather than requiring &#8220;armor,pants,gloves&#8221; style entry.</li>
<li>Single Checkbox.</li>
<li>Image &#8211; as file path on the server or url or blob.</li>
<li>URL &#8211; as link to web with New Window option default.</li>
<li>Table Link or Lookup field. This relates a field on one table to a field in another table. This provides the ability to build 1st normal form databases. For example, A Char_Table contains an ID and a CharName field. In another CharArmor table, the Char holding the armor is specified as a CharID field which contains the ID number from the Char_Table. In the UI it is displayed as the CharName text field and is set with a drop-down populated by the CharNames from the Char_Table. ZOHO Creator has a Lookup field, which appears to work this way.</li>
</ol>
<p>Most of the complicated parts of the platform are already present in the DHX tools, including the widgets &#8211; maybe not image &#8211; and the grid display and &#8220;connector&#8221; which provides a simple way to build a server in php, or other languages.</p>
<p>I would hope that the DHX folks pick up the torch and proceed to build the environment as an Open Source platform in the style of WordPress so that we can get on with building the eco-system.</p>
<p>Enjoy,</p>
<p>Windy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.windyweather.net/wp/2010/02/17/personal-cloud-databases-dhx-qt-shows-promise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DHX Quick Tables</title>
		<link>http://www.windyweather.net/wp/2010/02/17/dhx-quick-tables/</link>
		<comments>http://www.windyweather.net/wp/2010/02/17/dhx-quick-tables/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 17:39:58 +0000</pubDate>
		<dc:creator>Darrell</dc:creator>
				<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.windyweather.net/wp/?p=1086</guid>
		<description><![CDATA[As you may remember from a previous article, I have been using ZOHO creator to store MMO game data while I play the game to keep track of my characters and their loot. I was not happy with the ZOHO solution due to it&#8217;s high cost &#8211; $15/mo beyond 3 databases [applications]. While I have [...]]]></description>
			<content:encoded><![CDATA[<p>As you may remember from a previous article, I have been using <a href="http://www.windyweather.net/wp/2010/01/18/zoho-creator-database/" target="_blank">ZOHO creator to store MMO game data</a> while I play the game to keep track of my characters and their loot. I was not happy with the ZOHO solution due to it&#8217;s high cost &#8211; $15/mo beyond 3 databases [applications]. While I have not yet exceeded that, I desire a solution that will live on my hosting service where I have unlimited storage/databases.</p>
<p>I have found a solution with <a href="http://www.dhtmlx.com/blog/?p=144" target="_blank">DHX Quick Tables</a>, and for now I&#8217;m using that as we will see. <span id="more-1086"></span>I&#8217;ve exported the 2Moons data from Zoho Creator and built a MySQL database with 3 tables: character, armor and weapons. I&#8217;ll do the other tables later, but for now everything is working. I&#8217;m using MySQL 5 and innoDB tables. One minor glitch is that DHX requires php5, and I had not yet upgraded my site to php5. Once I asked the support group how to upgrade, I was all set.</p>
<p>I&#8217;ve discovered the following things that will help you if you decide to do this as well:</p>
<p>First you need to define  your MySQL database and table. When testing this locally in an xampp environment, I used MySQL Admin to define the database, and a user with a password and full access to the database. On my hosting service, I used phpMyAdmin, which is provided in the control panels. Once I had the database and user defined, I used phpMyAdmin to create the tables and upload the data. I had exported the data from ZOHO creator as CSV files, so I stripped off the header and used the LOAD function to populate the table. There are several things to watch for as you migrate to DHX quick tables.</p>
<ol>
<li>You need an INT autoincrement field in the table. This field will not be displayed in the tables, but is required so that updates work correctly. It is easy to add a field using phpMyAdmin. Set the datatype to INT and enable AutoIncrement and Primary Index.</li>
<li>Avoid integer fields, unless you want to enter data. Null fields for INT fields do not appear to work. But VARCHAR NULL fields work just fine.</li>
<li>SETs and ENUMs work, but you cannot leave ENUMs null either, so you may want to use SETs. ZOHO provides a series of checkboxes for ENUMs which is more convenient to edit them. With DHXQT, you must enter them as a series of names with commas. Leave out the spaces like this: pants,armor,helmet.</li>
<li>You can set a character name using a pull down list.</li>
<li>Linked fields are not provided. The tables are isolated. This may be a problem for some applications, but in this case it&#8217;s not a big deal.</li>
</ol>
<p><strong>Table Definitions</strong></p>
<p>Unlike ZOHO creator, MS Access, or OpenOffice Base, defining tables in DHXQT requires knowledge of SQL and detailed knowledge of databases. As I will discuss in a later article, DHXQT could form the basis of an easy to use Personal Cloud Database tool, but it&#8217;s not there yet. You must be database savvy and comfortable with tools like phpMyAdmin to use DHXQT.</p>
<p>For this application I&#8217;ve defined three tables:</p>
<ol>
<li>A character table.</li>
<li>A table with Armor parts.</li>
<li>A table with Weapons.</li>
</ol>
<p><img title="More..." src="http://whitesquall/wordpress/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p>Here&#8217;s the Characters table:</p>
<blockquote><p><code>--<br />
-- Table structure for table `characters`<br />
--<br />
CREATE TABLE IF NOT EXISTS `characters` (<br />
`ID` int(11) NOT NULL auto_increment,<br />
`char_name` varchar(32) NOT NULL,<br />
`level` int(11) NOT NULL,<br />
`class` enum('Aloken','Knight','Summoner','Segnale','Hunter','Magician','Bagi Warrior') NOT NULL,<br />
`server` varchar(16) NOT NULL,<br />
`account_name` varchar(32) NOT NULL,<br />
PRIMARY KEY  (`ID`)<br />
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;</code></p></blockquote>
<p>The armor and weapon tables are more complicated:</p>
<blockquote><p>&#8211;<br />
&#8211; Table structure for table `character_armor`<br />
&#8211;</p>
<p>CREATE TABLE IF NOT EXISTS `character_armor` (<br />
`ID` int(11) NOT NULL auto_increment,<br />
`char_name` varchar(32) NOT NULL,<br />
`level` int(11) NOT NULL,<br />
`armor_type` varchar(64) NOT NULL,<br />
`armor_parts` set(&#8216;boots&#8217;,'pants&#8217;,'gloves&#8217;,'armor&#8217;,'helmet&#8217;) default NULL,<br />
`boots_fortified` varchar(64) default NULL,<br />
`pants_fortified` varchar(64) default NULL,<br />
`gloves_fortified` varchar(64) default NULL,<br />
`armor_fortified` varchar(64) default NULL,<br />
`helmet_fortified` varchar(64) default NULL,<br />
`sold` set(&#8216;boots&#8217;,'pants&#8217;,'gloves&#8217;,'armor&#8217;,'helmet&#8217;) default NULL,<br />
PRIMARY KEY  (`ID`)<br />
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=80 ;</p>
<p>&#8211;<br />
&#8211; Table structure for table `character_weapons`<br />
&#8211;</p>
<p>CREATE TABLE IF NOT EXISTS `character_weapons` (<br />
`ID` int(11) NOT NULL auto_increment,<br />
`char_name` varchar(64) NOT NULL,<br />
`level` int(11) NOT NULL,<br />
`weapon_name` varchar(64) NOT NULL,<br />
`have_need` set(&#8216;have&#8217;,'need&#8217;) default NULL,<br />
`plus_level` varchar(4) default NULL,<br />
`enhancements` varchar(64) default NULL,<br />
`gem_fortifications` varchar(64) default NULL,<br />
`sale_state` set(&#8216;sale&#8217;,'sold&#8217;) default NULL,<br />
`dil_price` varchar(11) default NULL,<br />
PRIMARY KEY  (`ID`)<br />
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=115</p></blockquote>
<p>The quick tables created from these look as follows:</p>
<p><strong><a href="http://www.windyweather.net/dhtmlx/2moons/characters.php" target="_blank">The Character Table</a>:</strong></p>
<p><strong><a href="http://www.windyweather.net/dhtmlx/2moons/character_armor.php" target="_blank">The Armor Table:</a></strong></p>
<p><strong><a href="http://www.windyweather.net/dhtmlx/2moons/character_weapons.php" target="_blank">The Weapon Table:</a></strong></p>
<p>As you see, each instance of DHXQT supports multiple tables from the same database.</p>
<p>You can have as many databases as you like on your system. Just install a new instance of Quick Tables for each database.</p>
<p><strong>Applying New Styles</strong></p>
<p>As you can see, I have set the title tag and adjusted the styles to be the built-in style of black. This must be done by editing the php file for each table manager.</p>
<p>The <a href="http://www.dhtmlx.com/docs/products/skinBuilder/index.shtml" target="_blank">DHX Skin Builder</a> is used to build the styles and then they are copied to the DHXQT directory and the table file modified to load the new styles.</p>
<p><strong>The Books Database</strong></p>
<p>Two years ago I needed to sell a couple of hundred old science fiction paperback books, so I entered them all into a database table, photographed their covers and divided them into lots by publication years to sell on Ebay. At the time I wanted a way for folks to see the detailed information on the books before they bid. I built a MySQL data table by hand and then a simple php application, again by hand, to sort and display the books in a web page. The web display is trivial using DHXQT, but there are limitations. It does not seem there is an image display widget in the DHX toolkit this is a surprising omission given the power and breadth of the toolkit.</p>
<p><a href="http://www.windyweather.net/dhtmlx/books/books_database.php" target="_blank">Here is the book table in QT.</a></p>
<p><strong>Summary</strong></p>
<p>While Quick Tables does not have linked fields, and some of the other  field types that ZOHO supports, Quick Tables have the advantage of being free, so you can build as many tables as you like. They are slightly more difficult to build, but there is no limit to the number or the size of the data you can store. Given the key scheme that Quick Tables uses for security, the data is quite secure from modification.</p>
<p>- windy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.windyweather.net/wp/2010/02/17/dhx-quick-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZOHO Creator Database</title>
		<link>http://www.windyweather.net/wp/2010/01/18/zoho-creator-database/</link>
		<comments>http://www.windyweather.net/wp/2010/01/18/zoho-creator-database/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 02:00:18 +0000</pubDate>
		<dc:creator>Darrell</dc:creator>
				<category><![CDATA[2Moons]]></category>
		<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://www.windyweather.net/wp/?p=977</guid>
		<description><![CDATA[ZOHO provides Cloud Applications including a database builder called Creator. It looks very nice and allows you to build a simple database with very little work, and no extensive database expertise. I moved my 2Moons character database to ZOHO in only an hour or so. Looks great to me. Sure would be nice to have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zoho.com/" target="_blank">ZOHO provides Cloud Applications</a> including a database builder called Creator. It looks very nice and allows you to build a simple database with very little work, and no extensive database expertise. I moved my <a href="http://www.windyweather.net/wp/2009/01/05/2moons-management-database/" target="_blank">2Moons character database</a> to ZOHO in only an hour or so. Looks great to me.<br />
<span id="more-977"></span><br />
Sure would be nice to have a database in the cloud. We have investigated Google Docs and I&#8217;ve got an example <a href="http://www.windyweather.net/wp/2009/07/19/google-spreadsheet-test/" target="_blank">Spreadsheet here</a> and an example <a href="http://www.windyweather.net/wp/2009/08/02/google-docs-spreadsheet-charts/" target="_blank">Chart here.</a></p>
<p>In some previous cases I&#8217;ve needed simple databases: Books for sale on EBay, a DVD database list and a 2Moons Character database. For Books, I used MySQL and php here on this site [ But I didn't maintain it.] For the DVD database, I used Open Office connected to MySQL to store the data and image thumbs of covers. For the 2Moons characters, I used an <a href="http://www.openoffice.org/product/base.html" target="_blank">Open Office Base application</a>.</p>
<p>When I selected the Open Office solution to avoid high costs and to allow me to move the application around between computers and operating systems. Open Office works on Windows, Mac and Linux. However, the problems of backing up and saving versions of the application as I enhance it are a lot of work. Which version on the various computers is the latest one? Sure would be nice for it to be in the Cloud so I wouldn&#8217;t have to worry about those issues.</p>
<p>After a little searching, I found ZOHO Creator. Here&#8217;s two views of the 2Moons database that I build in an hour or so.<br />
<br/><br />
<iframe height='500px' width='100%' name='zoho-Moons_Characters_RO' frameborder='0' scrolling='auto' allowTransparency ='true' src='https://creator.zoho.com/windyweather/2moons-characters/view-embed/Moons_Characters_RO/fOmMZseKu2saxPZWPTzKMr3EyT5uMdeATXkqDjMS3CnrsEtftkR4yXAeMhFgVK9rn6B51prMva5X10eKtrs5P9Gd7773G2WydmNz/'></iframe><br />
<br/></p>
<p>So it seems to work pretty well. Here is a list of weapons filterable by Character name.<br />
<br/><br />
<iframe height='500px' width='100%' name='zoho-Weapons_By_Character' frameborder='0' scrolling='auto' allowTransparency ='true' src='https://creator.zoho.com/windyweather/2moons-characters/view-embed/Weapons_By_Character/XV967w5vBUkbtRtS9sqzJVw9xnxJwszRXt9VHjytteZ6An93OQTHHy3EBWK0Hty55nuV3vKOqdMeqyAYFRKqT6nyyt7sTf7VgyPe/'></iframe><br />
<br/><br />
<strong>CAUTION:</strong> Do not use the JavaScript snippet. It breaks WordPress layout.</p>
<p>One of the issues that I struggle with in OOBase was building a form that filtered by character. I had to get an obscure script from a fellow in a forum to solve the problem. But with ZOHO creator, it was easy. Just drag a LOOKUP field into your form and set the field. Problem solved.</p>
<p>You&#8217;ll notice that he embedded views look pretty generic and don&#8217;t match this website at all in style. Sure would be nice if ZOHO provided &#8220;Themes&#8221; or worked with the stylesheet of WordPress or other CMS where the embedding occurred.</p>
<p>I did find a minor problem. If you build a Dropdown list field, and then later you try to add or modify the choices, Creator will likely kick out some errors. Based on a forum post, they will consider this as a future enhancement, but as a workaround, you can edit the form script to fix the order of the entries.</p>
<p>ZOHO provides useful and free subscriptions for each of their Office features. For Creator there is a free subscription that allows 3 applications, 1000 records and 200MB. But if you want more, the next upgrade is $15 / month. Sigh&#8230; There is a reason that I don&#8217;t spend $15 / mo to play World of Warcraft. That seems way too expensive compared with my hosting service which gives me UNLIMITED MySQL databases and UNLIMITED storage for $5 / month.</p>
<p>But the good news is that it works just fine and is easy to use, even for a novice with limited database experience. Force.com provides a solution too, but their solution requires a database administrator level of knowledge to use. ZOHO is much better.</p>
<p>You can share your application for $$ or for free, with or without the data, and with or without the ability for them to modify the application. Pretty slick. They also have a place for developers and clients to meet base on requirements of work that clients need done.</p>
<p>- windy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.windyweather.net/wp/2010/01/18/zoho-creator-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2Moons &#8211; Management Database</title>
		<link>http://www.windyweather.net/wp/2009/01/05/2moons-management-database/</link>
		<comments>http://www.windyweather.net/wp/2009/01/05/2moons-management-database/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 03:11:37 +0000</pubDate>
		<dc:creator>Darrell</dc:creator>
				<category><![CDATA[2Moons]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Open Office]]></category>

		<guid isPermaLink="false">http://www.windyweather.net/wp/?p=440</guid>
		<description><![CDATA[Managing a stable of characters in an RPG is a complicated process. My limited experience with MMORPGs indicates that it can be more efficient to build more than one character at a time. At least it is more interesting. In the two MMORPGs that I&#8217;ve tried I&#8217;ve built several characters to try to learn more [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_tables2.jpg" target="_blank"><img class="alignnone size-medium wp-image-447" title="db_tables2" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_tables2-500x444.jpg" alt="" width="318" height="282" /></a></p>
<p>Managing a stable of characters in an RPG is a complicated process. My limited experience with MMORPGs indicates that it can be more efficient to build more than one character at a time. At least it is more interesting. In the two MMORPGs that I&#8217;ve tried I&#8217;ve built several characters to try to learn more about the game and the character classes. In 2Moons I&#8217;m currently running six characters. This is efficient since as they level up all the interesting loot is saved for the other characters and one higher level character can finance a lower level character&#8217;s purchase of expensive items.</p>
<p>But, the downside of doing this is you have to keep track of all the loot that each character has and what they need. In Guild Wars this was easy because there is an account-wide storage facility where all the loot is kept. But with 2Moons, each character has a separate stash, or storage locker, so you have to remember what&#8217;s in each one to avoid wasting time with items that you already have collected.</p>
<p><span id="more-440"></span></p>
<p>I&#8217;ve started to build an Open Office database to store this data for my 2Moons characters. I&#8217;ve got the data scheme designed and some reports done, but at this point I need Forms to fill out the various data. The data is in Normal Form and I&#8217;m not sure how to build a form to allow entry of the data. First let&#8217;s review the data design and the queries.</p>
<p>This is the character table.</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_character.jpg" target="_blank"><img class="alignnone size-medium wp-image-442" title="db_character" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_character-500x259.jpg" alt="" width="500" height="259" /></a></p>
<p>This is the armor table.</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_armor.jpg" target="_blank"><img class="alignnone size-medium wp-image-441" title="db_armor" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_armor-500x259.jpg" alt="" width="500" height="259" /></a></p>
<p>The details are not important unless you are a 2Moons player. There are too many types of armor to have a table for that. Instead of a Armor Name Table, we just list the armor name. Each armor type has 5 matching pieces. Some intermediate armor types only have one or two parts, but we ignore that detail. This table allows us to keep the status of each bit of armor that we need and which pieces we have.</p>
<p>But the interesting case is the stones case. For the collection of stones, there are only a few types so that there is a table of stone names. And we want a report of the number of stones kept by each character.</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stonetype.jpg" target="_blank"><img class="alignnone size-medium wp-image-446" title="db_stonetype" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stonetype-500x259.jpg" alt="" width="500" height="259" /></a></p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stones.jpg" target="_blank"><img class="alignnone size-medium wp-image-445" title="db_stones" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stones-500x259.jpg" alt="" width="500" height="259" /></a></p>
<p>This is in fully normal form, just a list of the character id, stone type id, and the number of stones.</p>
<p>Here is a query that gets the list for a report:</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_query_stones.jpg" target="_blank"><img class="alignnone size-medium wp-image-449" title="db_query_stones" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_query_stones-325x500.jpg" alt="" width="325" height="500" /></a></p>
<p>So that is clear enough.</p>
<p>But what about the forms to fill out the data. So far I&#8217;ve been filling out the data manually by editing the tables. This is ok for the characters, but for the Armor, Weapons and Stones, this is not convienent since the numbers of the character records and stone types have to be entered manually.</p>
<p>I&#8217;d like to have a form for the Armor that allows the Character to be set with a pull-down, and a Stones form that allows the Character and Stone Type to be set from pull-down lists.</p>
<p>Can someone show me an example of this?</p>
<p>Here is the Open Office Database file: <a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/2moons_characters_example.zip" target="_blank">2moons_characters_example</a></p>
<p>Thanks,</p>
<p>- Windy</p>
<p><strong>Update:</strong></p>
<p>Thanks to <a href="http://www.oooforum.org/forum/viewtopic.phtml?t=78672" target="_blank">VooBase on the OpenOffice.org Forums</a> for suggestions and pointers to using a listbox to solve the problem. I have solved the problem and the forms work just fine.</p>
<p>Here are the forms to modify the Armor, Weapons and Stones held by each of the characters. The characters entries can be made or modified by using any of these forms. The list of stone types has to be modified manually by editing the table at this point, but adding a form to do this is trivial.</p>
<p>[All the data in the database is correct- these are my 2Moons characters. But the account names have been modified obviously, for security reasons. See you in game if you like. ]</p>
<p>Here is the Armor Form:</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_armor_form.jpg" target="_blank"><img class="alignnone size-medium wp-image-453" title="db_armor_form" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_armor_form-500x272.jpg" alt="" width="500" height="272" /></a></p>
<p>By selecting any field in the character field above, you can scan through the characters and modify any fields you like. By selecting the subform below, you can add or modify entries in the armor table. Note that the character field is a list, so you can pull-down from the available characters. This allows you to move armor among characters. Note that the armor is sorted by the highest level first, which is normally the most interesting armor.</p>
<p>Here is the Weapons form with the character list pulled down:</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_weapons_charlist.jpg"><img class="alignnone size-medium wp-image-456" title="db_weapons_charlist" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_weapons_charlist-500x294.jpg" alt="" width="500" height="294" /></a></p>
<p>This form works the same as the Armor form.</p>
<p>Here is the Stones Form. This form has two pulldown lists, one for character and one for stones type:</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stones_form.jpg"><img class="alignnone size-medium wp-image-455" title="db_stones_form" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stones_form-500x367.jpg" alt="" width="500" height="367" /></a></p>
<p>And here is the Stone_ID column open showing the settings:</p>
<p><a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stoneid_field.jpg"><img class="alignnone size-medium wp-image-454" title="db_stoneid_field" src="http://www.windyweather.net/wp/wp-content/uploads/2009/01/db_stoneid_field-500x308.jpg" alt="" width="500" height="308" /></a></p>
<p>The Wizard does not work in the Spreadsheet format of the subform. But I was able to create a field in the form using the wizard and then copied the settings from the List Control to the column to get it to work. The character_ID column control settings are identical to the separate control. I wrote the Select statement for the Stone_ID column by example from the Character_ID field.  I have no idea what the bound field means.</p>
<p>The other issue I ran into is how to add the label for the entire form above the fields. To solve this problem, I changed the anchor point for all the controls to Page and then moved them down. Then created a label, anchored it to the page, moved it and set the font to size 24.</p>
<p>Each time you save the form, you need to go to the database dialog and save it all too. If something crashes without you doing this, you will lose all your work, as I did. BTW, this was built with Open Office 2.4.</p>
<p>Here is the updated example:<a href="http://www.windyweather.net/wp/wp-content/uploads/2009/01/2moons_characters_example2.zip">2moons_characters_example2</a></p>
<p>Enjoy, if this application helps you with 2Moons or in any other way, I&#8217;d prefer an acknowledgment and a note saying how it helped. DISCLAIMER: Like all software you find, your use of this is at your own risk. If there are bugs, I&#8217;ll help if I can.</p>
<p>Cheers, and see you online.</p>
<p>- windy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.windyweather.net/wp/2009/01/05/2moons-management-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Unable to Restore</title>
		<link>http://www.windyweather.net/wp/2008/06/05/mysql-unable-to-restore/</link>
		<comments>http://www.windyweather.net/wp/2008/06/05/mysql-unable-to-restore/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 06:13:43 +0000</pubDate>
		<dc:creator>Darrell</dc:creator>
				<category><![CDATA[Bug Info]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Evaluations]]></category>
		<category><![CDATA[Open Office]]></category>

		<guid isPermaLink="false">http://www.windyweather.net/wp/?p=266</guid>
		<description><![CDATA[When building a database of my DVD collection which includes BLOB images of png images of the covers, the database can be backed up, but it cannot be restored. This of course makes the backups useless. The images are 475&#215;475 pixel PNG images. UPDATE: Problem solved. Parameter max_allowed_packet is the packet size for requests. This [...]]]></description>
			<content:encoded><![CDATA[<p><img title="logo_mysql" src="http://www.windyweather.net/wp/wp-content/uploads/2008/06/logo_mysql.png" alt="" width="126" height="88" align="left" /></p>
<p>When building a database of my DVD collection which includes BLOB images of png images of the covers, the database can be backed up, but it cannot be restored. This of course makes the backups useless. The images are 475&#215;475 pixel PNG images.</p>
<p><span style="color: blue;"><strong>UPDATE: </strong>Problem solved. Parameter max_allowed_packet is the packet size for requests. This defaults to 1M and needs to be larger to allow this restore to work. Setting the max_allowed_packet parameter to 10M allowed the restore to complete successfully.</span><br />
<span id="more-266"></span><br />
I&#8217;m using MySQL administrator 1.2.12, MySQL 5.0.51b-Community-nt, MySQL client version 5.1.11 running on Windows Vista Ultimate x86 SP1.</p>
<p>The database was built using OpenOffice 2.4.</p>
<p>Using the default backup settings, the error on restore was:</p>
<blockquote><p>Error while executing this query:INSERT INTO `dvd-collection` (`dvd_ID`,`MovieTitle`,`Director`,`Producer`,`Actor`,`Genre`,<br />
`Notes`,`Rating`,`Review`,`Subject`,`Writer`,`Format`,<br />
`Source`,`DateAcquired`,`ReleaseYear`,`MPAARating`,<br />
`Length`,`disk_image`) VALUES<br />
(1,&#8217;Step Into Liquid.&#8217;,'Dana Brown&#8217;,NULL,&#8217;Robert August,<br />
Rochelle Ballard, Shawn Barron, Dave Kalama, Gerry Lopez,<br />
Robert \&#8221;Wingnut\&#8221; Weaver&#8217;,'Documentary&#8217;,<br />
&#8216;No stuntmen. No stereotypes. No other feeling comes close&#8217;,<br />
5,NULL,&#8217;Surfing&#8217;,'Dana Brown&#8217;,'DVD&#8217;,'DishNetwork&#8217;,2006,2003,<br />
&#8216;PG&#8217;,88,0x89504E&#8230;44AE426082);<br />
The server has returned this error message:MySQL server has gone away<br />
MySQL Error.</p></blockquote>
<p>Using these additional settings:</p>
<ul>
<li>InnoDB Online Backup</li>
<li>No EXTENDED INSERTS</li>
<li>Add DROP Statements</li>
<li>Complete INSERTS</li>
<li>Comment</li>
<li>Compatibility Mode</li>
<li>Disable Keys</li>
</ul>
<p>The error was:</p>
<blockquote><p>Unknown object in backup file</p></blockquote>
<p>Download excerpts of the SQL files that fail to restore:</p>
<p><strong><a href="http://www.windyweather.net/wp/wp-content/uploads/2008/06/mysql_restore_bug.zip">mysql_restore_bug</a></strong> 1.4MB</p>
<p><strong><a href="http://www.windyweather.net/wp/wp-content/uploads/2008/06/DVD_Backup_2_40_Rows.zip">DVD_Backup_2_40_Rows</a></strong> 14MB</p>
<p>These excerpts fail as well. The complete SQL backup file is 270MB, so not only is it large but I don&#8217;t really want to share the entire file. By the way, &#8220;Analyze Backup File Content&#8221; works fine for all the files.</p>
<p>The mysql command fails as well:<br />
<code>C:\Darrell\Video_Database\backups&gt;mysql --user=root --password=mysecret dvd_video &lt; DVD_Backup_2_40_Rows.sql<br />
ERROR 2006 (HY000) at line 89: MySQL server has gone away<br />
C:\Darrell\Video_Database\backups&gt;mysql --user=root --password=mysecret dvd_video &lt; DVD_Video_Two_Rows_Second_Try.sql<br />
C:\Darrell\Video_Database\backups&gt;</code></p>
<p>It works for 2 rows, but not for the 40 row file.</p>
<p>Thanks,</p>
<p>Windy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.windyweather.net/wp/2008/06/05/mysql-unable-to-restore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

