Is a database the best storage option for my web application?

After I made this question , I decided that it was better to store data on my own server. The data is in a table with 100-500 rows and 12 columns. I am a newbie programmer currently developing my first web application with JavaScript and PHP, and I am looking for the best solution to store and retrieve this data. I do not need to make complex queries, I just need to get each row of data based on the content in one of the columns.

I am considering a database for this purpose, however, since I have no experience with databases, I do not know if this is the best solution for my needs. When I receive the content, it really is in CSV format , so I don’t know if it’s better to just save it to my own server or save it to the database. Then, at the request of the client, I translated the data using PHP and sent it as JSON.

  • Is a database the best solution for my web application? Or should I stick with CSV files?
  • If a database is the best choice, could you give me a good tutorial, example, or book to get you started?

Thanks in advance.

+3
source share
6 answers

- . CSV , , . .

PHP, MySQL, .

, , google MySQL PHP, . PHP MySQL , .

+4

( , - ), CSV .

, , :

1) /

2) 2 , 5 , 15 ...

+1

, , csv . , google mysql, 5 , .

- Edit -

, PHP mysql, mysql_query PHP.NET

0

, webapp, script. CSV . , .

0

, . , . , , , . , CSV ( , ), , . .

, script .CSV . . , CRON script, , .

, O'Riley - . - . PHP MySQL . , , xamp, Apache/PHP/MySQL .

0

I would use a SQLite database. This is the intermediate between the CSV file and MySql. SQLite does not require a server process to run on your computer. Nothing to install. The SQLite database is a single file, and you can save it wherever you want. Use PDO, or if you are using 5.3, use the new SQLite3 extension. DO NOT use the sqlite extension, it will create old SQLite2 databases. SQlite2 is now deprecated. Oh yes, a tutorial using PDO: http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html

0
source

Source: https://habr.com/ru/post/1787721/


All Articles