I had an interesting discussion last week walking along Navy Pier with Peter van Hardenberg of Heroku, which set me thinking. I was talking about how you could get much better performance in many situations by keeping logic inside the database (a favourite theme of mine
) and he raised the question of how to manage having lots of code inside the database, especially in a situation where you have many servers, possibly thousands or even hundreds of thousands. How do you know which version of, say, a function you have? Of course you can look at the text, but it doesn't alone identify itself. Of course, that's true of other non-database objects too - how do you identify what software version is installed. I've seen many cases over several decades of mismatched releases.
One of the ideas I came up with in thinking about this is to be able to provide a signature for database object definitions. So then you might say 'Release x.y.z of our product consists of the following objects with the associated signatures." You could probably express this as a tuple of or something similar. Then checking that your release was properly installed and hadn't been tampered with would be a matter of checking the object signatures against the known release values.
I'm not sure how far along this would get us with the sort of problems Peter was talking about, but I think it might be useful in itself anyway.

One of the ideas I came up with in thinking about this is to be able to provide a signature for database object definitions. So then you might say 'Release x.y.z of our product consists of the following objects with the associated signatures." You could probably express this as a tuple of or something similar. Then checking that your release was properly installed and hadn't been tampered with would be a matter of checking the object signatures against the known release values.
I'm not sure how far along this would get us with the sort of problems Peter was talking about, but I think it might be useful in itself anyway.