Table: dbo.Elf_File
Holds Electronic file records. These records are stored outside the database and also transmitted to the Connect server.
Columns
Name | Type | Constraints | Description
elf_file_KEY | int (4) | NOT NULL | Key for the elf file
client_KEY | int (4) | NOT NULL | The client id for this client record
period_end_date | smalldatetime (4) | NOT NULL | Period end date for the file.
payment_date | smalldatetime (4) |  | Payment date for the file format.
form_data_xml | nvarchar (-1) |  | The column descriptor for the form data xml column.
tax_form_KEY | int (4) | NOT NULL | Foreign key to the tax form this file is for.
file_name | nvarchar (200) | NOT NULL | The external file name that is used by Connect and returned in the acknowledgement data stream. Empty filename means that the record was created before this column was added.
filing_number | int (4) |  | Filing Number - nth number of return for 1099 MISC and NEC and for others forms value is NULL
federal_tin | nvarchar (22) | NOT NULL | The Federal TIN or SSN for the Client at the time the electronic file was generated.
account_number | nvarchar (-1) | NOT NULL | The Account number at the time the electronic file was generated.
is_corrected | bit (1) | NOT NULL | 1 when the file is a corrected 1099 file, 0 otherwise

Primary key
Name | Columns | Description
PK_Elf_File | elf_file_KEY |
Unique constraints
Name | Columns | Description
UK_Elf_File$client_KEY$period_end_date$tax_form_KEY$filing_number | client_KEY, period_end_date, tax_form_KEY, filing_number |

Foreign keys
Name | Columns | Referenced table | Description
FK_Elf_File__Client__client_KEY | client_KEY | Client (client_KEY) |
FK_Elf_File__Tax_Form__tax_form_KEY | tax_form_KEY | Tax_Form (tax_form_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Elf_Transmission__Elf_File__elf_file_KEY | elf_file_KEY | Elf_Transmission |
FK_Payable_Transaction_N_Elf_File__Elf_File__elf_file_KEY | elf_file_KEY | Payable_Transaction_N_Elf_File |