CREATE TABLE readlock(
	id VARCHAR(100) PRIMARY KEY,
	mdstoreid VARCHAR(100) references metadata(mdid) ON DELETE CASCADE NOT NULL,
	dateofread timestamp
);

CREATE INDEX  readlock_idx on readlock(mdstoreid);