The understanding of using SQL SERVER2000 to establish distributed website system

Source: Internet
Author: User
Tags local time
I've been doing a little research on "distributed Systems" recently, and I think it's pretty good, and maybe a lot of friends have heard about the concept of "distributed," and my personal understanding of this technology is that distributed systems include many members, and that resources are shared among them, From a large perspective it is a system that handles tasks together, but processes each small task individually, and then merges all the information into a central processing unit. This technology is based on the server side of a technology, I will follow my understanding to do a simple model (in the wrong place, please advise J)
Let me now introduce the structure of this model and the problem of database design:
Server A: Serve as a database server and serve as a Web server (platform win SERVER2000, IIS5.0, SQL Server, IP address 192.168.0.1)
Server b,c,d: Serving as Web server (Platform win SERVER2000, IIS5.0)
The first thing we should consider when designing a database is the characteristics of the system "distribution", that is, a,b,c,d four servers in the actual application of their geographical location is not necessarily centralized, such as Sohu Server, all over the world, but each of us see the message is the same, It is also a larger distributed Web site system, due to the differences in the region caused by the difference in server time, we should not only correct the user to represent the local time, but also facilitate the management of the database, then there will be a unified data warehousing time number, the work of course, only in the database to achieve So I designed a 2-time field, a web_time to store the date time passed from the Web server, and the system date time of the current database server when the data_time was used to store the data.
This completes an important one, (I encountered in a server to add data can be written to data_time, and cannot write on the B,C,D server Data_time because the reason is forget to set the field in this field is not empty, hehe, As long as it is not allowed to set the OK) and then set the Data_time default value of the GETDATE () so that in the writing of each data by SQL automatically get the current database server system time and write, hehe, this completes the time unification question, Then I like to do a registration system and then set the name and pass two fields to store the user's user name and password, oh, finished the database design, the next is the Web program, whistling
Web Program section:
1. Connection Database (conn.asp)
For a server, it is itself both a database server and a Web server, so the code for connecting to the database is as follows:
<%
Set Conn=server.createobject ("Adodb.connection")
Conn.Open "Provider=sqloledb;datasource=localhost; Uid=sa; pwd=;D atabase=db "
%>
For other Web servers, the remote database server on which they are connected is replaced with the following code:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.