dbpack-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dbpack-devel] Re: browsing


From: harrold
Subject: [Dbpack-devel] Re: browsing
Date: Tue, 18 Jun 2002 20:33:55 -0400 (EDT)

Sometime in June Joe Hurdle assaulted keyboard and produced...

|No, I should just look at the documentation/source and
|
|figure it out from there.  I'll need to look
|thought before I can make more suggestions.
|

i don't know if you would be able to extract the relations from the source.
i'll give you an overview here. feel free to check out the source though. i
just don't know how coherent it will be to someone who hasn't written it.


there are three tables in the database to consider:

table          primary key      description
-----------------------------------------------------------------------
fs_files       file_id          contains metadata about files
fs_lists       list_id          textual descriptions about lists that are owned 
by users
fs_membership                   many to many relationship between files and 
lists
                                

the membership table has two columns. the first is file_id and the second
is list_id. this is how i'm constructing the many to many relationship. 


ok list names are `special' (said with a churchlady voice). and the list's
owned by the admin user (user_id=1) are 'extra special'. see only the admin
user can edit the admin lists but they will visible to all users via the
directory.

see the lists are words separated by '::'. so if you look now there is a
list: EB::asimov_isaac. the scripts are using the '::' to determine the
hiarchy. the first set of text 'EB' represents a directory in the root and
the second set of text 'asimov_isaac' represents a sub directory of 'EB'.
in fact all lists beginning with 'EB' and owned by the admin user can be
found beneith the 'EB' level. you can see this when you go here:

http://gimpboy.homeip.net:81/~db/test/fs_files.pl?pg_opt=search&dir=EB

after you login of course.

now the code to generate this is pretty messy. i threw it together this
weekend, and havent had a chance to clean it up. 

let me know if there is a better way to store these data structures. i also
have an idea to have special root subdirectories. for example i've been
thinking i would have one called personal and beneith it i do the same
thing but using the lists owned by the currently logged in user. this way
i could have:

personal::images::midget
personal::images::ballgag
etc. 

and these lists would only be visible for me if i'm logged in. this would
also give users the ability to organize files in a way that made sense.

if you want to take a look at the code a nightly snapshot can be found
here:
http://gimpboy.homeip.net:81/~db/dbpack-snapshot.tar.gz
-- 
john harrold               | If I were a carpenter I'd             
                           | Hammer on my piglet, I'd
/"\                        | Collect the seven dollars and I'd
\ / ASCII ribbon campaign  | Buy a big prosthetic forehead
 X  against HTML mail      | And wear it on my real head -tmbg
/ \                        | address@hidden











reply via email to

[Prev in Thread] Current Thread [Next in Thread]