|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 ![]() |
|
#2
|
|||
|
|||
|
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. ![]()
__________________
|
|
#3
|
|||
|
|||
|
Quote:
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... |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Storing HTML in the server or the database? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|