File folder sql programming
- by eski
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..