[RFC] Database Abstraction Proposal - Request for Comments (Devs and DB Admins only!)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
firnsy Offline
Team-XBMC Developer
Posts: 104
Joined: Jul 2009
Reputation: 0
Location: Australia
Post: #166
marirs Wrote:One thing that I hope the new schema can handle is allowing for some sort of proper ordering of things like actor links (eg, listing the most important ones first).

Sequences are handled.

marirs Wrote:In fact I think this was the way it used to be before it got changed to ensure mysql compatibility.

In fact, I don't think it was. Ordering was/is mapped by the way it was inserted.

Always read the XBMC online-manual, FAQ, Wiki 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.
find quote
firnsy Offline
Team-XBMC Developer
Posts: 104
Joined: Jul 2009
Reputation: 0
Location: Australia
Post: #167
dbrobins Wrote:If you're interested, I've been using SQLAlchemy (Python db toolkit) to model the XBMC video database for my own work. SA can build DDL from the model. Since you're using Python too, you may be able to make use of parts of my model. SA also offers cascade functionality even if the db isn't set up that way; right now if I delete a row from files it will also queue the relevant settings, streamdetails, movie and *linkmovie rows for deletion (it can also be told that the database will handle it, when foreign keys are in use, and not try to do the deletes itself).

I have looked at the SQLAlchemy code. Python has been used to identify the methods needed to be implemented in C++ once the schema is ready. The new DB will come with an internal query generator to dynamically shape the view(s) as content objects are manipulated.

In addition, content objects and relationships will become more manageable and loosely follow an OO methodology.

Always read the XBMC online-manual, FAQ, Wiki 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.
find quote
dbrobins Offline
Member
Posts: 73
Joined: Dec 2009
Reputation: 0
Location: Redmond, WA
Post: #168
firnsy Wrote:I have looked at the SQLAlchemy code. Python has been used to identify the methods needed to be implemented in C++ once the schema is ready. The new DB will come with an internal query generator to dynamically shape the view(s) as content objects are manipulated.

In addition, content objects and relationships will become more manageable and loosely follow an OO methodology.

What do you mean about methods that need to be implemented in C++? I would encourage you to openly discuss details of the redesign - maybe in a new thread - rather than working in silence for a long time then coming out with a fait accompli. You can of course do what you want, but designs benefit from early discussion. I'm sure there are plenty of other database architects and developers here that would be interested. It wouldn't need to become a "too many cooks" problem, either - you could reject any suggestions or ideas you didn't like. Including this one. Smile
find quote
firnsy Offline
Team-XBMC Developer
Posts: 104
Joined: Jul 2009
Reputation: 0
Location: Australia
Post: #169
dbrobins Wrote:What do you mean about methods that need to be implemented in C++?
XBMC is written in C++.

dbrobins Wrote:I would encourage you to openly discuss details of the redesign - maybe in a new thread - rather than working in silence for a long time then coming out with a fait accompli.

Short of providing you a remote desktop connection to my PC I'm not sure how much more open I could be [TIC]

http://forum.xbmc.org/showthread.php?tid...tabase+4.0

Always read the XBMC online-manual, FAQ, Wiki 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.
find quote
dbrobins Offline
Member
Posts: 73
Joined: Dec 2009
Reputation: 0
Location: Redmond, WA
Post: #170
firnsy Wrote:XBMC is written in C++.

Ya, I know that Tongue, I was thrown off by the phrasing "methods that need to be implemented in C++" rather than "code" or "classes", say. I understand now that you just meant updates to the general C++-database interface.
find quote
nogi Offline
Member
Posts: 64
Joined: Aug 2010
Reputation: 0
Post: #171
Jordan Wrote:I was able to fix my slow connection problem on my mac by adding
Code:
[mysqld]
.....
......
skip-name-resolve
to the MySQL my.ini file.

Where on the Mac do I find this file?
find quote
Jordan Offline
Junior Member
Posts: 14
Joined: Mar 2010
Reputation: 0
Post: #172
nogi Wrote:Where on the Mac do I find this file?

This file is not on your mac. Its on the computer running MySQL. I believe this file can be in different places depending on the OS and possibly on install settings. Mine is in C:\Program Files\MySQL\MySQL Server 5.1 on Windows Home Server (which is pretty much Windows Server 2003).
find quote
nogi Offline
Member
Posts: 64
Joined: Aug 2010
Reputation: 0
Post: #173
Confused
Jordan Wrote:This file is not on your mac. Its on the computer running MySQL. I believe this file can be in different places depending on the OS and possibly on install settings. Mine is in C:\Program Files\MySQL\MySQL Server 5.1 on Windows Home Server (which is pretty much Windows Server 2003).

Right. Mine is on a QNAP server Confused
find quote
Jordan Offline
Junior Member
Posts: 14
Joined: Mar 2010
Reputation: 0
Post: #174
nogi Wrote:Confused

Right. Mine is on a QNAP server Confused

I believe you want to edit this file /etc/config/my.cnf
find quote
Robotica Offline
Posting Freak
Posts: 1,202
Joined: Aug 2010
Reputation: 5
Post: #175
In this topic solexalex started working on a picture database. To help him out a little I have got a few questions: Since it is a plugin (with it's own database):

Is there a decision about the naming convention already? I think if so, it would be very convenient for solexalex (and all users) to implement them at this point in time.

And is it possible to test this plugin with a mySQL database? Or should the mysql-patches somehow be applied to his database?
(This post was last modified: 2010-11-19 15:14 by Robotica.)
find quote
czfj5r Offline
Member
Posts: 58
Joined: Jul 2010
Reputation: 0
Location: Sweden
Post: #176
Hi,

been looking into the thread and tried some searches but...
Is there anywhere a current updated schema of the database layout which is kept up to date where someone can see the relationships as well as the indexing used (mySQL i my highest interest)?

It would be great to be able to see the ongoing latest database information as to understand where there might be options for enhancing speed. Currently I suffer most in the music library and thereby trying to get inside the database as it seems to me that might be the bottleneck?

If the schema is already visible and available somewhere I apologize for not finding it and feel very free to enligten me of the whereabouts Smile
find quote
_Andy_ Offline
Senior Member
Posts: 277
Joined: May 2010
Reputation: 7
Location: Germany, Milky Way Galaxy
Post: #177
Hello

The database is a very nice idea. I installed a mysql setup and added some data.
There are the local paths for the thumbs/fanart stored?
Maybe i'm to blind but if i query the databae via JSON i get e.g. for a tvshow 'special://masterprofile/Thumbnails/Video/c/cf3b00f0.tbn'
So how can i query this information via the mysql database?
find quote
joemorin73 Offline
Junior Member
Posts: 7
Joined: Nov 2010
Reputation: 0
Post: #178
_Andy_ Wrote:Hello

The database is a very nice idea. I installed a mysql setup and added some data.
There are the local paths for the thumbs/fanart stored?
Maybe i'm to blind but if i query the databae via JSON i get e.g. for a tvshow 'special://masterprofile/Thumbnails/Video/c/cf3b00f0.tbn'
So how can i query this information via the mysql database?

Do you have MySql workbench installed?
find quote
joemorin73 Offline
Junior Member
Posts: 7
Joined: Nov 2010
Reputation: 0
Post: #179
I'm reading up on the Database and I'm interested in helping out on a new design. Is this proposal still being pursued?
find quote
sebak Offline
Junior Member
Posts: 33
Joined: Mar 2010
Reputation: 0
Location: Belgium
Post: #180
joemorin73 Wrote:I'm reading up on the Database and I'm interested in helping out on a new design. Is this proposal still being pursued?

If you mean design of the database itself, you'll probably wanna go here:
http://forum.xbmc.org/showthread.php?tid=73831
find quote
Post Reply