Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old February 28th, 2008, 08:38 AM
yukscck yukscck is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 2 yukscck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 39 sec
Reputation Power: 0
Storing HTML in the server or the database?

Hi, I'm a university student and currently developing a web-based system for my Final Year Project and I'm supposed to build an online mathematics learning system in C# with ASP.NET 2.0 technology (as provided by Ms Visual Studio 2005), with the MsSQL database system.

Well, basically what i am supposed to put up all the relevant learning materials up into my system. But to add more features, I've decided to enable the Admins to add/update the learning materials from time to time.
To do that, I've added a page for the Admin to add the materials, either by uploading the HTML into the server, or by manually keying into a HTML TextArea, then save it in the server.

The thing I'm concerned about is not how to perform this task. Instead, I'm more concerned about the system design issue here.
In my mind, I've come out with 2 possible methods in performing this task.
When the Admin uploads or keys in a new HTML file,

Method 1 - Create a new HTML file in one specific folder (namely Chapters) to store the HTML file, and at the same time, create a new record in my database (more specific, table Learning), where the column FileURL contains the URL to that HTML.

Method 2 - Store the entire HTML content (the entire HTML markup codes) into my database table Learning; Here, instead of having the column FileURL, I'll add a column Learning_Contents to store the HTML codes.

Now the question is: Which method is more effective to implement?

I'm here to seek advice and tips for such issue, as i wonder what is the standard method being used in other systems over the Net.
Thanks for the help in advance

Reply With Quote
  #2  
Old April 3rd, 2008, 12:23 PM
LKBrwn_DBA LKBrwn_DBA is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 294 LKBrwn_DBA User rank is Sergeant (500 - 2000 Reputation Level)LKBrwn_DBA User rank is Sergeant (500 - 2000 Reputation Level)LKBrwn_DBA User rank is Sergeant (500 - 2000 Reputation Level)LKBrwn_DBA User rank is Sergeant (500 - 2000 Reputation Level)LKBrwn_DBA User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 16 h 48 m 15 sec
Reputation Power: 9
Cool

Both methods are valid, except you may want to decide who maintains the documents; a) The application or b) The database.

If the application maintains the documents, you may end up with documents unknown to the database and or URL's in the database that point to non-existent documents.

On the other hand, with method 2 you will have a single self-contained document repository in the database.
__________________

Reply With Quote
  #3  
Old April 3rd, 2008, 02:49 PM
yukscck yukscck is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 2 yukscck User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 39 sec
Reputation Power: 0
Quote:
Originally Posted by LKBrwn_DBA
Both methods are valid, except you may want to decide who maintains the documents; a) The application or b) The database.

If the application maintains the documents, you may end up with documents unknown to the database and or URL's in the database that point to non-existent documents.

On the other hand, with method 2 you will have a single self-contained document repository in the database.


Hi, thanks for the reply! really appreciate it...

anyway, I've decided to store the html into my database... but instead of uploading the html into the database, i made it so that the user would have to type the learning contents into the TextArea, of course, with the support for BBCode...

Well what i thought was, it is to prevent the user adding contents that would ruin the flow and layout of the page, and not forget to mention, inserting "dangerous" codes into the html...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Storing HTML in the server or the database?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway