CREATE TABLE Attributes (
  	id 		SERIAL,
	Name 			VARCHAR(255) DEFAULT '' NOT NULL,
	Description 		VARCHAR(255) DEFAULT NULL,
  	Content 	BYTE,
	ContentType	VARCHAR(16),
	ObjectType	VARCHAR(25) NOT NULL,
	ObjectId	INTEGER DEFAULT 0 NOT NULL,
	Creator 	INTEGER DEFAULT 0 NOT NULL,
  	Created 	DATETIME YEAR TO SECOND,
	LastUpdatedBy	INTEGER DEFAULT 0 NOT NULL,
	LastUpdated	DATETIME YEAR TO SECOND,
        PRIMARY KEY (id)
); 

CREATE INDEX Attributes1 on Attributes(Name);
CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
