CREATE TABLE objects ( -- every object RPKIViews ever discovered
id INTEGER NOT NULL,
hash BLOB, -- SHA256 hash (as raw bytes) of the DER-encoded object content
stime INTEGER, -- signing timestamp (derived using the RFC 9589 method)
dtime INTEGER, -- discovery timestamp (when RPKIViews first noted the object)
sz INTEGER, -- size of the DER-encoded object (as octets)
content BLOB, -- content is Zstandard compressed if sz != len(content)
PRIMARY KEY (id),
UNIQUE (hash) -- index by hash for fast lookups and deduplication
);
CREATE INDEX dtime_index ON objects(dtime); -- index by dtime to help range scanning