Monday, December 8, 2008

 

Starting with Databases

For the non-technical person creating a database can be intimidating. Depending on the type of database your are trying to create, the setup process may ask you all sorts of questions that you aren't sure what the question is, let alone the answer. But there are many alternatives to full blown relational databases such as Oracle or Sybase that are used to keep financial transactions safe. For many purposes an XML database can simplify the setup process and give you the flexibility that you need. By using a standard such as XML you know your data can be easily exported to a spreadsheet or other formats so if your business takes off and needs more muscle you can apply it.

So how do you get started? First think about how you need to use the information. If you want to send email to all people in your database who live in Ohio or people who buy organic milk you will need to collect that information and have separate fields to contain it. If it was a spreadsheet you would have a column for each of those items. In fact you can easily upload your spreadsheet into an online database and then be able to search and sort in addition to sending email.

There are a few tips to think about when you are creating fields. Keep the field names short but descriptive. We aren't back in the early days of computers where every byte was expensive so you can use field names such as first_name, last_name, state, and milk_type. The field label is an external name for the field and that can be even longer. So for the milk_type field that might be "Type of Milk Purchased".

The types of fields that you can define for an online database correspond to the field types used in web forms that can be used to automatically store data into your online database. Field types include text for short bits of text, text area for longer blocks of text in addition to menus, radio buttons and checkboxes. Menus are pull down menus where you can select one or more items. Radio buttons only allow you to select one value from the set of options so for the type of milk example your choices might be organic nonfat, organic 1%, organic 2%, organic whole, nonfat, 1%, 2% and whole.

But what if you have a family and you have to buy different types of milk for different family members? Then a checkbox is the way to go where you can select as many of the options as you want. But now this is starting to sound more technical. Don't worry - with an online database you can just focus on the values that you want people to pick from and let the system underneath take care of the details.

Another big advantage of an XML database is flexibility. You can try out the one field type and if that doesn't work, change it to another. You can also add new fields in later as you discover that you really need to know what kind of cookies they like with their milk.

Labels: