Sybase Overview

More information on Sybase ASE: Sybase 101: Setup, DDL, T-SQL

The Sybase Server
A Sybase server consists of:
A) two processes, data server and backup server ;
B) devices which house the databases; one database (master) contains system and configuration data ;
C) a configuration file which contains the server attributes .

Memory Model
The Sybase memory model consists of:
A) the program area, which is where the dataserver executable is stored;
B) the data cache, stores recently fetched pages from the database device
C) the stored procedure cache, which contains optimized sql calls
The Sybase dataserver runs as a single process within the operating system; when multiple users are connected to the database, only one process is managed by the OS. Each Sybase database connection requires 40-60k of memory.
The "total memory" configuration parameter determines the amount of memory allocated to the server. This memory is taken immediately upon startup, and does not increase.

Transaction Processing
Transactions are written to the data cache, where they advance to the transaction log, and database device. When a rollback occurs, pages are discarded from the data cache. The transaction logs are used to restore data in event of a hardware failure. A checkpoint operation flushes all updated (committed) memory pages to their respective tables.
Transaction logging is required for all databases; only image (blob) fields may be exempt.
During an update transaction, the data page(s) containing the row(s) are locked. This will cause contention if the transaction is not efficiently written. Record locking can be turned on in certain cases, but this requires sizing the table structure with respect to the page size.

Backup Procedures
A "dump database" operation can be performed when the database is on-line or offline. Subsequent "dump transaction" commands need to be issued during the day, to ensure acceptable recovery windows.

Recovery Procedures
A "load database" command loads the designated database with the named dump file. Subsequent "load transaction" commands can then be issued to load multiple transaction dump files.

Security and Account Setup
The initial login shipped with Sybase is "sa" (system administrator). This login has the role "sa_role" which is the super-user, in Sybase terms.
User logins are added at the server level, and then granted access to each database, as needed. Within each database, access to tables can be granted per application requirements. A user can also be aliased as "dbo", which automatically grants them all rights within a database.

Database Creation
Databases are initialized with the "create database" command. It is not unusual for a Sybase server to contain many different databases. Tables are created within each database; users refer to tables by using ownername.tablename nomenclature. "Aliasing" users with the database eliminates the need for the prefix. Typically, a user will be aliased as "dbo" (database owner), which also gives the same result.
A typical Sybase database will consist of six segments spread across various devices.

Data Types
Supported data types include integer, decimal, float, money, char, varchar, datetime, image, and text datatypes.
Text and image datatypes are implemented via pointers within the physical record structure ; the field contents are stored in dedicated pages. As a result, each text or image field requires at least 2K of storage (on most platforms).
For string data, the varchar type can be used for lengths up to 255; the text type can be used for longer field data.
Datetime fields are stored as a number which is accurate to 1/300 of a second.
Within a "create table" statement, a column can be flagged as an "identity" column, which causes it to be incremented automatically when rows are inserted.

Storage Concepts
Tables are stored in segments; a segment is an area within a device, with a name and a size, that is allocated for a database. The transaction log is stored in its own segment, usually on a separate device.

Transact-SQL is a robust programming language in which stored procedures can be written. The procedures are stored in a compiled format, which allows for faster execution of code. Cursors are supported for row by row processing. Temporary tables are supported, which allows customized, private work tables to be created for complex processes. Any number of result sets can be returned to calling applications via SELECT statements.

Performance and scalability
Sybase continues to break TPC benchmark records. A recent (11/98) test yielded 53,049.97 transactions per minute (tpmC) at a price/performance of $76 per tpmC: The TPC-C tests on the Sun Enterprise 6500 server were conducted with 24 UltraSPARC(TM) processors, 24GB of main memory, 34 Sun StorEdge A5000 arrays and the new 64-bit Solaris 7 operating environment.
Sybase 11 scales from handheld devices to enterprise level servers.
Coming soon: benchmarks on Solaris and Linux machines.

Price per seat is average, compared to other vendors.
Support is achieved by opening cases with the support team. Response is usually within 24 hours.

Management and Development Tools (for Windows)
ISQL is the interactive query tool used with Sybase ; it is useful for entering queries and stored procedures.

Sybase Central is shipped with System 12. It offers a good interface for performing basic database tasks. The "best of breed" product in this category is DB-Artisan by Embarcadero Technologies.

For development, Sybase Inc. offers Powerbuilder, Powerdesigner, Power J and its "Studio" line products. Powerbuilder remains the most robust, straightforward, and practical choice for windows development, supporting many other RDBMs in addition to Sybase System 11.

Performance Tests

Back to Main page