What's Sybase?

Source: Internet
Author: User
Tags sybase sybase database create database

A brief introduction of Sybase database

1. Version

In 1984, Mark B. Hiffman and Robert Epstern created Sybase and launched the Sybase database product in 1987. Sybase consists of three versions, one running under the UNIX operating system, the other running in Novell NetWare, and the other running in the Windows NT environment. Now the latest version is already 12.5, in the mainstream UNIX operating systems are widely used. IBM aix,hp unix,digital unix,sun Solaris et cetera.

2. The characteristics of Sybase database

(1) It is a database based on client/server architecture

The general relational database is based on the master/from model. In a master/from structure, all applications run on a single machine. The user simply sends commands through the terminal or simply looks at the results of the application running. In the client/server architecture, the application is divided into multiple machines running. A machine is a client of another system, or a server for other machines. These machines are connected by a LAN or WAN. The benefits of the client/server model are:

It supports shared resources and balances load across multiple devices
Allows the environment to host multiple hosts, making full use of the various systems existing in the enterprise

(2) It is truly open to the database

Because of the client/server architecture, the application is divided into multiple machines running. Further, the applications running on the client need not be Sybase's products. For general relational databases, precompilation is provided to enable applications written in other languages to access the database. Sybase databases, which simply provide precompilation and expose the application interface Db-lib, encourage third parties to write Db-lib interfaces. Because open customer db-lib allows identical invocations to be used on different platforms, it makes it easy to migrate applications that access db-lib from one platform to another.

(3) It is a high-performance database

The real attraction of Sybase is its high performance. Embodied in the following areas:

Programmable database

A programmable database is created by providing a stored procedure. Stored procedures allow users to write their own database subroutines. These subroutines are precompiled, so you do not have to compile, optimize, and generate a query plan for each call, so the query is much faster.

Event-driven triggers

Triggers are a special kind of stored procedure. Triggers allow you to start another stored procedure to ensure the integrity of the database.

Multiple cues

Another innovation in the architecture of the Sybase database is multiple cues. The general database relies on the operating system to manage the connection to the database. When multiple users are connected, the performance of the system is significantly reduced. The Sybase database does not allow the operating system to manage processes and manages the connection to the database as part of its own. In addition, Sybase's database engine also replaces the operating system to manage a portion of hardware resources, such as ports, memory, and hard drives, bypassing the operating system and improving performance.

3. The composition of the Sybase database

The Sybase database consists mainly of three parts:

(1) database management and maintenance of an online relational database management system Sybase SQL Server;

Sybase SQL Server is a programmable database management system, which is the core software of the entire Sybase product, and plays the role of data management, high speed buffer management, and transaction management.

(2) Support the establishment of database application system and the development of a set of front-end tools Sybase SQL toolset;

ISQL is a SQL syntax parser that interacts with SQL Server. ISQL receives the SQL language emitted by the user, sends it to SQL Server, and displays the results in a formalized manner on the user's standard output.

DWB, a Data workbench, is a major component of Sybase SQL Toolset that enables users to set up and manage databases on SQL Server, and provides users with an easy way to add, update, and retrieve information about a database. In DWB can complete all the functions of isql, and because DWB is based on windows and menus, so the operation is simpler than isql, is a convenient and practical database management tools.

Apt is one of the main products of Sybase customer software, and it is also the main environment for practical application development. Apt Workbench is a set of tools for building applications that can be created from very simple to very complex applications, and it is primarily used to develop form-based applications. The user interface uses Windows and menu-driven methods to complete the form, menu and process development through a series of selections.

(3) The interface Sybase Open Client/open Server which can connect the application software of other vendors and any type of data in heterogeneous environment.

The open client's Db-lib library allows applications to access SQL Server. With the server-lib of the open server, applications can access other database management systems.

Ii. the concept of Sybase

Sybase SQL Server is a multiple-library database system. These databases include system databases and user databases. Whether it is a system database or a user database, it is built on a database device.

1. Database devices

All databases are created on the database device. A database device, not an identifiable physical device, but a disk raw partition or operating system file that is used to store database and database objects. When adding a new database device, you must "initialize" these devices. The process of initialization is to transform a physical disk, partition, or operating system file into a device that the Sybase database can identify. Initializing database devices using the DISK INIT command:

DISK INIT
Name= Device Name,
Physname= Physical Device Name,
vdevno= virtual device number,
Size= Block number

Where name refers to the database device name, which is used for the CREATE DATABASE and ALTER DATABASE commands. Physname is the original disk partition or operating system filename. VDEVNO is the identification number of the database device, which must be unique in SQL Server. The size unit is a 2K block, and for the newly created database, the smallest size is the size of the model database, which is 1024 2K blocks (2M).

For example:/* Initializes the 400M physical device in the/dev directory to Sybase database device tele114_log01*/

1>disk Init
2>name= "Tele114_log01",
3>physname= "/dev/rtelelog"
4>vdevno=4
5>size=204800/*2kbyte*204800=400mbyte*/
6>go

2, paragraph

A database device is logically divided into database segments to allow a particular object to be placed on a specified segment (specified when an object is created), a database device can have up to 192 segments, and a single storage space can be used on 255 logical devices. When a user creates a database, SQL SERVER automatically creates three segments in the database: System, logsegment, DEFAULT, and these three segments are used to store the systems tables, transaction logs, and other database objects of the database respectively.

The steps to create a segment in a database are:

X First initializes the physical device with DISK Init
x makes the database device available to the database by using the ON clause of the CREATE DATABASE and ALTER DATABASE, and the new device is automatically added to the database's default and system segments.

Once the database device exists and is available to the database, use the stored procedure sp_addsegment to define the segments of the database. The syntax is as follows:

Sp_addsegment section name, database name, device name

3. System Database

The following system databases are automatically generated when the Sybase database is installed:

master database master;
Model database models;
System process database Sybsystemprocs;
Staging database tempdb.

You can also select the following databases:

Security Audit Database sybsecurity;
Sample database PUBS2;
command syntax database Sybsyntax.

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.