File folder sql programming

Posted by eski on Stack Overflow See other posts from Stack Overflow or by eski
Published on 2010-05-05T16:26:46Z Indexed on 2010/05/05 16:28 UTC
Read the original article Hit count: 105

Filed under:

I'm trying to figure out the best way to make a file folder system in sql. I'm making a website that will be using similar system as explorer in windows.

You open your c: drive and you see there some folders and files, and you open one folder and you see more files and folders there.

So what i'm asking, would i use one table for this and just point to the parent id number or what ?

I have this in my head.. You make a Primary folder, it gets the u_id=1. Then i make a file in that folder, it gets u_id=2 and p_id=1 so i know its there right? same with the folders.

This would all be in one table but i cant help thinking there is some major flaw in this..

© Stack Overflow or respective owner

Related posts about sql