Skip to content

Latest commit

 

History

History
executable file
·
18 lines (17 loc) · 491 Bytes

sql-basic.md

File metadata and controls

executable file
·
18 lines (17 loc) · 491 Bytes
create table devices (
    hostname VARCHAR(30) NOT NULL PRIMARY KEY,
    management_ip inet NOT NULL,
    model VARCHAR(30) NOT NULL,
    vendor VARCHAR(20) NOT NULL CHECK (vendor in ('Cisco',
    'Juniper', 'Arista', 'Fortinet', 'Checkpoint', 'HP', 'Brocade')),
    credential_id VARCHAR(20) REFERENCES credentials (name)
);
create table credentials (
    name VARCHAR(20) NOT NULL PRIMARY KEY,
    username VARCHAR(20) NOT NULL,
    password VARCHAR(25) NOT NULL
);