We propose an algorithm for mapping XML Schema structures to an object-relational database schema (defined by the SQL:1999 standard) using a (modified) DOM interface and an algorithm for storing the valid XML data into relations of the resulting schema.