In the near future I am attempting to design a media server as a personal project. MY first consideration to get the project underway is architecture, it will certainly be web based but more specifically than that I am looking for suggestions on the database design.
So far I am considering something like the following, where I am using [] to represent a table, the first text is the table name to give an idea of purpose and the items within {} would be fields of the table. Also not, fid is functional id referencing some other table.
[Item {id, value/name, description, link, type}]
- this could be any entity, single song or whole music album, game, movie
- almost see this as a recursive relation, ie. a song is an item but an album that song is part
of is also an item or for example a tv season is an item, with multiple items being tv episodes
[Type {id, fid, mime type, etc}]
- file type specific information
- could identify how code handles streaming/sending this item to a user
[Location {id, fid, path to file?}]
[Users {id, username, email, password, ...? }]
- user account information
[UAC {id, fid, acess level}]
- i almost feel its more flexible to seperate access control permissions
form the user accounts themselves
[ItemLog {id, fid, fid2, timestamp}]
- fid for user id, and fid2 for item id
- this way we know what user access what when
[UserLog {id, fid, timestamp}]
-both are logs for access, whether login or last item access
[Quota {id, fid, cap}]
- some sort of way to throttle users from queing up the entire site and
letting it download ...
Suggestions or comments are welcome as the hope is that this project will be a open source project once some code is laid out.