jaseew01 / multi-user-file-manager

0 stars 0 forks source link

Make decision on the database design for the service #12

Closed skiadas closed 9 years ago

skiadas commented 9 years ago

Using SQL.

jaseew01 commented 9 years ago

I am having a hard time seeing where SQL is going to be used in this project. Will we be storing each file as a database entry rather than just placing the file inside one of the servers directories?

skiadas commented 9 years ago

I'm thinking you would need to somewhere keep some peripheral information about the files, like say how many times each has been requested, any tags that are associated with them, information on the request that uploaded them in the first place, their actual name vs how you store them on the disc, some descriptive information about them and so on.

Storing their contents is also an option, but idk. I know MongoDb has a system like that, with a file system built into it. Maybe SQL has something similar.

jaseew01 commented 9 years ago

So I am saving the files into the database, not directly into folders on the server?

skiadas commented 9 years ago

There are two "parts" to a file. First is the "metadata": What the name of the file is, what its name/hash as a resource is, how many times it has been accessed, when it was last updated and so on. This definitely has to go into a database.

Then there is the actual file contents. Those you can choose to either save in the database or in folders. It's a design decision you hae to make.

jaseew01 commented 9 years ago

Used sqlite3 package to interact with the filecollection database.