Simple database question: tags
andre at andregarzia.com
Fri Jun 8 10:25:19 CDT 2007
google uses a filesystem... yes, that's no relational database. It's
not like GoogleSQL it's more like GoogleFS.
First try to learn basics of SQL, you can go to W3Schools Learn SQL
page <http://www.w3schools.com/sql/default.asp> then you can try using
RevSQL or Valentina to play with SQL commands.
What I do in your case was to have three tables
Table 1: the data.
In this table I'd hold the data, the real data, like in case of reddit
or delicious is the URL.
Table 2: the keywords
In this table I hold metadata, one entry per keyword, all unique.
Table 3: relationship between table 1 and 2.
This table just maps relationships between keywords and data, this
allows me to have a many-to-many relations where I can map a single
keyword like 'oranges' to many items such as all the products that are
orange-like and to map one product like 'maltese orange' to various
keywords such as 'make-nice-soft-drink', 'orange',
I am by no means a DB pro or something like that, but that's the
pattern I'd use to hold data and metadata that are so generic that I
know nothing about them besides the fact that they might be related to
each other. If you know beforehand the keywords and can group them in
families or group your data in sets then you probably have a better
schema than mine that would speed your searches and use less records.
On 6/8/07, william humphrey <shoreagent at gmail.com> wrote:
> You are asking an interesting question. There is lots of information
> on database design (which includes schema) but the type of database
> design you want is more like what they do on the big search engines.
> When google indexes everything and builds a table of keywords -- I
> don't even know what they use...
> Does anyone?
> On 6/7/07, David Bovill <david at openpartnership.net> wrote:
> > Going to have a go at knocking up a database for RevCode handlers - and I
> > want to create a database schema for it. I know I want del.icio.us style
> > tagging, and I'll be indexing them with the language terms used as well as
> > keywords such as "html", "array", "outline" or "view" etc I'm thinking I
> > need a database as I know I'll want to experiment a lot with searches -
> > particularly for handlers with the highest hits... and that seems a bit
> > hairy to do with arrays and memory based indexes?
> > So the question is - is there a resource anyone knows of for database
> > schema's - a sort of design pattern thing for databases for people like me
> > that know a little but not enough to design one except by trial and error?
> > Say for folksonomy tagging for a starter?
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode