# Save As Database

The Save As Database function saves the displayed data for the visible files in the main window as a Comma Separated Value (CSV) file or alternately as a Tab Separated Value (TSV) file. All visible columns with the exception of the state column (green or red dot) and the Artwork, and Linked columns are processed. This differs from the Create Database function which creates columns based on a specified Export set.

The type of file written depends on the field delimiter setting: Comma or Tab. When Comma is selected, the produced file will have a .csv filename extension. When Tab is selected, the default filename extension will be .tsv. When Tab is selected, you can specify an alternate filename extension of .tab or .txt. Yate will not open .txt files. Note that when saving a database as a TSV file any field containing a newline character will be truncated.

Unless Write a header row is unchecked, Yate will output a line describing the names of the column headers. This option should always be selected if you are going to open the produced file in Yate.

Certain fields in Yate support multiple lines of text in the same field. You can handle these fields as: Unchanged, Truncate in which case only the first non blank line will be retained, or Use alternate delimiter in which case you can replace the line terminators with a delimiter. Note that not all readers of csv files will be able to handle the Unchanged case. If the field delimiter is set to Tab, Unchanged will be treated as Truncate.

If the field delimiter is set to Tab, tab characters in the data are changed to spaces.

Many fields in Yate support multiple items in the same field. You can handle these fields as: Unchanged in which case the current multi-field delimiter will appear in the text, Only Retain First Item in which case only the first item will be retained, or Use Alternate Delimiter in which case you can replace the default multi-field delimiter with another.

The Encoding option describes the encoding of the text being output to the file. Unless you have some dire need to save a file in a specific format, you should not change the default of UTF-8. When a CSV file is saved a lossy write is performed. Some of the available encodings may not be able to represent all of the contained data. Note: When a file is saved, the in-memory image of the data is not reloaded. If you change the character encoding you may not be seeing what was written to the file. When a file is read, if the OS cannot determine the encoding of the file, the specified encoding will be attempted.

The Line terminators option specifies how you want to terminate lines of text in the output file.

The created database file is always treated as a standalone database. ie. it will not allow interaction with open files in the main window. All fields will be editable in the Database Viewer.

You can elect to preserve the contents of an associated sidecar (plist) which might already exist. If the Preserve sidecar setting is enabled and a sidecar has exactly the same column layout as the database being created and the same standalone status, all configurable aspects will be preserved. If the donditions are not met, only visual settings will be preserved.