Regarding to the importance of the speed and security factors in most of the data management web applications, so it is important to optimize the designing and implementation techniques to enhance these two factors. The purpose of this thesis is to discuss the software optimization techniques by using eXtensible Markup Language (XML). This language complements existing data management effortsnicely and enables the development of new and innovative data management techniques to perform speed, security and reliability for data management in Web-Database applications. The implementation concentrate on exchanging data from a relational database which running on a database server and connected to a web server that holds the web application. The web application runs under Microsoft IIS of the Windows operating system to build an n-tier system using XML as a middle-tier for giving best performance to the end user through using different browsers over a local network (Intranet) or the Internet. The implementation results show the capability of XML that meets the optimal performance through three case studies using XML as middle-tier database between the Web server and the Database server. The first case study is for updating Subscribers information that stored in a database through the Internet, the second case study is for managing a store database through the Intranet, and the third case study is for presenting the enhancements on both speed and security when using XML. These three case studies illustrates the building of a three-tier system using Microsoft IIS, SQL 2000, MSXML, SQLXML, Microsoft.NET Framework and XML templates, schemas and style sheets to create powerful control web applications.