# Databases & CSV/TSV Files

Yate supports the creation and usage of databases in CSV/TSV files. Databases have different capabilities depending on how they are created and what fields they contain. The following variants exist:

> Album Databases
>   Each row in the database represents a unique album. The values are associated with Yate fields which have been accumulated from tracks in the same album. The value for any given field is the unique value across all tracks in the album. If the value is not unique it is represented as ???. You can also place special fields in the database which are constructed by evaluating the information in an album. An Album Database must contain an Album and a Folder Path column. These databases can interact with tracks open in the main window. Not all columns can be edited.
> Track Databases
>   Each row in the database represents a unique track. The values represented are the values associated with Yate fields. A Track Database must contain an File Path column. These databases can interact with tracks open in the main window. Not all columns can be edited.
> Standalone Databases
>   These databases can contain any information. They cannot interact with tracks open in the main window. All columns can be edited and rows can be manually created.

Databases are stored in delimiter separated values files which are one of CSV (Comma Separated Values) files or TSV (Tab Separated Values) files. These files can be opened by a large variety of files on most platforms. One of the benefits of album databases is that you can store them on your portable devices. There are viewer apps for iOS and Android.

When creating a database, Yate will also create a sidecar file of the same name with a plist filename extension. These plist files describe the association between CSV/TSV files and Yate fields. They also maintain various options for Yate's Database Viewer.

There are three components to the Database support.

Export Sets are created and maintained in the Preferences window. An export set describes the fields to be included in a Yate created Database, including the special fields.

The Create Album Database action function is used to create an album database. You can create an album database running an action against the current list of files or in a batch process where you can create a database for your entire collection. Similarly the Create Track Database action function is used to create a track database.

The Database Viewer is where you view album and track databases and interact with files in the main file list. You open album and track databases via the File>Open menu item. These databases can also be opened by dragging a .csv, .tsv or .tab file from the Finder to the main Yate window file area. While designed to interact with Yate Databases, the Database Viewer can open any CSV or TSV file as long as it has a column header at the start of the file.

Album databases which have a Yate Album ID field have a stronger reference to the referenced albums than databases which do not. This field can be set by the Database ID action statement.

Track databases which have a Yate Track ID field have a stronger reference to the referenced tracks than databases which do not. This field can be set by the Database ID action statement.

You can always change a Track or Album database to be Standalone via the context menu. Depending on the fields in the file and their encoding in the sidecar file, you may be able to change a Standalone database to be a Track or Album database. Warning: Standalone databases have no restrictions on editing fields. Any data can be placed into any field. Be careful when changing from a Standalone database to a Track or Album database.

Additional Information

Database Viewer

Query Databases

Export Sets

Database ID action statement