I'm under increasing pressure to start using RDF as a back-end for websites, rather than MySQL.
I've been considering the basic "patterns" of use, generally they boil down to create item, delete item, update item, get-from-id, get-items-matching-x.
In MySQL, when creating an item, we use an AUTO_INCREMENT field to be sure we get a unique ID. Is there a reliable way to do this with a triple-store as a backend?
To be honest I have not tested it yet. I will try this tonight. In practice you might need to do a separate select for key and then insert later as you might need the key directly in your front-end application.
Just an idea: how about GUIDs? I hear they are increasingly common in the RDBMS land as well. Maybe they are more expensive to produce and locate than integers, but you don’t have to care about concurrency.
Would it be hard to just store the value in a triple and handle an auto-increment mechanism that update it ? or a select max ? (also handling concurrence)
Sorry if that is stupid...but a few years back, we did the same with a DB that didn't handle auto-increment, it was just fine...
It's not quite triple-store only, but you could use a redis instance to look after your sequence in a non-racy kinda way. That way, whenever you need to create a new identifier you can perform an INCR command to get the unique integer you want to stick in your URIs.