i'm working on a 'virtual catalog' project that requires building some kind of
'directory tree' inside a DB. There are stored 'categories' and 'items'. Each 'item'
has a number of attributes, different for each category.
here is an illustration that should explain it all:
base/
persons/
kids/
jim # name, surname, birth, mom_name, pap_name,
tim # sister_name, brother_name, ....
john #
grown_ups/
bob # name, surname, birth, salary, company,
rob # phone_no, fax_no, email, homepage, ...
books/
manuals/
linux # pages_no, authors, edition, cover_photo,
math # editure, pub_year, ....
geography #
dictionaries/
greek # terms_no, editure, editure, pub_year ...
latin #
arabic #
sf/
dune # pages_no, volumes, editure, author, pub_year
foundation # prizes, rating, ...
ubik #
computers/
workstations/
john's # owner, os, monitor, video, ram, ip, location,
mine # hdd, cpu, keyb, mouse, ...
his #
servers/
alpha # location, ip_list, os, ram, cpu, hdd, services
beta # ...
gamma #
ok, so I have all these different 'things' that should live together in the same eclectic catalog. I want to be able to do complex but still fast searching all around this db. The scalability range I would like to be somewhere near thousands of categories and thousands of unique items in each category.
how to organize it? As I see it at this moment there are two main solutions:
What would be the best database design for such a thing, keeping in mind that searching through this db should be as fast as possible? Also remember that attributes may differ a lot in number (and size).
The first solution I think it's crappy and wouldn't like to go on with it. The second is the one that I have already implemented and the results are pretty good until now, but I haven't yet had the time to build up some real stress test scenarios so I don't know for now what could happen when I would reach to 1K categories and 1K items in each category =)
heh, I haven't mentioned the DBMS because I wouldn't like to get some particular solutions optimised for xSQL or ySQL ;-) ... yet, ofc, notices regarding implementation flaws on i.e. mySQL or PostgreSQL or whatsoever are welcome
--
AltBlue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: database design issue: one big table vs hundred of smaller tables
by Ovid (Cardinal) on Nov 26, 2001 at 07:41 UTC | |
by AltBlue (Chaplain) on Nov 27, 2001 at 07:53 UTC | |
by mandog (Curate) on Nov 28, 2001 at 22:48 UTC | |
|
Re: database design issue: one big table vs hundred of smaller tables
by footpad (Abbot) on Nov 26, 2001 at 08:57 UTC | |
|
Re: database design issue: one big table vs hundred of smaller tables
by ask (Pilgrim) on Nov 26, 2001 at 07:04 UTC | |
|
Re: database design issue: one big table vs hundred of smaller tables
by Ryszard (Priest) on Nov 26, 2001 at 11:38 UTC | |
|
Re: database design issue: one big table vs hundred of smaller tables
by Zaxo (Archbishop) on Nov 26, 2001 at 08:09 UTC | |
|
Re: database design issue: (solved with Cascade)
by markjugg (Curate) on Nov 27, 2001 at 02:10 UTC | |
|
Re: database design issue: one big table vs hundred of smaller tables
by jepri (Parson) on Nov 27, 2001 at 06:41 UTC |