Jump to content

Advice on suitable database use.


pepsi_max2k

Recommended Posts

Hey all, I'm new to database useage and wondering what type I should be using to store some data. I'm grabbing the data via php, so will be writing it via php, and reading it and outputting it with php too.

 

I'm trying to keep a record of prices of some items, and want to include for each item:

 

EAN (like UPC), product name, genre, maybe a few other things

Date (probably weekly), price (for that week).

date, price

date, price

etc etc.

 

As well as writing data to these entries automatically, I want to be able to read all entries and output data in an organised format.

Eg. One web page could show a list of all product names, ordered alphabetically, and showing the latest price. Clicking on a link for one product could show all data for that product.

 

Any ideas what the best way to store the data would be? MySQL seems a bit complicated. CSV files are simple but would I have a single csv file for each product, or just one ever growing file with all products in it? And if I had multiple product csv files in a single directory, what would be the best way to name each file (by ean? 0001?), and would it be simple to go through all files printing out stuff as above (eg. just product name and a price)? Thanks.

Link to comment
Share on other sites

Go with database. You will need to learn more at first, but it will pay off later. Storing data in txt files can work for small data sets, but forget about data analysis, reports, etc... And with growing number of items it will become unwieldy very fast.

Link to comment
Share on other sites

Thanks, I just read up on some simple MySQL database coding and it seems ok. I'm just worried about the constant adding of new dates and prices to each record. Is there a certain way of doing that? Right now I've just seen info on creating a set number of fields at the start, then adding single entries to each field.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.