This paper describes the design and implementation of an embedded-type XML storage and retrieval system which is built on top of relational databases. The proposed system stores each node of input XML documents as a relational tuple by a node numbering scheme. User queries written in XQuery are translated into a set of simple SQL queries before execution so that an embedded-type relational engine with limited resources can handle those queries more efficiently. XML type handling mechanism of the system enables it to cover various kinds of XML applications. Futhermore, the system provides an efficient XML indexing method for processing twig queries.