[RFC] Database Abstraction Proposal - Request for Comments (Devs and DB Admins only!)
#13
Some thoughts. Apologies - it's a bit of a braindump :p

Short form for those that can't be arsed reading it all: How paths are defined per client is the key piece of information that needs to be determined.

Long form for those with time on their hands:

1. Consolidation is really just for the benefit of not having multiple databases on the server. There is very little need to cross-link the 3 databases we have at the moment, and the small amount of cross linking that might be wanted can easily be done externally. Music videos naturally belong in the music database rather than the video database, though there are ofcourse technical issues in getting them in there (lack of tagging a major one, and also having to make sure the player system supports them well.)

2. The big problem is dealing with paths and profiles as already discussed above. This is a non-trivial problem. Ideally, we want to be able to just point XBMC at a database and we're done. We don't want to have to care that the paths may be different and so on. Thus, translation of paths needs to be either done in the database or in the client. It seems to me that doing this in the client makes the most sense, though I currently have no solid ideas on how to handle this. It's not as simple as a copy and paste for several reasons - rar/zip/stacks/multipaths etc. all need handling, and these are not naturally hierarchical. Multipaths are easy (just store multiple rows to define a 'node'), and stacks are probably doable as well. Rars and Zips are tricky, as theoretically you can have arbitrary numbers of movies within rars which may be within a zip or whatever. This is something that needs solving prior to finalizing how paths and urls are stored. Perhaps the solution is to ignore it and force everything to be on a network drive that allows the same URL format for everything, or perhaps we just tag those paths that will be the same for all machines (i.e. network) - I don't know the best way to handle it.

3. Metadata has to be completely separate from file data. The link has to be very carefully setup. My thinking for the video library is as follows:

a. A "video" table that basically contains a filtered version of the filesystem. Each entry has a URL to the item on the filesystem that this entry covers (could be a folder or a file, a stack of files, or part of a file), along with the video URL that should be played when the item is clicked on, along with some other pertinent info, such as pathid (path that this item resides in), nodeid ("node" or source that this item resides in), a hash to enable rescraping and so on. Each entry represents a playable item.

b. A "filedetails" table would have information on the underlying file(s) for that item, such as the streamdetails and other file-based information (size, date, etc.) This is stuff that can be removed when the "video" item is removed, as it's easily generated from the file.

c. A "metadata" table handles all the metadata for this item. This is scraped info and local info. It'll be fixed field and will also have key/value pairs. This is information that may be scraped from online sources or local sources, and thus should not be removed if possible. It may be split into two, as I see a use for a single-row of information that gets key details needed for sorting (eg title, sorttitle, originaltitle, rating, runtime - one off stuff) and additional information used for grouping (genre, group, actor, director, studio, year, <insert_user_definable_grouping> etc.)

d. Multiple "video" items may link to a "metadata" item, so a video->metadata link can be made. It's a n:1 relationship though I think, so a foreign key in the video table to the metadata table will suffice.

The idea is that the video table allows for fast listing based on path or fast listing based on node or source (eg "all movies"). Once we have the listing, we then background load the rest of the information (one query per entry).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply


Messages In This Thread
[No subject] - by DonJ - 2009-08-03, 12:57
[No subject] - by firnsy - 2009-08-03, 13:35
[No subject] - by wstewart - 2009-08-03, 13:58
[No subject] - by eriksmith200 - 2009-08-03, 14:21
[No subject] - by ZIOLele - 2009-08-03, 14:37
[No subject] - by spiff - 2009-08-03, 14:43
[No subject] - by ZIOLele - 2009-08-03, 14:43
[No subject] - by skunkm0nkee - 2009-08-03, 14:56
[No subject] - by eriksmith200 - 2009-08-03, 17:29
[No subject] - by firnsy - 2009-08-03, 22:51
[No subject] - by firnsy - 2009-08-03, 23:03
[No subject] - by jmarshall - 2009-08-04, 02:38
[No subject] - by wstewart - 2009-08-04, 02:56
[No subject] - by ZIOLele - 2009-08-04, 10:34
[No subject] - by jmarshall - 2009-08-04, 10:57
[No subject] - by ZIOLele - 2009-08-04, 11:18
[No subject] - by ZIOLele - 2009-08-04, 12:21
[No subject] - by firnsy - 2009-08-04, 13:27
[No subject] - by ZIOLele - 2009-08-04, 13:46
[No subject] - by firnsy - 2009-08-04, 23:13
[No subject] - by joelmeans - 2009-08-05, 00:26
[No subject] - by jmarshall - 2009-08-05, 02:17
[No subject] - by firnsy - 2009-08-08, 02:15
[No subject] - by da-anda - 2009-08-11, 21:53
[No subject] - by jmarshall - 2009-08-12, 04:16
[No subject] - by da-anda - 2009-08-12, 10:26
[No subject] - by jmarshall - 2009-08-12, 10:30
OpenDBX Integration - by firnsy - 2009-12-08, 11:06
[No subject] - by dbrobins - 2009-12-08, 22:10
[No subject] - by jmarshall - 2009-12-09, 02:03
[No subject] - by wstewart - 2009-12-09, 02:36
Woot! - by firnsy - 2009-12-09, 09:19
[No subject] - by jmarshall - 2009-12-16, 23:09
[No subject] - by Andrewishy - 2009-12-21, 10:58
[No subject] - by spiff - 2009-12-21, 12:10
[No subject] - by Andrewishy - 2009-12-22, 01:06
[No subject] - by firnsy - 2009-12-26, 03:22
[No subject] - by megacrypto - 2009-12-27, 03:59
[No subject] - by firnsy - 2009-12-27, 06:55
[No subject] - by Andrewishy - 2009-12-28, 01:38
[No subject] - by firnsy - 2009-12-28, 01:48
[No subject] - by Andrewishy - 2009-12-28, 02:00
[No subject] - by da-anda - 2009-12-28, 11:09
[No subject] - by megacrypto - 2009-12-29, 17:13
[No subject] - by firnsy - 2009-12-30, 02:00
[No subject] - by oliver - 2009-12-31, 02:09
[No subject] - by spiff - 2009-12-31, 02:14
[No subject] - by oliver - 2010-01-02, 00:15
[No subject] - by firnsy - 2010-01-02, 03:18
[No subject] - by megacrypto - 2010-01-03, 00:55
[No subject] - by firnsy - 2010-01-03, 01:32
[No subject] - by megacrypto - 2010-01-03, 23:35
[No subject] - by megacrypto - 2010-01-04, 01:21
[No subject] - by outleradam - 2010-01-04, 01:42
[No subject] - by firnsy - 2010-01-04, 12:10
[No subject] - by megacrypto - 2010-01-04, 15:21
[No subject] - by spiff - 2010-01-04, 15:23
[No subject] - by megacrypto - 2010-01-04, 15:37
[No subject] - by megacrypto - 2010-01-04, 16:50
[No subject] - by megacrypto - 2010-01-04, 20:21
[No subject] - by crash123 - 2010-01-05, 01:34
[No subject] - by megacrypto - 2010-01-05, 03:09
[No subject] - by firnsy - 2010-01-05, 05:17
[No subject] - by megacrypto - 2010-01-05, 15:15
[No subject] - by megacrypto - 2010-01-05, 19:33
[No subject] - by firnsy - 2010-01-06, 01:31
[No subject] - by firnsy - 2010-01-06, 13:37
[No subject] - by megacrypto - 2010-01-09, 18:26
[No subject] - by rcoops - 2010-01-18, 14:18
[No subject] - by firnsy - 2010-01-18, 15:06
[No subject] - by megacrypto - 2010-01-18, 23:44
[No subject] - by firnsy - 2010-01-19, 02:00
[No subject] - by SleepyP - 2010-01-19, 05:11
[No subject] - by megacrypto - 2010-01-19, 16:02
[No subject] - by outleradam - 2010-02-04, 07:42
[No subject] - by firnsy - 2010-02-04, 09:45
[No subject] - by spiff - 2010-02-04, 10:12
[No subject] - by bradvido88 - 2010-03-19, 18:04
[No subject] - by bradvido88 - 2010-03-19, 20:43
[No subject] - by Jordan - 2010-03-20, 06:37
[No subject] - by firnsy - 2010-03-20, 08:29
[No subject] - by charrua - 2010-03-20, 09:17
[No subject] - by bradvido88 - 2010-03-20, 16:47
[No subject] - by bradvido88 - 2010-03-20, 18:00
[No subject] - by charrua - 2010-03-20, 19:14
[No subject] - by JPDeckers - 2010-03-21, 11:02
[No subject] - by firnsy - 2010-03-21, 13:46
[No subject] - by JPDeckers - 2010-03-22, 17:14
[No subject] - by bradvido88 - 2010-03-22, 17:25
[No subject] - by spiff - 2010-03-22, 18:03
[No subject] - by bradvido88 - 2010-03-22, 18:11
[No subject] - by spiff - 2010-03-22, 18:16
[No subject] - by bradvido88 - 2010-03-22, 19:47
[No subject] - by firnsy - 2010-03-23, 12:46
Really nice reading... - by jurrabi - 2010-03-23, 21:19
[No subject] - by jmarshall - 2010-03-24, 01:29
[No subject] - by jurrabi - 2010-03-24, 01:43
[No subject] - by spiff - 2010-03-24, 11:22
[No subject] - by jurrabi - 2010-03-24, 12:30
[No subject] - by charrua - 2010-03-24, 13:13
[No subject] - by aiken - 2010-03-26, 05:41
[No subject] - by pecinko - 2010-03-26, 09:57
[No subject] - by charrua - 2010-03-29, 12:57
[No subject] - by firnsy - 2010-03-29, 13:32
[No subject] - by charrua - 2010-03-29, 13:45
Status - by bbushvt - 2010-04-02, 22:37
[No subject] - by charrua - 2010-04-02, 23:14
[No subject] - by lazybones - 2010-04-06, 02:40
[No subject] - by jmarshall - 2010-04-06, 03:17
[No subject] - by firnsy - 2010-04-06, 12:43
[No subject] - by charrua - 2010-04-06, 14:06
[No subject] - by firnsy - 2010-04-08, 00:14
[No subject] - by charrua - 2010-04-08, 00:46
[No subject] - by firnsy - 2010-04-08, 03:00
[No subject] - by charrua - 2010-04-08, 03:20
[No subject] - by nabab - 2010-04-13, 17:26
[No subject] - by bradvido88 - 2010-04-13, 17:42
[No subject] - by megacrypto - 2010-04-16, 21:47
[No subject] - by firnsy - 2010-04-17, 05:09
[No subject] - by Jordan - 2010-04-27, 01:20
[No subject] - by jmarshall - 2010-04-27, 02:29
[No subject] - by charrua - 2010-04-27, 02:47
[No subject] - by Jordan - 2010-04-27, 07:28
[No subject] - by charrua - 2010-04-28, 04:14
[No subject] - by Jordan - 2010-04-28, 20:57
[No subject] - by Jordan - 2010-05-04, 09:36
[No subject] - by firnsy - 2010-05-04, 10:07
[No subject] - by Jordan - 2010-05-05, 21:16
[No subject] - by run088 - 2010-05-06, 21:37
[No subject] - by spiff - 2010-05-07, 10:56
[No subject] - by bmillham - 2010-05-13, 03:37
[No subject] - by wstewart - 2010-05-13, 05:12
[No subject] - by firnsy - 2010-05-13, 11:56
[No subject] - by firnsy - 2010-05-13, 12:00
[No subject] - by muttley:bd - 2010-05-13, 17:01
[No subject] - by wstewart - 2010-05-13, 18:28
[No subject] - by firnsy - 2010-05-14, 12:12
[No subject] - by MeqTrader - 2010-05-15, 08:56
[No subject] - by rickardkk - 2010-05-17, 01:12
[No subject] - by WingmanNZ - 2010-05-19, 12:32
[No subject] - by firnsy - 2010-05-19, 12:51
[No subject] - by Jordan - 2010-06-04, 00:26
[No subject] - by firnsy - 2010-06-04, 06:50
[No subject] - by Jordan - 2010-06-04, 22:55
[No subject] - by CrystalP - 2010-06-05, 00:02
[No subject] - by lozbrown85 - 2010-06-09, 23:09
[No subject] - by Vincent81 - 2010-06-11, 20:48
[No subject] - by Jordan - 2010-06-14, 03:02
[No subject] - by jmarshall - 2010-06-14, 04:50
[No subject] - by johnsmith325 - 2010-06-14, 14:30
[No subject] - by MrDVD - 2010-07-19, 19:09
[No subject] - by jackthegroove - 2010-07-26, 17:01
[No subject] - by spiff - 2010-07-26, 17:06
[No subject] - by RckStr - 2010-07-31, 21:32
[No subject] - by firnsy - 2010-08-01, 04:04
[No subject] - by RckStr - 2010-08-04, 03:05
Foreign keys - by dbrobins - 2010-09-19, 09:18
[No subject] - by firnsy - 2010-09-19, 13:33
[No subject] - by dbrobins - 2010-09-19, 22:04
[No subject] - by firnsy - 2010-09-20, 12:45
[No subject] - by marirs - 2010-09-20, 14:18
[No subject] - by dbrobins - 2010-09-20, 21:08
[No subject] - by firnsy - 2010-09-20, 22:50
[No subject] - by firnsy - 2010-09-20, 22:55
[No subject] - by dbrobins - 2010-09-21, 20:40
[No subject] - by firnsy - 2010-09-22, 09:29
[No subject] - by dbrobins - 2010-09-22, 21:05
[No subject] - by User 72023 - 2010-11-11, 15:28
[No subject] - by Jordan - 2010-11-11, 21:23
[No subject] - by User 72023 - 2010-11-12, 04:01
[No subject] - by Jordan - 2010-11-12, 06:20
[No subject] - by Robotica - 2010-11-12, 15:48
[No subject] - by _Andy_ - 2010-12-06, 23:28
[No subject] - by joemorin73 - 2010-12-09, 20:58
[No subject] - by joemorin73 - 2010-12-09, 21:00
[No subject] - by sebak - 2010-12-09, 22:48
[No subject] - by _Andy_ - 2010-12-10, 11:15
[No subject] - by joemorin73 - 2010-12-10, 18:20
[No subject] - by _Andy_ - 2010-12-11, 14:06
[No subject] - by firnsy - 2010-12-12, 01:26
[No subject] - by MindTooth - 2011-01-05, 01:41
[No subject] - by opdenkamp - 2011-01-05, 02:33
[No subject] - by opensauce - 2011-06-19, 00:29
[No subject] - by firnsy - 2011-06-27, 13:53
RE: Post-Eden Updates? - by Thracx - 2012-03-27, 22:57
[No subject] - by dbrobins - 2011-06-28, 03:40
[No subject] - by firnsy - 2011-06-28, 11:54
[No subject] - by griffore - 2011-10-13, 02:50
[No subject] - by Tuju - 2012-01-14, 15:15
[No subject] - by kinnth - 2012-02-24, 03:43
[No subject] - by Montellese - 2012-02-24, 10:03
Logout Mark Read Team Forum Stats Members Help
[RFC] Database Abstraction Proposal - Request for Comments (Devs and DB Admins only!)0