DB file stands for database file.A database file is a file which contains all data relevant to your program stored in a form of table containing rows and columns just like MS Excel spreadsheets or Google Sheets.Generally database files are used to store data to keep quering and using data for different tasks and purposes.
CSV file stands for comma-separated values which is a method used to separate one field with another with the help of comma(,).This file is also used to store data but in a different format just same as MS Excel file.In .CSV file every field is separated with a comma(,) within a row and with columns of required fields.CSV files can directly be open with any spreadsheet or CSV editor for e.g MS Excel or Google Sheets.