sql server 2005 - Designing Database for File Structure -


We are using the file system to store in the file. Now we change SOL2 to 5 to store it as Blob according to its requirement.

Now, we need advice about the design for the table.

I start with:

FileID, ParentFileID, should be a folder in the same as file system, file, size, last date modified, etc.

In the form, it is actually a good system for it already, and it is called file system - my first recommendation will be to see your needs again whether it is really required .

However, you may have your reasons, so here's how I create a table:

  Filesystem (id, / / ​​fold field: 1 = file, 2 = folder, 3 = symlink, if necessary (?) Parent_id, // a folder file name id, modified, created, modified, created, file_data // blob)  < / Pre> 

You will need a unique i (parent_id, filename) on Ndex if you want to emulate a real system They were

If you require per-file permission, then I just duplicate the Unix approach with the owner / group / each permit - you also have to track the owner and group_id in that table Perhaps you can make it master / simpler to everyone, and you can probably use reading / writing (for "execution").


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -