Archive for the ‘Computing’ Category

Thinking About Thinking: Relational Databases and You (You being anybody)

May 25, 2009

Okay, first a bit of background information.

A relational database is a method computers use to organize information (based on the relational model). Information is organized into ‘Tables’ based on their content (each Table represents a single subject of information), and generally each piece of unique information is given a corresponding identifier called a ‘Primary Key’.

A quick example, number of days in a month:
Month        #Days
January        31
February    28 (29)
March        31
April        30
May        31
June        30
July        31
August        31
September    30
October        31
November    30
December    31

This table organizes the months and contains how many days are in each month.

Relational data is awesome. Its’ neat organizational structure allows for quick recall of detailed facts and sophisticated examinations of massive amounts of data – even when the data has to be calculated from scratch*.

Humans don’t naturally think in relational terms (well, not efficiently, and not usually by default, anyway) – but we can learn to do so, either by ourselves or by picking it up from other people.

It’s all about internally organizing the way you think in a couple different ways.

First, group up things you know into specific subjects in which each bit of information has a unique identifier.

To extend the earlier example, the subject there would be “Months of the (modern gregorian calendar) year”. Note all the implied information there is in “Months of the Year” – if you were to learn a different calendar than the modern gregorian calendar, you would have to specify that into two different subjects. Expect to reevaluate how you divide what you know into categories as you learn more about things, and thus you have to draw more distinctions between subjects in order to keep them well-organized in your head.

Now, for this, we need a unique identifier – in the case of our months, the names of the months should do just fine – each month has a different name from all the others (Another unique identifier for months could be the order in which each appears on the calendar). That unique identifier is the subject’s “Key”.

Note that the identifier doesn’t have to be the same as the subject: If you were to memorize each month based on their order rather than their names, the subject would still be months, even though you would think more like, “The first month in the year is named January” instead of “January is the first month in the year.” You could even use both as unique identifiers at the same time (and if you have to deal with the months of the year frequently enough, you probably do).

Second, group up as much information as you can into those subjects.

To extend the months example, you don’t have to just keep track of the months’ names and how many days there are in there. You could make it look more like:

Month        Order in Year    #Days    Season
January        1        31    Spring
February    2        28 (29)    Spring
March        3        31    Spring
April        4        30    Summmer
May        5        31    Summmer
June        6        30    Summmer
July        7        31    Fall
August        8        31    Fall
September    9        30    Fall
October        10        31    Winter
November    11        30    Winter
December    12        31    Winter

Third, well, from there it’s all a matter of how you think.

When you learn new information, restate it to yourself in a matter consistent with how you’re storing information (“January is a Month. January is the first month of the year. January has 31 days. January is in Spring.”)

When you recall information, try to access it by asking yourself questions that access data based on however you stored it. So if someone asks, “What’s the month after March?” and you don’t have that bit of information memorized, you can break it down into: “Which month is March? (Third)” followed by “What’s the fourth month? (April)”

Of course, this might not work for everyone. This is just something I do to organize information I learn, and it doesn’t work out badly. On the other hand, you might already do this sort of thing subconsciously.

Mind also that there are tons of other ways to store and recall information, some of which work better than this sometimes (like a catchy rhyme for learning a one-off fact, for instance). It’s one of the awesome features of the brain that we can employ multiple different setups to be able to store and recall information.

*-Describing in-depth the power of the relational data structure is well beyond the scope of this article – this article’s just about touching upon the ideas involved, not going into full depth on them.