Database Design

1, Online network disk saves directory information and file information uploaded by users to the database for management, which facilitates reading and operation. This case is designed with two tables,

One is used to operate directories, directory table name: netdisk_folder

微信图片_20180302153150.png

##One is used to operate files, file table name: netdisk_file

微信图片_20180302154021.png

The folder_id of netdisk_file is equal to the folder_id of netdisk_folder. The two can be associated with foreign keys. There is no foreign key association here.


2, insert test data

is displayed as follows:

微信图片_20180302172432.png微信图片_20180302172437.png



#
Continuing Learning
||
<?php echo "数据库设计"; >
submitReset Code