Great texts in database or just a path to a txt file (Mysql) [closed]

0

My question is this: Is it better to put huge amounts of text in a database or create a code that works with a txt? (open / save / modify)

I've already said code in PhP and I've been using this to prevent the database from getting too large with content that can be allocated elsewhere.

And hit the doubt if this is a good practice.

    
asked by anonymous 15.07.2014 / 15:26

2 answers

1

It will depend a lot on what you need to do. A database can offer various services that can be useful, such as indexing the contents of the file, synchronized backup with the other data of your application, access control / change and independence in relation to the path / filename. If none of this is important to you, you can leave it out of the database that, in my opinion, facilitates development.

(One comment only: SharePoint, one of Microsoft's great products, stores all documents in the database by default.)

    
15.07.2014 / 15:46
0

If it is a good practice it will depend on the structure of your application, for example, if you need to search for content within these texts, which will be tricky for you to do, only with the path of the files.

You can evaluate a database as MongoDB (or other NoSQL Database) to store this information, since it handles this kind of data very well in absurd quantities.

    
15.07.2014 / 15:29