CalCOFI / workflows

helper scripts in R for common workflows
https://calcofi.io/workflows
MIT License
0 stars 0 forks source link

load areas of interest into single `aois` table using `hstore`, starting with `sanctuaries` #13

Open bbest opened 2 years ago

bbest commented 2 years ago

Use PostgreSQL hstore to store the many varying fields of any given AOI feature into a single column, say attr, starting with load_sanctuaries.Rmd.

See:

CREATE TABLE books (
    id serial primary key,
    title VARCHAR (255),
    attr hstore);
INSERT INTO books (title, attr)
VALUES
    ('PostgreSQL Tutorial',
      '"paperback" => "243",
       "publisher" => "postgresqltutorial.com",
       "language"  => "English",
       "ISBN-13"   => "978-1449370000",
           "weight"    => "11.2 ounces"');