advantages of organizing data storage as separate files and organizing data storage using a database approach?

Discuss the advantages of organizing data storage as separate files and organizing data storage using a database approach? Which do you think is favorable and why?

These are two different approaches to organize data so that it can be accessed in the case of its requirement. When data is organized in the form of separate files, the data is stored in different layers and it is a flexible way to distinguish between these layers. Different files are identified in unique form.

In case of data organized in database form, data stored in the form of different files is indexed and accessed with the help of different identifiers. Each file is stored against a unique identifier in the database.

I think that data organized in the form of database approach is favorable because it can store data in a hierarchical structure. This data will be easily managed e.g. easily sorted and searched.