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:
- abbreviation, acronym (it is quite obvious)
- abbreviation, acronym for particular country
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