it's not in the scope of VFS but I plan on making it, I don't know if
I will release it, or where.

but step by step, I'm now think about a table model

I can do something like

CREATE TABLE Files (
 path VARCHAR(200) NOT NULL,
 type VARCHAR(50) NULL,
 meta VARCHAR(50) NULL,
 lastModified TIMESTAMP NOT NULL,
 content LONGBLOB NULL, 
 PRIMARY KEY path
);

(if the blob is null, it's a directory)

or, I could make a table containing file entries and one with contents
and one with parent/child coupels for the directories

or, I can prepare for the worst and implement spanning, splitting up
the files in chuncks,  numbering them,....   (might be a good idea)
CREATE TABLE Files (
 name CHAR(32) NOT NULL,  //not too short?
file BOOL NOT NULL, 
type VARCHAR(50) NULL,
 meta VARCHAR(50) NULL,
 PRIMARY KEY (name)
);

CREATE TABLE Directories
{
 name CHAR(32) NOT NULL,
 child CHAR(32) NOT NULL,
}

CREATE TABLE Content
{
 name CHAR(32) NOT NULL,
 number INT NOT NULL,
 content BLOB NOT NULL,
PRIMARY KEY (name,number)
}

(it's easy to add some constraint checking, so there can be no links
to unexisting files, but I don't see an evident SQL way to avoid loops
in the FS (so, I'll do that the java way or leave it out and call it a
feature)

I can also add a number of attribute fields, creation time,meta data fields,....


sugestions?

Wouter


PS, I'm studying now, so, mhh, perhaps I can run through my database
design textbook tomorrow

On Sun, 27 Mar 2005 17:18:41 +0200, Mario Ivankovits <[EMAIL PROTECTED]> wrote:
> Wouter De Borger wrote:
> >-storing files into databases, including some metadata
> >(the easy part)
> >
> Great!
> 
> >-representing tables as virtual files, thus files which can not be
> >accessed in a regular way, but their type indicadtes a handler class
> >that cast the FileObject to a TableObject and uses them.
> >
> Well, I think I got the point. There might be some thing which needs
> some discussion. E.g. what if the handler itself needs some library, do
> you plan to pack your handler into something like a war?
> And I am not sure if your handler shouldnt be a coder/decoder (aka
> codec), maybe someone might call it filetype converter. And then I am
> not sure if VFS is the right place for it.
> 
> I thought representing tables as virtual files should result in
> something like a xml file. VFS should only try to _transport_ the
> content, not interpreting it.
> 
> But since this is the second step of your project I will be happy to see
> the first integrated into VFS ;-)
> 
> ---
> Mario
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 

Gmail rules
---------------------------------------------------------------------
Wouter De Borger  
---------------------------------------------------------------------
if life was a joke of eternity, what would you do?
All I want is a kind word, a warm bed and unlimited power.
---------------------------------------------------------------------
www.nosoftwarepatents.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to