My blog has moved!

You should be automatically redirected in 4 seconds. If not, visit
http://alexkaminski.org
and update your bookmarks.

Wednesday, March 26, 2008

Quick Overview of Database Design for the Web

So you're just getting started building your website and need features that require a database (such as user login and profiles). If you've never used a database before, this might seem daunting and complex. Well, it's not, it just takes practice and basic programming skills.

What's a Database and why do I need one?

Before we go further, let's explain what a database does and why its necessary. Essentially, a database is used to store information. The kind of information that can be stored varies from user comments on a blog post to credit card details of an online purchase. If you want to create a website that saves or accesses information in anyway, you will need to use some type of database. 

What does it look like?

A database is composed of tables. These tables have rows that store different information in each column. So a database will look something like this:
- Database
- Table users
- Table comments

Now, let's see how these tables would look like:



You'll notice that we don't have one table, but instead split the information among two tables: users and comments. 

So why can't I just have all my information in one table?

Most programmers do exactly that when they design their first table in a database. Let's look at a design like that:


Notice that in the above table design the user John Smith had two comments. In order to create the second comment, we had to create another row repeating his user_id, name, and email information. This type of design is crude and inefficient. Imagine if the user decided to change his email and you need to update your database. In this type of one-table design you would have to iterate through each row that belongs to the user and update their email. Seems inefficient right?

So what do we do? We split the information up into two tables (as shown in the images above). This reduces any data redundancy and makes the whole database design more efficient. 

How to scale your database

One of the best ways to scale your database is to split your data up among various tables. This allows you to split your tables up and place them in other databases. These databases can be located on other database servers, thus reducing the strain of having one database server run all the requests. 

What do I do next?

Next, you should decide on a type of database. There are free ones available such as MySql or more robust but expensive ones such as Microsoft Sql Server. You'll need to learn the SQL programming language, which is how you interact with the database and create, edit information. I'm not going to try and teach you the SQL language, but I'll direct you to a website that has great tutorials on this subject. 

Wednesday, March 19, 2008

Naming Your Startup

Naming your startup is probably one of the most important things your startup needs to do for branding and marketing. For the last couple months our team has tried to come up with a good name for our dating startup. We've gone through hundreds of names and all of them are either taken or we don't "love it". We haven't decided on a name yet, but I wanted to share some of our thoughts on making that decision. 


Simplicity and Pronunciation
If you're looking at doing any viral marketing you need a name that is short, simple, and easy to pronounce. When you imagine your users telling their friends about your website, you want to be sure that your startup's name will be remembered and spelled correctly when they get home. 

Branding and Marketing
Be creative. Your startup's name is one of the best branding and marketing tools you can have. You can use your name to describe what your website does as well as attract new users with a creative name (think of websites like FeedBurner and Disqus). 

Get the .com
Names such as del.icio.us are "cool" but not practical. Users won't want to type that into the address bar. If you have a great name, but the .com domain is taken, don't settle with a .net or any other domain. Users automatically think and add .com to a name. If they remembered your site's name that should be enough to get them to the website, they shouldn't have to remember the extension as well. 

Love it
Make sure you love your name, once you launch it gets much harder to change your name. But don't spend all your energy on naming your startup, having a name means nothing if you don't have a product to go along with it.