Introduction to the basic features and concepts of DB2 database

DB2 is a relational database management system (RDBMS) that is part of the Information Management product family. DB2 is considered the first database product to use SQL, a language that provides an interface to an RDBMS. First released in 1982, DB2 is now available on many operating system platforms, including Linux, UNIX, and Windows.

  DB2 is available in different editions to meet different needs:

  • DB2 Everyplace provides mobile users with a low- footprint , high-performance version of DB2.
  • DB2 for z/OS provides all the features of DB2 to the host system.
  • DB2 for Linux, UNIX and Windows provides several flavors. 1) Enterprise Server Edition (ESE) is a complete RDBMS
     with a client/ server setup. DB2 ESE is suitable for medium and large enterprises.
     2) Workgroup Server Edition (WSE) is primarily intended for small and medium-sized enterprises and provides all DB2 ESE features except mainframe connectivity.
     3) Personal Edition provides a single-user deployment for personal computers.
     4) DB2 Express is a new member of the DB2 family and is available as a free download (if you have not followed the instructions in System Requirements to download DB2 Express, you should download DB2 Express before starting this tutorial). Express is designed for the DB2 community and provides the same core features and functionality as DB2 WSE.

  This article uses DB2 Express based on the latest version, DB2 9.

DB2 databases can be accessed from any application  using Microsoft Open Database Connectivity (ODBC) and Java™ Database Connectivity (JDBC) . Many programming languages ​​can use these APIs, including C, C++, Java, and FORTRAN. In this tutorial, no application is created using the API. For more information on the API, check out the DB2 Information Center site (see Resources for a link).

  Databases can store any type of information, whether relational data (like an employee's name and address) or binary data (like their ID photo). DB2 9 also now supports pureXML™ for easy storage and retrieval of XML data. Utilities can be used to load and maintain data, and queries can be used to retrieve information of interest. Data integrity can be controlled using some of the tools described in this tutorial.

  DB2 tools

  DB2 provides many tools for day-to-day administration and maintenance, which are grouped into command-line tools, general administration tools, information tools, monitoring tools, and setup tools. These tools can be invoked through the Windows Start menu (see Figure 1) or the Tools menu in the Control Center (CC) (described in detail later in this section). Below is a brief description of each type of tool.

  Figure 1. DB2 GUI tools

  DB2 GUI tools

  • Command Line Tools

Including the Command Editor and Command Line Processor (CLP)   described in detail later , and Command Window. The Command Window is used in exactly the same way as the CLP, except that all DB2 commands must be prefixed with 'db2' because the CLP is started in interactive input mode, whereas the Command Window is not.

  • General Administration Tools

  Includes Control Center (discussed later), Journal, Replication Center, and Task Center. Journal can be used to view previous tasks, database operations and messages. Replication Center allows users to manage a database's replication environment. Finally, Task Center can schedule tasks in the form of scripts and notify users of the results.

  • Information tool (Information)

  Includes Information Center, which can be used to find help with any SQL or DB2 command and syntax.

  • Monitoring Tools

  Enables users to monitor the state of the system (either as a snapshot, or for continuous monitoring). Users can use the Event Analyzer to view the output of the Performance Event Monitor. Using Health Center users can view the overall status and health of the database and receive alerts when resources such as memory or locks reach predefined thresholds. The Indoubt Transaction Manager allows users to perform necessary actions on indoubt transactions (transactions that are in an incomplete state due to crashes, etc.). Transactions can be committed, rolled back, or completely removed from the log. Finally, administrators can use the Memory Visualizer to monitor memory-related system and database health, such as current memory usage and allocations.

  • Setup Tools

  Help users set up systems and databases. The Configuration Assistant helps users configure the database so that it can be accessed from different clients or applications. First Steps provides users with information about DB2. In the setup tool, users can also find the option to register the database development environment with Microsoft Visual Studio using the add-on. Finally, Satellite Synchronizer allows users to upload satellite configuration information to the control server.

  DB2 can be administered using a text-based CLP or a graphical user interface (GUI). Control Center is one of the main GUI administration tools, which allows various operations on DB2 objects, such as creation and modification. Most of these tasks can also be performed using the Command Line Processor (CLP), depending on the user's personal preference. The following sections describe the tools used in this tutorial in detail.

  • Command Line Processor

  Command Line Processor (CLP) is a text-based DB2 interface. It allows the user to enter any command and receive text output on standard output. It also provides help with the syntax of any command available on the command line and interprets the SQL code. The following DB2 command example looks at the syntax of the create database command:

  Figure 2. DB2 command line processor

  DB2 Command line processor

  • Control Center

  Control Center (CC) is a GUI-based tool commonly used to manage DB2 systems, databases and objects. Users can use Control Center to create and manage instances, databases, and database objects, as well as configure and tune these instances and databases. Control Center provides wizards to help users create or modify different objects. Control Center provides various object views, which can be modified according to the user's needs. For example, users can filter out a set of operations that can be performed on an object (such as a table) to facilitate routine operations. Use the default view in the Control Center below to see all objects in all databases:

  Figure 3. Control Center using default view

  Control Center using default view

  • Command Editor

  The Command Editor is very similar to the CLP in that it allows the use of text-based commands to manage DB2 databases. It also accepts DB2 commands, SQL statements, and operating system commands. Unlike the CLP, the Command Editor allows the user to copy and paste commands to the clipboard to aid in scripting, as well as easy access to previous commands using the GUI. Here is an example of creating a table using the Command Editor:

  Figure 4. DB2 Command Editor

  DB2 Command Editor

  How DB2 fits into SOA!

  Service-Oriented Architecture (SOA) is a style of software architecture in which services are used to support the needs of users. It enables resources to become independent components, thereby enabling extension and reuse of existing services, tasks and applications. These components can be used to build complex applications to meet the needs of users.

  IBM defines three starting points for SOA: people, process, and information. As the volume of Web-based business increases, so does the need to expose and consume information in databases. DB2 is the key to providing this service. The pureXML technology in DB2 9 allows developers to create XML applications that extend existing technology.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326482798&siteId=291194637