The booming of World Wide Web has created an open environment where information could be distributed rapidly on the Internet. The web-based learning environment is a very important direction for computer science education. Basically, there is two kind of distance education: synchronous distance education and asynchronous distance education. The synchronous distance education, based on videoconference technology, provides a learning environment for local and remote learners in the same time but at different place. The asynchronous distance education, based on World Wide Web technology, provides a learning environment for learner's use in any time and at any place. The web-based environment supports on-line course, on-line/off line discussion, e-mail and other Internet tools. We first propose the system architecture of asynchronous distance education with Web-based database Structured Query Language (SQL) learning system for learners. Besides, we also utilize the web mining techniques to help teachers fulfilling the learning process analysis for their students. With the accomplishment of the proposed SQL learning system, a traditional one-to-one test methodology is replaced. Therefore, the requirement of trained examiners and examining time are tremendously reduced. Moreover, we utilize the basic theory of constructivist teaching to provide the on-line test generating functionality for instructors. According to the requirement and learning speed, the learners can test by themselves repeatedly. Thus, the objective of sharing educational resources and computer network teaching may be achieved.