Saturday, May 30, 2009

Schemas and Elements

Schema: The information you want to collect.

Element: The information you have collected.

For example, imagine you have a box of fruit you want to organize into several different groups. How are you going to do it? By color? By size? By shape? By taste? The schema you decide to use will determine what fruit goes where in your piles.

Obviously, the way you want to organize your fruit will determine the information you want to collect and consider about your fruit. For example, if you're concerned with organizing fruit by the area of the world it's grown in, you don't care what color it is or if it has a citrus taste. All you care about is where it came from. The opposite is also true--if you just want to classify by size and color, you don't care if the fruit came from South America, Australia, Europe or Mars.

So, let's say you want to organize your fruit first by color, type, and then by size--your schema is color, type, and size. You conduct a survey to collect this information about each piece of fruit. There are large and small red apples. There are large and small green apples. There are large and small yellow apples. There is a group of medium size green pears, some large yellow bananas, and some small green bananas.

You might end up with a list of information that looks something like this:

apple, large, red
pear, medium, green
apple, small, red
apple, small, green
banana, large, yellow
apple, large, green
apple, large, yellow
banana, small, green
apple, small, yellow

So, in the schema of type, there are the elements of apple, pear, and banana. In the schema of size, there are the elements large, medium, and small. In the schema of color, there are the elements red, green, and yellow.

So, if you organized by color, you would get green, red, and yellow fruits in your piles. If you organized by type, you would get apples, bananas, and pears. If you organized by size, you would get large, medium, and small.

Now let's say you want to sell your piles of fruit online. You create a site and want to display your fruit using the schema. So you create lists of the schema and elements:

Type
-apple
-banana
-pear

Size
-Large
-Medium
-Small

Color
-red
-green
-yellow

So, if a potential buyer clicks on "red," they will get a list of large and small apples (as there are no red bananas or pears). If they click on the "large" element, a list of red, green, and yellow apples and bananas will come up (because there are no large pears).

0 comments:

Post a Comment