www.webdeveloper.com
Results 1 to 4 of 4

Thread: Using database other than MySQL?

  1. #1
    Join Date
    Nov 2013
    Posts
    4

    Using database other than MySQL?

    I'm new to web development and I'm making a very basic website that allows a user to input data in a PHP form into a database. There is only two webpages I need to do this for and theres only about 4 fields for each. So is there another way to store the data? It seems like MySQL is overkill for not a lot of data.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,222
    If you don't go with a database, then you're likely looking at some sort of text file (JSON, XML, CSV, etc.) that you read into your app, modify, and write back to the file. This can become problematic If more than one user is trying to make changes to that file, which then requires you to do some sort of file locking -- which can be done, but frankly I'd rather let a DBMS handle that sort of thing. Also consider whether or not the data requirements may scale up at some point in the foreseeable future.

    If in the end you still feel some sort of flat file solution is preferable, I'd personally probably go with a JSON format as easiest to work with in PHP. However, since I work with DB's every day that run from tables with 7 rows to 70,000,000 rows, I tend to think DB first and would tend to go that way with any data that will be used in a database-like way (inserts, updates, deletes, searches, sorts, etc.), since that's what they're made for, and will probably do it more efficiently than any file-based solution I cobble together.

    PS: And don't forget about SQLite as a sort of in-between solution -- though closer to the DBMS side than the flat file side of things.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Nov 2013
    Posts
    4
    Thanks, I just asked a friend whos a web developer and he suggested writing a PHP script to send the data to an email address. What I'm doing is getting input from users like name, email address, phone number, etc.

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,222
    Quote Originally Posted by atac57 View Post
    Thanks, I just asked a friend whos a web developer and he suggested writing a PHP script to send the data to an email address. What I'm doing is getting input from users like name, email address, phone number, etc.
    That's fine if all you really need is an email. However, if it means that you (or someone else) then has to copy/paste info from each received email into a spreadsheet, text file, or whatever, I'd rather take a wee bit of extra time up front to set up a database and let the software do the work for you. (It's that certain sort of laziness that makes a good programmer: you'd rather spend time writing code that helps prevent doing some simple, repetitive task. )
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles