only for RuBoard - do not distribute or recompile Previous Section Next Section

Using Metadata

We have already decided that each story record comprises a headline, story text, and an image. However there's no reason we can't store other data in the same record.

Our system will automatically insert values for who created the story and when it was last modified. These can be automatically displayed at the bottom of a story to sign and timestamp it without the author needing to worry about adding the information.

It might also be useful to add data that is not displayed, known as metadata. A good example of this is to store keywords that would be used for the search engine index.

Rather than scan the entire text of every story, the search engine will look at the keyword metadata for each story and determine relevance solely from that. This allows the site administrator to have total control over which search words and phrases match which documents.

In our example, we will allow any number of keywords to be associated with a story, and assign each keyword a weight value to indicate how relevant that keyword is on a scale from 1 to 10.

We can then develop a search engine algorithm that ranks matches according to this human-specified relevance for stories, rather than a complex algorithm that has to interpret English prose and make decisions based on its limited understanding and governed by fixed rules.

This isn't to say that you have to store metadata in the database. There's nothing to stop you from using the <META> tag in HTML, or even using XML to build your documents. However it's worth taking advantage of the database that is already looking after your documents whenever you can.

only for RuBoard - do not distribute or recompile Previous Section Next Section