At one of the Zope sprints I met someone from https://github.com/perfact and actually they do something what you mentioned. They have all code in ZODB, and the data in a relational db. They use some scripts which exports the contents of the ZODB and put all source under version control.
Afair gocept
supported developing this solution ( https://gocept.com/ ).
That all said, I go with @zopyx - I would not recommend doing this.
Why don't you develop code the recommended way, ie in the file system?