A client / server architecture
Sybase is built on a client / server architecture of the database management system.
What is a client / server architecture?
From a hardware perspective, the client / server architecture refers to a task between two or more machines are allocated where the client (Client) is used to provide a user interface and run the front-end application server machine ( Server) provides a variety of resources and services used by the client.
From a software perspective, the client / server architecture is to an application or software system logical functions into client and server software portion of the software part. Client software and the application of the general in charge of part of the representation of data, handle the user interface for receiving user data processing requests and converts it into a request to the server, ask the server to provide data storage and retrieval services; server software is responsible for receiving client software sent the request and to provide appropriate services.
Client / Server combines the power and central control, and low-cost PC, and better handling balance of the mainframe. Client / server tasks centralized / local distribution provides a new method, this system enables the user to data integrity, management and security of centralized control. In alleviate network traffic and host loads and meet the needs of users, client / server architecture provides a good solution. In short, the mode of client / server architecture are: the use of network protocols (such as TCP / IP, IPX / SPX) between clients and servers to connect and communicate, a request by the client to the server, the server responds to the request, and the corresponding service.
The basic procedure for accessing Sybase servers
- Establish a connection between the client and server, including network connection, the connection between client and server processes; and
- The client sends SQL statements to the server through the network, used to query or operation of the server in the data or database objects;
- After the server receives the SQL statement, its syntax analysis, optimization and compiled execution;
- If the statement is executed to produce a result set, the server through the network to the result set returned to the client;
- The client received the results for the corresponding treatment.
In the client / server system, there are two database engine structure, a multi-process database engine and single-process, multi-threaded engine structure multi-process architecture that is more executable programs are running. Whenever a user logs on to the database system actually started a separate database engine instances. Process exists coordinating role of coordination between communication in order to guarantee the integrity When multiple users access the same data. Multi-process database engine is generally used in mainframe databases.
Single-process, multi-threaded, multi-process database engine database engine similar in principle, the difference is multithreaded database engine is responsible for scheduling each application its own CPU-time, rather than relying on the operating system. Thus, the ability to multi-threaded database engine to protect themselves stronger. Oracle Server is a true multi-process database engine, Sybase database management system uses a single-process, multi-threaded engine structure.
Sybase Product Overview
- Composition Sybase Software
- The basic features of Sybase ASE
- SQL Server can be placed on a number of disk devices, the initial installation of the required disk space to at least 17MB.
- SQL Server supports multiple database structure, which means that the system can have multiple Sybase databases. Sybase can manage multiple databases.
- SQL Server can compile and run T-SQL statement, and returns the results required by the client. T-SQL statement is a standard SQL extensions, in addition to its data definition statements, data manipulation and data control statements other than statements, major increase in flow control statements.
- SQL Server can manage multiple users and has a high transaction throughput and lower transaction response time. Client applications can access data Server in one or several databases.
Sybase software can be divided into three parts: First, data management and maintenance of an online relational database management system Sybase SQL Server; the second is to support the establishment and development of database applications a set of front-end tools Sybase SQL Tools; third is the other vendors of application software and any type of data in heterogeneous environments connected together Interface Software Open Client / Open Server. SQL Server is a programmable database management system (DBMS), it is the entire Sybase product’s core software plays data management, the role of high-speed buffer management, transaction.
SQL Server is a relational database management system, it has the following basic characteristics:
Sybase ASE main content
Sybase SQL Server is a multi-RDBMS database structure, architecture is as follows:
- System Database
- master database
- model database
- tempdb database
- User Database
Server database used by itself, it can be said that the database management server and user database. Sybase during the installation, automatically creates four system databases:
master, model, tempdb, sybsystemprocs
It is to manage and control user database and maintain core database server is running, it saves a lot of system information, such as server configuration, user, and equipment.
Do not allow ordinary users to create database objects in the master database in which otherwise would make the transaction log of the master database quickly becomes full. If the transaction log runs out, you can not use the dump transaction command to release the master database space.
It is a template for creating a user database provided. Whenever you create a new database, SQL Server automatically create a copy of the model database, and it expanded to the size required by the user as a new user database.
Model database contains system tables for each user database requires. Model database can be modified to customize the newly created.
It is a temporary database, the server is running and process provide a shared storage area, such as intermediate results of group by and order by just stored here. Tempdb space for all server shared by all users of the database.
Each time you restart SQL Server, an automated process model database server are copied to tempdb database, and remove tempdb in original content. So tempdb user tables are temporary. Temporary tables are divided into two categories: shareable and non-shareable. Temporary tables can not be shared before the create table will be placed in the symbol table # founded; shareable temporary tables specify the table name prefix and the creation by create table in tempdb … Non-shareable temporary table in SQL Server to add digital automatic extension, and it only exists in the current session.
It is designed to save the system commands (stored procedures) database, such as sp_help, sp_configure, sp_helpdevice like. When the stored procedure sp_ beginning when he was running a database user, SQL Server in the following order: under the current database, sybsystemprocs database, master database.
User database server we use Sybase real purpose. To manage user data, you must create your own database in Sybase, which refers to the database with the create database command creates. The user can not access the master database is not allowed to create a new database.
The main contents of the database – a database object:
Tables, views, temporary tables indexes, primary keys, foreign keys defaults, rules, stored procedures, triggers, etc.
Sybase installation and configuration
- Server-side installation
- Do not install any user objects in the master database.
- Logs should be stored in a database separate from the disk.
- You can optimize I / O performance through the distribution of work across multiple devices.
- Client Installation
- Content needs to be changed immediately
- change the sa login password;
- name server;
- modify the file name (to ensure the normal start Sybase Central);
- Change the default device;
- increase tempdb space.
- Creating a user database
- The main contents of the system management
- managing physical resources
- The user and rights management
- Backup and restore databases
- SQL Server’s configuration parameters
After installing build SQL Server, to establish place database, logs, and indexes logical disk devices. Databases, logs and indexes configuration should note the following
The following script database set up by a description of the process to establish a database: // Create a database device, the device size in pages (2K) units
disk init name=”test_dbdev”, physname=”c:\test\test_dbdev.dat”, vdevno=10, size=10240 go disk init name=”test_logdev”, phyname=”c:\test\test_logdev.dat”, vdevno=11, size=5120 go // Create a database TEST_DB, its size is 20M, 10M log size create database TEST_DB on test_dbdev = 20 log on test_logdev = 10 go // Open database use TEST_DB go
Server configuration is the responsibility of the system administrator, the correct configuration has a significant impact on system performance. There are two system tables store configuration information: sysconfigures and syscurconfigs; sysconfigures is permanent, once the system is running, sysconfigures of information is copied to syscurconfigs in. Display configuration and change the configuration of using the system sp_configure.
There are two configuration values: dynamic and static, dynamic value once the change takes effect immediately, static values to play a role in the system is restarted before.