That's exactly what constraints, rules in SQL etc are for.
Maybe some similar ruling system for filesystems would be fine :)
(any suggestions ?)
That's what I was driving at. To map SQL <> FS you end up replicating
lots of SQL logic in your client FS. Reads are *always* out of date.
Writes can happen across tables but need to be atomic and able to roll back.
Funny you should mention rules for filesystems. I also did the opposite
and wrote a front end that mapped 9p onto SQL. I.E. a scehma that
represented a file system with QIDs etc. with a python marshaller
inbetween such that Postgres was the backing store for 9p.
I got a bit stuck when the file sizes got over the row size, the blob
spec wasn't very clearly documented to me; all you get is the C function
definitions rather than what goes over the wire so it's another project
in the unfinished pile :)
I've got a few weeks off soon and I'm going to revisit my py9p :)