473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CMS > Files

Hello,

I am creating a simple CMS for a web site.

The web site will hold many documents and for that I created Documents
table which holds information on each document such as:

Title, Description, Author, Url, ...

I would need to create the following functionalities:

1. Create a document and upload its file

2. Edit a document information and maybe change the file associated
with it.

3. Delete a document record (info) and the file associated to it.

How should I do this?

Should I separate the create a document and upload a document (file)?

Maybe I should have a table with all files and every time I upload a
file I would add a record to that table.

And then when I create a document I would insert its information and
select one of the uploaded files.

Anyway, what is usually the best way to do this?

I think that having everything integrating would be better but I am
not sure the way to go.

Thanks,

Miguel

Feb 22 '07 #1
2 1385
On Feb 22, 3:23 am, "shapper" <mdmo...@gmail.comwrote:
Hello,

I am creating a simple CMS for a web site.

The web site will hold many documents and for that I created Documents
table which holds information on each document such as:

Title, Description, Author, Url, ...

I would need to create the following functionalities:

1. Create a document and upload its file

2. Edit a document information and maybe change the file associated
with it.

3. Delete a document record (info) and the file associated to it.

How should I do this?

Should I separate the create a document and upload a document (file)?

Maybe I should have a table with all files and every time I upload a
file I would add a record to that table.

And then when I create a document I would insert its information and
select one of the uploaded files.

Anyway, what is usually the best way to do this?

I think that having everything integrating would be better but I am
not sure the way to go.

Thanks,

Miguel
I would suggest a "table" way

Feb 22 '07 #2
"shapper" wrote ...
Should I separate the create a document and upload a document (file)?
I wrote a document management application for work, the approach I took was
that you create a "virtual" document in your database, storing an id, title,
publication date, review date, obsolete date, owner, etc etc, and then you
upload the file. I saved the file to our storage area with a unique id from
the database (from the files table), for example 1.doc, 2.pdf etc etc,the
database ties the files to the documents. With this approach, if you wanted
to give a URL to a document you could ensure that they always received the
most recent version of the document with having to change the URL for
example: download.aspx?docid=nnn, when this is requested it can then look up
the most recently attached file. As you upload each new file (version) you
just flag it as the most recent version and shuffle the others down
effectively.

To answer your numbers questions..

1. As above

2. I gave the ability to display a form which also had the "Browse" file
select box, but if they didn't choose a file it was the determined that they
were just updating the virtual document details, for example updating the
owner, or publication date, or a typo, but there was no need to add another
file. If they did add another file then it assumed a new version and would
shuffle the others down accordingly...

3. I chose to never delete anything, we flag the virtual documents/files
as deleted in the database and dont return them in the search results, but
we never delete the data or files, I work for the NHS (National Health
Service/UK) - and there maybe a legal reason why we may need to produce a
document in the future etc.
Maybe I should have a table with all files and every time I upload a
file I would add a record to that table.
Thats what I did..
And then when I create a document I would insert its information and
select one of the uploaded files.
Yep..
Anyway, what is usually the best way to do this?
Thats worked for us for the last 4 years, currently have around 5000+
documents stored, user base in the thousands...

Regards

Rob
Feb 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brett Jungblut | last post by:
I need to be able to access (read and write) an older database (still in production use) that uses dbf files (clipper-style). The php manual says not to use the dbf functions for a production...
3
by: Gene Ellis | last post by:
Hey everyone, I have a simple task. I want to take an XML file, pull out the elements in it, format them, and then send an html email based on it. What are the necessary steps? Any suggestions?...
4
by: fis | last post by:
Hi all, I've problem because there are needed break lines in my texts on the web site but i can't do it :( My pipeline looks like: XMS -> I18N -> XSLT -> HTML I have lot of texts in my...
7
by: Jose Cuthberto | last post by:
WRAPPER CODE FOR A SET OF HTML FILES, AND BUTTON BAR LOOKS LIKE BELOW: |< < <> > >| => <= O' (magnifying glass for small gif text) I have a number of isolated html files for a 1000 page...
11
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some...
5
by: Jay A. Moritz | last post by:
Error: The dependency '<my dll>' in project '<my project>' cannot be copied to the run directory because it would conflict with dependency '<my dll>'. I am getting a dependency error building...
5
by: Nathan Sokalski | last post by:
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/> <add tagPrefix="NATE"...
21
by: py_genetic | last post by:
Hello, I'm importing large text files of data using csv. I would like to add some more auto sensing abilities. I'm considing sampling the data file and doing some fuzzy logic scoring on the...
1
by: sebastien1101 | last post by:
I have to produce a new application using now Visual Studio 2005 & Sql server 2005 express Before with VS2003 i use the msde Boostraper to deploy my database.... What i have to do with sql...
5
by: Steven | last post by:
I have the following in my web.config: <system.web> <profile defaultProvider="MyASPSqlProfileProvider" enabled="true" > <properties> <add name="FirstName" defaultValue="" type="string"/> <add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.