SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast SТОRМ's Avatar
    Join Date
    Sep 2004
    Location
    Ukraine
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flat File Array Based Database

    Ehh... I was sitting here and writing some SQL stuff and then some stupid idea came to my mind: Why not to make a pseudo database that uses PHP arrays in a simple flat files. This should be a fast, secure and easy to use database. Fast becouse this are simple PHP files and we will use PHP functions to work with those arrays. Secure becouse again this are PHP files, so the <?php // some arrays here // ?> thing will not allow anybody to see them from the outside. And easy to use becouse we all know that arrays are very easy to work with. So I just wanted to write this thought to you guys, and see what you think about it, if it is stupid and I`m missing smth please let me know.

    Max.

  2. #2
    SitePoint Addict
    Join Date
    Nov 2004
    Location
    Ukraine
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well..
    It's depend to how you are going to use it.
    SQL are very powerfull when difficult data manipulation will be needed.
    Your idea will be good in some situation when your host don't support mysql (or other db).
    Or db may be encrypted. In other case mysql is much more suitable and usefull as for me.

  3. #3
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Quote Originally Posted by rightinpoint.com
    Your idea will be good in some situation when your host don't support mysql (or other db).
    It can also be useful if you only want a simple way to store your data.

    Yours, Erik.

  4. #4
    SitePoint Addict
    Join Date
    Nov 2004
    Location
    Ukraine
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do not store at the plain txt at such case?

  5. #5
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Quote Originally Posted by rightinpoint.com
    Why do not store at the plain txt at such case?
    Personally, I would have serialized my arrays using serialize() and then saved them in a plain textfile. I meant that it could be a good solution (the one pointed out in the first post) if you want to be able to quickly load the arrays without creating your own functions for that purpose (you can just include the file and you are good to go).

    Yours, Erik.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •