#2
wube2017-08-15 14:30
|
原本设计两层资料存取结构~但使用者要求加深至少到3层~
从第二层开始会有同时有子目录或档案~像在数据库设计类似Windows的档案系统~
不知道有没有人有相关经验~目前做了六层~但是总觉得tblFileList的部分怪怪的~
总感觉好像目前设计的表无法体现二层之后都有目录和档案的目的~
但是又不知道该怎么改? 请高手协助~
tblFileSubject 一层
SubjectNo varchar(20) Unchecked PK
SubjectType varchar(10) Unchecked
SubjectName varchar(30) Checked
SubjectOrder tinyint Checked
ShowInPrivate char(1) Checked
ShowInPublic char(1) Checked
SubFolder char(1) Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked
tblFileSubFolder 二层
SubjectNo varchar(20) Unchecked PK
SubFolderNo int Unchecked PK
SubjectType nchar(10) Unchecked
SubFolderName varchar(30) Checked
SubFolderOrder tinyint Checked
SubFolder char(1) Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked
tblFileSubFolder2 三层
SubjectNo varchar(20) Unchecked PK
SubFolderNo int Unchecked PK
SubFolder2No int Unchecked PK
SubjectType varchar(10) Unchecked
SubFolder2Name varchar(30) Checked
SubFolderOrder tinyint Checked
SubFolder char(1) Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked
tblFileSubFolder3 四层
SubjectNo varchar(20) Unchecked PK
SubFolderNo int Unchecked PK
SubFolder2No int Unchecked PK
SubFolder3No int Unchecked PK
SubjectType varchar(10) Unchecked
SubFolder3Name varchar(30) Checked
SubFolderOrder tinyint Checked
SubFolder char(1) Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked
tblFileSubFolder4 五层
SubjectNo varchar(20) Unchecked PK
SubFolderNo int Unchecked PK
SubFolder2No int Unchecked PK
SubFolder3No int Unchecked PK
SubFolder4No int Unchecked PK
SubjectType varchar(10) Unchecked
SubFolder4Name varchar(30) Checked
SubFolderOrder tinyint Checked
SubFolder char(1) Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked
tblFileSubFolder5 六层
SubjectNo varchar(20) Unchecked PK
SubFolderNo int Unchecked PK
SubFolder2No int Unchecked PK
SubFolder3No int Unchecked PK
SubFolder4No int Unchecked PK
SubFolder5No int Unchecked PK
SubjectType varchar(10) Unchecked
SubFolder5Name varchar(30) Checked
SubFolderOrder tinyint Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked
tblFileList 档案
SubjectNo varchar(20) Unchecked PK
SubFolderNo int Unchecked PK
SubFolder2No int Unchecked PK
SubFolder3No int Unchecked PK
SubFolder4No int Unchecked PK
SubFolder5No int Unchecked PK
SubjectType varchar(10) Unchecked
FileNo tinyint Checked
FileName varchar(100) Checked
FileMemo varchar(300) Checked
ShowInPublic char(1) Checked
DownloadCount int Checked
CreatorNo varchar(20) Checked
CreateDate datetime Checked
ReviserNo varchar(20) Checked
ReviseDate datetime Checked