Saturday 9 March 2019

What STWL stands for? And FAS or DER? Abbreviation table.

Aviation domain has countless number of abbreviations and acronyms that are used in publications such as NOTAMs or charts.
To make life a bit (or rather much) easier it is a good idea to create a table with abbreviations, which will contain as many as possible abbreviations, acronyms and their meanings for quick reference if we work with aviation content.

In further development of this issue I will make following assumption: I want to be able to get meaning of abbreviation/acronym based on:
  1. abbreviation, acronym (it is quite obvious)
  2. abbreviation, acronym for particular country  
The 1 (1.) case does not need any comment. For the second one, 'for the particular country' I mean,  that I am able to search for meaning of given abbreviation additionally by entering for what country I am interested in. AIP has part GEN 2.2:  Abbreviations - and this chapter will be the main source for abbreviations by country in our table. Most of the abbreviation you can find in this chapter is compliant with ICAO Doc 8400, which my lead for redundancy of data.

Table abbreviation is cerated with following DDL statement:


CREATE TABLE abbreviation (
 rec_id serial PRIMARY KEY,
 abbr_source varchar(50) NOT NULL,
 abbr varchar(10) NOT NULL,
 meaning varchar(500) NOT NULL
);

Where abbr_source column indicates the source of the abbreviation, e. g. EP AIP, ICAO DOC 8400

The next step is to prepare CSV file with abbrevaitons an their meaning. There are many ways to do this: form manual writing acronyms into CSV file, spreadsheet or writing parser in Python which will do this for for us if we have acronyms in many pdf file and we don't want to transfrom this data into tabular form manually.
Once we have CSV file with header that corresponds to columns in abbreviation table, we can use following statement to import data into table:


COPY abbreviation(source, abbr, meaning) 
FROM 'C:\abbreviations.csv' DELIMITER ';' CSV HEADER;

No comments:

Post a Comment