I'm interested how does google docs store documents on server side because I need to create similar application.

Does it use pure RTF/ODF files or own database?
How do they make possible versioning and undo/redo feature?

If anybody have knowing according this question please share with me.