Getting data out of a table

Getting useful data out of a database table is a challenge that every novice developer struggles with; and quite frankly it is not only inexperienced developers who struggles with this concept, I have see many experienced developers struggle with queries that for some reason was return more information while other return insufficient information.

Now we will examine the structure of an SQL query or SELECT statement. These kind of statements are called “SELECT statements” because they start with the phrase “SELECT” to indicate that the user wants to retrieve information. The general format of the statement is:

SELECT column1, column2, column2
FROM table
WHERE column = condition;

The column list, specifies all columns that you are interested in and the WHERE conditions that each returned row must meet.

For more on SQL select statement, see SQL select queries


Beadwork pattern interpretation: A lost skill


Years ago, African bead work used to be a form of identity and communication. I joined a school cultural dancing group at age 7, we made our own costumes and bead work. One time we showed pictures of our costume to the village elders, one thing was clear from their expression…Not impressed at all…

As it turned out, our bead work did not say anything about our identity and neither did it communicate anything. “You see this one?” one lady pointed to the beaded bracelet and necklace she was wearing. “I got this one from my in-laws, you can tell from the patterns used that it is from a specific clan and based on the colors and patterns used, it can be interpreted into something meaningful” they continued to explain…

A year ago and far away from my own tribe, I had ended up at a Zulu cultural museum. The place was packed with all sorts of handmade baskets and bead work. The guide went on to explain how the baskets were made, what the patterns on them meant and all that stuff. Then she came to the beadwork section, “this is made by a Zulu clan that live just a few kilometers from here and that other collection over there is from a clan just east of here. People from here use different patterns…” she continued to explain.

Much of what was in the museum was pretty much the same as what I would normally see in my village in North-eastern Namibia. Excited by my new discovery, I called home and asked my folks if they can read bead patterns. It turns out that not many people have that kind of skills set anymore. Over a long conversation, they explained that by looking at the collection of bead work that the family has collected you can tell of the relationships that different clans have had over the years. Apparently as the clans started inter-marrying, the gifts they exchanged was sort of documentation and at some point if you knew how to read them you could trace back and reconstruct your family-tree.

Given that most of the history in that area is not documented, the inability to read the form of documentation that existed is probably the worst thing that could happen. Well… other than the economy of course…