writable stream for database