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 7519549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:55:23+00:00 2026-05-30T01:55:23+00:00

First Some Background I’m planning out the architecture for a new PHP web application

  • 0

First Some Background

I’m planning out the architecture for a new PHP web application and trying to make it as easy as possible to install. As such, I don’t care what web server the end user is running so long as they have access to PHP (setting my requirement at PHP5).

But the app will need some kind of database support. Rather than working with MySQL, I decided to go with an embedded solution. A few friends recommended SQLite – and I might still go that direction – but I’m hesitant since it needs additional modules in PHP to work.

Remember, the aim is easy of installation … most lay users won’t know what PHP modules their server has or even how to find their php.ini file, let alone enable additional tools.

My Current Objective

So my current leaning is to go with a filesystem-based data store. The "database" would be a folder, each "table" would be a specific subfolder, and each "row" would be a file within that subfolder. For example:

/public_html
    /application
        /database
            /table
                1.data
                2.data
            /table2
                1.data
                2.data

There would be other files in the database as well to define schema requirements, relationships, etc. But this is the basic structure I’m leaning towards.

I’ve been pretty happy with the way Microsoft built their Open Office XML file format (.docx/.xlsx/etc). Each file is really a ZIP archive of a set of XML files that define the document.

It’s clean, easy to parse, and easy to understand.

I’d like to actually set up my directory structure so that /database is really a ZIP archive that resides on the server – a single, portable file.

But as the data store grows in size, won’t this begin to affect performance on the server? Will PHP need to read the entire archive in to memory to extract it and read its composite files?

What alternatives could I use to implement this kind of file structure but still make it as portable as possible?

  • 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-30T01:55:24+00:00Added an answer on May 30, 2026 at 1:55 am

    Sqlite is enabled by default since PHP5 so most all PHP5 users should have it.

    I think there will be tons of problems with the zip approach, for example adding a file to a relatively large zip archive is very time consuming. I think there will be horrible concurrency and locking issues.

    Reading zip files requires a php extension anyway, unless you went with a pure PHP solution. The downside is most php solutions WILL want to read the whole zip into memory, and will also be way slower than something that is written in C and compiled like the zip extension in PHP.

    I’d choose another approach, or make SQLite/MySQL a requirement. If you use PDO for PHP, then you can allow the user to choose SQLite or MySQL and your code is no different as far as issuing queries. I think 99%+ of webhosts out there support MySQL anyway.

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

Sidebar

Related Questions

First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
First some background: I'm working on an application and I'm trying to follow MVVM
First, some background: I'm developing a web application using Python. All of my (text)
First some background, we are creating a new eGov application. Eventually, a citizen can
First some background, I am currently working on a relatively large Asp.Net MVC application
First some brief background: I have an existing ASP.NET MVC 1 application using Entity
First some background information: We have three environments for our EJB3 application: test, development
First some background on the application. I have an application processing many independent tasks
First, some background: I am trying to implement a master-detail interface in Cocoa (for
First, let me start with some background: I have a web service which accepts

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.