An algorithm for generating XML Schemas from ER Schemas