[redland-dev] Some basic questions: mostly mysql related

Murray Woodman murray.woodman at gmail.com
Thu Jul 27 09:00:18 UTC 2006


I'm new to using to Redland (and Python) so please excuse me if some of
these questions are a little basic. I'm really enjoying using Redland so
far - I just have a few humps to get over :). I'm using the Python
bindings and MySQL 5 as storage. I've decided to keep all these
questions in one email as they are probably pretty basic to answer.

The MySQL character set seems to be latin1. Is there any reason why this
is not unicode? You probably want to keep it backwards compatible with
earlier versions of MySQL. Unicode still goes in and out OK - it just
looks a little weird when it's in there and I guess the sorting will be
a little off. Would there be any danger in me altering the tables in
MySQL to make the the charset unicode?

How do you drop a model from a persistent store such as MySQL. I can't
see how to do this through the API. I did find a script to do this
directly on the DB
<http://www.wasab.dk/morten/2004/09/redland-mysql-drop-model> but
thought there might be a way to do it through the API.

I note that rows in the literal/resource/bnode tables are not deleted
when their "parent" statement is deleted. I understand that this happens
because a node row can be referred to in different models or contexts.
As a result there will be a lot of orphaned literals, resources and
bnodes as statements are deleted - resulting in wasted space in the DB.
Is there a way to avoid/fix this in the API or is it just a clean up job
to be scripted in SQL?

Finally, what is the best way to update a whole bunch of statements with
context whilst keeping the server downtime to a minimum? ie. How do I
best load in a completely fresh version of a particular context? To me
it seems that I would have to delete all statements with a context and
then load the new ones in. The downside is that the model will be
missing data for a while. This would be particularly problematic if the
parsing took a long time and users expected complete data for their
queries etc. Is there are better way to do it? For instance, is there a
way to load in some data into a different model (m2), delete the context
statements in m1 and then quickly(?) move the data from m2 into m1.
Maybe this is a job for SQL as well?

Thanks for a great product and your patience with the above.


cheers,

Murray



More information about the redland-dev mailing list