Database is used to store and maintain data. Based on stored data generate report, perform actions, etc.
You can also use it to manage the collection of related files. For this, you can either create a new table or update the existing table to store file information.
In this post, I will show you how to upload file and store to PostgreSQL database with PHP.