Thread: Documents Database - HELP

Documents Database - HELP

From
"Christo Romberg"
Date:
Hi!

I'm interested in creating a document database for my personal documents. I use different operating systems (UNIX/Linux, Windows XP). Using PostgreSQL, Apache HTTP Server, and PHP I could create a cross-platform solution.
I'm a newbie to PostgreSQL, web servers, and PHP and would really need some help and guidelines for getting this done. That's why I'm writing You brilliant guys this e-mail =)!

HERE ARE THE DESIRED FEATURES:
The document database (with the files) would mainly be based on an external hard drive. I have two computers that would be the "clients", and the external harddrive would be the "server". I'd like to store the files in the filesystem on the external drive, and therefore be able to edit the content of the files.
I'd like to access and manage the files through a web interface. When I'd connect
the hard drive through an USB-port, the "frontpage" would appear in one of
the "clients" web browsers.
To add new records/files to the documents database, I would use different forms depending on the information type (not the extension of the file) of the document.
A very important feature would also be to browse the content of the database (the files). I  would like to use the values from a category coulmn from within the database. to view the files in an hierarchical tree.
The database would also have to be capable of deleting records from the database. When you'd delete a record you could choose to also delete the file in the filesystem. Updating a record would in the future also be neccessary.
A search function would be necessery in the nearest future, with the ability to search in different fields.

TECHNLOGIES AND SOFTWARE:
First off, what software and technologies would I need? I already know that
I would want to use the PostgreSQL database to store information/metadata about the files in different fields.
I´ve heard that you can store the PATH to a file in the filesystem with PostgreSQL. Does anyone know how it can be done (eg. what data type to use)? . I would also like to be able to create different metadata schemas/tables to classify different documents. When adding a new record (document) to the database you could choose which one to use.
I would probably need a web server of some kind. I've tested the
Apache HTTP Server, and it seems very good.
I'd probably need the PHP language to write the pages and letting the user (me) to create, view, modify, delete etc. records in the database.
Would I need something else?


Any guidelines and help would be very much appreciatet. Perhaps some example scripts..
Those of you who have any suggestions or ideas, please reply!

THANKS FOR READING THIS!!!

BEST Regards,
Christo

PS. Sorry for my bad english:-P

Re: Documents Database - HELP

From
Sean Davis
Date:


On 6/21/06 10:51 AM, "Christo Romberg" <coromberg@gmail.com> wrote:

> I'm interested in creating a document database for my personal documents. I
> use different operating systems (UNIX/Linux, Windows XP). Using PostgreSQL,
> Apache HTTP Server, and PHP I could create a cross-platform solution.
> I'm a newbie to PostgreSQL, web servers, and PHP and would really need some
> help and guidelines for getting this done.
>
> HERE ARE THE DESIRED FEATURES:
> The document database (with the files) would mainly be based on an external
> hard drive. I have two computers that would be the "clients", and the
> external harddrive would be the "server". I'd like to store the files in the
> filesystem on the external drive, and therefore be able to edit the content
> of the files.
> I'd like to access and manage the files through a web interface. When I'd
> connect
> the hard drive through an USB-port, the "frontpage" would appear in one of
> the "clients" web browsers.

An external hard disk will not run software.  That has to run on a computer.

> To add new records/files to the documents database, I would use different
> forms depending on the information type (not the extension of the file) of
> the document.
> A very important feature would also be to browse the content of the database
> (the files). I  would like to use the values from a category coulmn from
> within the database. to view the files in an hierarchical tree.
> The database would also have to be capable of deleting records from the
> database. When you'd delete a record you could choose to also delete the
> file in the filesystem. Updating a record would in the future also be
> neccessary.
> A search function would be necessery in the nearest future, with the ability
> to search in different fields.

You will have to design your database to allow you to search what you want.

> TECHNLOGIES AND SOFTWARE:
> First off, what software and technologies would I need? I already know that
> I would want to use the PostgreSQL database to store information/metadata
> about the files in different fields.
> I´ve heard that you can store the PATH to a file in the filesystem with
> PostgreSQL. Does anyone know how it can be done (eg. what data type to use)?

Store as a simple text field if you are simply storing the URI.

> . I would also like to be able to create different metadata schemas/tables
> to classify different documents. When adding a new record (document) to the
> database you could choose which one to use.
> I would probably need a web server of some kind. I've tested the
> Apache HTTP Server, and it seems very good.

> I'd probably need the PHP language to write the pages and letting the user
> (me) to create, view, modify, delete etc. records in the database.
> Would I need something else?

This is really non-trivial.

> Any guidelines and help would be very much appreciatet. Perhaps some example
> scripts..

What you are describing is actually a fairly involved project--scripts
aren't going to do it here.  If you haven't used PHP, postgres, or apache
before, I think you will probably have some serious learning to do before
you can accomplish your task.  There are numerous books out there on
building database-backed web applications using php.  Pick one up and learn
from it.


Re: Documents Database - HELP

From
John DeSoi
Date:
On Jun 21, 2006, at 10:51 AM, Christo Romberg wrote:

> I'm interested in creating a document database for my personal
> documents. I use different operating systems (UNIX/Linux, Windows
> XP). Using PostgreSQL, Apache HTTP Server, and PHP I could create a
> cross-platform solution.
> I'm a newbie to PostgreSQL, web servers, and PHP and would really
> need some help and guidelines for getting this done. That's why I'm
> writing You brilliant guys this e-mail =)!

I hope you have a few spare years to write this from scratch :).

Here are two possible routes to getting this accomplished in a timely
fashion:

1. Use a content management system. For example, I like Drupal
(http://drupal.org) which already has a module for uploading and
managing files. It is written in PHP and supports PostgreSQL. Once
you have it installed and going you can write your own module to
extend the capabilities for any additional features you need.

2. Look into WebDAV (http://en.wikipedia.org/wiki/WebDAV, http://
www.webdav.org/). It uses HTTP to present an interface that works
like a file system. There are clients on every operating system that
allow you to remotely manage documents as if it was just another
network drive.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL