Writing of ERD [master]