Database design ?
Date: Thu, 18 Oct 2001 08:06:52 +0200
Message-ID: <9qlr5n$q9i$1_at_wanadoo.fr>
hi there !
I got a database to design for a friend of mine and I'm not sure which course to take :
Structure of database :
I have 3 categories : movies, books, painting.
Each catagory has its own tables :
movies : black/white ; color
books : fictions ; history
painting : religious ; pagan
and so on...
Each table has its own set of fields which are not used in the other
sub-catgories (size is useful for paintings but not for books)
Goal :
Each entry in each table has its own set of words to be looked for in the
search engine.
The user type in his word (unique no 'and' statemetn for now) and the engine
must give him all the results sorted by category, table.
How :
A
I stock all the tables in an index table like this : Name of base | Name of table
And the engine looks in the first table of the first base then the second table (until numebr of tables reached) then the second base first table ETC : long, tedious, bad performance my guess is : wrong method ! :)
B
I create a base which serves as an index :
all the searchable words are stocked thus :
Name of base|name of table|ID|words.
When taking the results, I take the ID table and base and fetch all the
required info where it is.
The problem with this solution is that I put all the words either :
in two bases (index and its table) : pointless to repeat data
In one base (index) and i split the words in another table : a pain to fill
the base ('cause it has to be done manually)
My Question is :
Does someone who have a better idea 'cause i'm new in designing databases
and moreover I'm self-taught so I tend to commit blunders :)
Thankx for reading that far anyway :) Received on Thu Oct 18 2001 - 08:06:52 CEST