Reviewed again. My considerations:
1) VersionViewed relationships are both wrong. in versionviewed you need 2 foreign keys, username with the user id and VersionID with the version id. It needs to look like this:
Version --------< Versionviewed >-------- Users
2) Favorites and versionbookmarks are both wrong. they both miss "VersionID" foreign key and the relationship to version is wrong. They need to look like this:
Version --------< Favorites >-------- Users
Version --------< versionbookmarks >-------- Users
3) Imho it's better the current database solution for bookmarks and watched state. Not 2 separate tables (Versionviewed and versionbookmarks) but only one with a new column named "type". If type=0 is a watched bookmark, if type is 1 it's a regular bookmark and if type 2 it's an episode bookmark. You already need a "type" column because of
episode bookmarks so in this way you can drop a table :
http://kodi.wiki/view/Databases#bookmark
4) A video file could be both a tv show and a movie..
5) The table between videostream and version imho is pointless. I understand there's a chance you can have 2 video files with the video that have same length,same track id, same codec, same resolution, same bitrate but what are the chances? 1:10000? it's better to have Version -------< Videostreams without table in the middle. In this way it makes the database a lot simpler (and the same consideration stands for audiostream and subtitles) with only a remote chance of redundancy.
6) Why assets has a size? art has a size (missing), videostream has a size but artwork doesn't.
7) r_Assets_Person_Roles is connected to the wrong table. As the name suggests needs to be connected to Person_roles not to Roles. It needs to look like this:
Assets -------------< r_Assets_Person_Roles >------------- r_Persons_Roles
Also the new gsoc about better profiles support (
http://forum.kodi.tv/showthread.php?tid=222006) is actually really connected to this work so maybe you should keep an eye on that.