CREATE TABLE Document (
	DocumentID int NOT NULL AUTO_INCREMENT,
	RecordID varchar(16),
	Subject varchar(254),
	Author varchar(64),
	FileDate datetime,
	FileType varchar (50) ,
	Status varchar (4) ,
        primary KEY(DocumentID)
); 

CREATE TABLE Document_File(
	FileID int NOT NULL AUTO_INCREMENT,
	RecordID varchar(16) ,
	FileName varchar(254) ,
	FileType varchar(4) ,
	FileSize int ,
	FileDate datetime ,
	FileBody longblob ,
	FilePath varchar(128) ,
	UserName varchar(64) ,
	Descript varchar(255) ,
        primary key(FileID) 
);

