Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7664401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:17:42+00:00 2026-05-31T14:17:42+00:00

Is it appropriate to store a web page in a Database? I am using

  • 0

Is it appropriate to store a web page in a Database?
I am using InnoDB engine of mysql, the email templates is a modified html files that is in mail format , so there should be a plain html file.

Notice that those templates are not accessible for everyone, they should refer to the userID, so for example, User A has template1 , 2 ,3.. but UserB may have template 2,3, 5, 6..

What datatype should i store this kind of file?

Or instead of using database, I should create a html file and use php to write in it and open a folder for each user?

Thank you for your help, I have less experience in handling this kind of data

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:17:44+00:00Added an answer on May 31, 2026 at 2:17 pm

    Usually, and for most project, the database is the bottleneck. So, if you can avoid to use it, then don’t use it.
    If the html is small (for example 10kb) then you can store in the database.
    However, if it is big (and requires BLOB or a big varchar), then save it in a file folder using the unique id of the registry, having caution about the number of templates that could exists. However, a backup of the system requires to also backup those files (instead of a single backup of the database).

    User A has template1 , 2 ,3.. but UserB may have template 2,3, 5, 6..

    It sound like

    Table User

    Id_User
    Name_User
    …

    Table Template

    Id_Template
    Name_Template
    Content_Template (if it is not managed by a file)
    ….

    Table UserxTemplate

    Id_User
    Id_Template

    Obtain the all templates by an user

     select * from User a,Template b,UserxTemplate c
     where c.id_user=a.id_user and   c.id_template=b.id_template and a.id_user=xxx
    

    In resume

    Store in the database

    Pro:

    • consistence.
    • easy to use

    Cons:

    • Performance hit
    • Increase of the size of the database.

    Store in a file

    Pro:

    • fast (only if the number of templates is not big)
    • “unlimited” size.

    Cons:

    • Inconsistence of the data.
    • Requires an extra work.
    • Securities issues.

    ps: WordPress and other portal and blog system (usually) store it inside the database, however LMS (Learning Management System) stores in a file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a web page that will display an appropriate user control
I am writing a web page that displays students grades in an old grade
When is it appropriate to store data in HttpContext.Current.Items[...] vs storing data in ViewData[...]
What's the most appropriate type used to store the duration time information of a
There is a website with a master-page, set of css-files,... menus. It is necessary
I've seen recommendations to store some or all php include files some place other
In our Pylons based web-app, we're creating a class that essentially provides some logging
I am looking for a standards-compliant way to store multi-language content for a Web
I have a sql database that stores some documents. A user can sign into
I see heavy use of store objects in the web app I am working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.