ISU-GIS Training and Research Center

Slides:



Advertisements
Similar presentations
Introduction to IBM DB2 Keith T. Weber GIS Director- Idaho State University.
Advertisements

Chapter 10: Designing Databases
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Physical DataBase Design
Lecture-7/ T. Nouf Almujally
IBM Software Group ® Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
Advance Database System
File System Implementation
Oracle 10g Database Administrator: Implementation and Administration
1 Storing Data: Disks and Files Yanlei Diao UMass Amherst Feb 15, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Data Sources Data Warehouse Analysis Results Data visualisation Analytical tools OLAP Data Mining Overview of Business Intelligence Data visualisation.
VMware vCenter Server Module 4.
Layers of a DBMS Query optimization Execution engine Files and access methods Buffer management Disk space management Query Processor Query execution plan.

Overview of SQL Server Alka Arora.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
OLAP Theory-English version On-Line Analytical processing (Buisness Intelligence) [Ing.Skorkovský,CSc] KPH_ESF_MU.
OLAP Theory-English version On-Line Analytical processing (Buisness Intzlligence) [Ing.Skorkovský,CSc] KPH_ESF_MU.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
Sizing Basics  Why Size?  When to size  Sizing issues:  Bits and Bytes  Blocks (aka pages) of Data  Different Data types  Row Size  Table Sizing.
OLAP & DSS SUPPORT IN DATA WAREHOUSE By - Pooja Sinha Kaushalya Bakde.
IT:Network:Applications.  “Business runs on databases…” ◦ Understatement!  Requirements  Installation  Creating Databases  SIMPLE query ◦ Just enough.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Data resource management
Esri UC 2014 | Technical Workshop | Editing Versioned Geodatabases : An Introduction Cheryl Cleghorn and Shawn Thorne.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
Fundamentals of Information Systems, Sixth Edition Chapter 3 Database Systems, Data Centers, and Business Intelligence.
Enterprise Database Systems Introduction to SQL Server Dr. Georgia Garani Dr. Theodoros Mitakos Technological.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 12: File System Implementation.
Data Mining & OLAP What is Data Mining? Data Mining is the set of activities used to find new, hidden, or unexpected patterns in data.
Aga Private computer Institute Prepared by: Srwa Mohammad
CS222: Principles of Data Management Lecture #4 Catalogs, Buffer Manager, File Organizations Instructor: Chen Li.
C LANGUAGE MULITPLE CHOICE QUESTION SET-2
Michal Kvet Lucia Fidesová
Module 11: File Structure
Record Storage, File Organization, and Indexes
Chapter 6: Data Types Lectures # 10.
SQL Server 2000 and Access 2000 limits
Attributes and Domains
Creating an Oracle Database
Database Management Systems (CS 564)
Introduction What is a Database?.
Fundamentals of Information Systems
A Closer Look at Instruction Set Architectures
9/12/2018.
Database Performance Tuning and Query Optimization
Introduction of Week 3 Assignment Discussion
DATABASE MANAGEMENT SYSTEM
Disk Storage, Basic File Structures, and Hashing
Disk Storage, Basic File Structures, and Buffer Management
MANAGING DATA RESOURCES
Database Implementation Issues
Introduction to Database Systems
ISU-GIS Training and Research Center
CS222/CS122C: Principles of Data Management Lecture #4 Catalogs, File Organizations Instructor: Chen Li.
DATABASE IMPLEMENTATION ISSUES
Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
OLAP in DWH Ján Genči PDT.
Introduction to Data Structure
Chapter 11 Database Performance Tuning and Query Optimization
CS222p: Principles of Data Management Lecture #4 Catalogs, File Organizations Instructor: Chen Li.
Large Object Datatypes
Chapter 14: File-System Implementation
Database System Architectures
Database Implementation Issues
Database & Information Systems
CS222/CS122C: Principles of Data Management UCI, Fall 2018 Notes #03 Row/Column Stores, Heap Files, Buffer Manager, Catalogs Instructor: Chen Li.
Database Implementation Issues
Presentation transcript:

ISU-GIS Training and Research Center Introduction to IBM DB2 IT4GIS Keith T. Weber, GISP GIS Director ISU-GIS Training and Research Center

What is it? IBM DB2 (Database 2) An object-relational database: No software limitations (e.g., size of database, number of tables, number of entities per table). Very scalable (it can grow to fit your needs). Efficient for numerous concurrent clients

Concurrent Clients GIS for the Enterprise Potential concurrent clients

Server Installation The amount of random-access memory (RAM) required to run any edition of DB2 is 512 MB. 1 GB is recommended for improved performance Required disk space depends on type of installation and type of file system

Professional Tips Administration password DBADMIN ADMINISTRATOR

DB2 Editions

Personal Configuration Personal Edition DB2 Personal Edition is a single-user version of the full DB2 product. Has most features available in Express Edition Remote clients cannot connect to this edition Can be remotely administered with DB2 administration tools Net Search Extender Spatial Extender OLAP: OLAP AND OLAP SERVER DEFINITIONS OLAP: ON-LINE ANALYTICAL PROCESSING Defined terms On-Line Analytical Processing (OLAP) is a category of software technology that enables analysts, managers and executives to gain insight into data through fast, consistent, interactive access to a wide variety of possible views of information that has been transformed from raw data to reflect the real dimensionality of the enterprise as understood by the user. OLAP functionality is characterized by dynamic multi-dimensional analysis of consolidated enterprise data supporting end user analytical and navigational activities including: calculations and modeling applied across dimensions, through hierarchies and/or across members trend analysis over sequential time periods slicing subsets for on-screen viewing drill-down to deeper levels of consolidation reach-through to underlying detail data rotation to new dimensional comparisons in the viewing area OLAP is implemented in a multi-user client/server mode and offers consistently rapid response to queries, regardless of database size and complexity. OLAP helps the user synthesize enterprise information through comparative, personalized viewing, as well as through analysis of historical and projected data in various "what-if" data model scenarios. This is achieved through use of an OLAP Server. OLAP SERVER An OLAP server is a high-capacity, multi-user data manipulation engine specifically designed to support and operate on multi-dimensional data structures. A multi-dimensional structure is arranged so that every data item is located and accessed based on the intersection of the dimension members which define that item. The design of the server and the structure of the data are optimized for rapid ad-hoc information retrieval in any orientation, as well as for fast, flexible calculation and transformation of raw data based on formulaic relationships. The OLAP Server may either physically stage the processed multi-dimensional information to deliver consistent and rapid response times to end users, or it may populate its data structures in real-time from relational or other databases, or offer a choice of both. Given the current state of technology and the end user requirement for consistent and rapid response times, staging the multi-dimensional data in the OLAP Server is often the preferred method.

Express Configuration Express Edition Built in autonomic manageability features Supports high availability (HA) architectures Net Search and Spatial Extenders pureXML Homogeneous federation Scalable with Features Packs

Workgroup Configuration Workgroup Server Edition Contains all of Express Edition Includes High Availability Feature Pack Online table reorganizations Tivoli System Automation (TSA) high availability services Support for DB2 advanced copy services High Availability Disaster Recovery (HADR)

Enterprise Configuration Enterprise Server Edition DB2 Enterprise Edition is designed for large databases with many users. It contains all the functionality of the Workgroup Edition, plus: A license for an unlimited number of client connections Includes services for parallelism, MDCs, MQTs, table partitioning and more Scalable with additional Feature Packs

Professional Tips DB2 licensed per CPU in your server Consider DBA overhead Oracle is DBA intensive SQL Server least overhead DB2 to date…

DBA GUI based database administration Alternatively, command prompt can be used.

Creating Databases/tables Use the Control Center A database can be a new instance of DB2 The name you specify must be 1 to 8 characters in length To avoid potential problems: do not use the special characters @, #, and $ in a database name if you intend to have a client remotely connect to a host database. Also, because these characters are not common to all keyboards, do not use them if you plan to use the database in another country. On Windows NT-based systems (8, 10, Server 2008, etc.), ensure that no instance name is the same as a service name. How do you check services? Open services file with NOTEPAD, found in OS folder, under sys32/drivers/etc How do you check this?

Checking Service Names C:\Windows\System32\drivers\etc

Pre-fetched into the buffer pool? DB2 Specifics Pre-fetch Buffer pools Table data pages Pre-fetched into the buffer pool? What is pre-fetch size? Advance reading of data pages to minimize repeated IO traffic Buffer pools: Amt of main memory on the server allocated to the cache table (the table storing pre-fetched data), index, and catalog table pages information. Table data pages: The size of each table page. 255 records are stored on each page. All fields (attributes) for each record are included save for the LONG character or LONG special types in which only a pointer or descriptor is stored on the page. Page sizes usually range from 4kb, 8kb, 16kb, to 32kb. The three specifics greatly effect the efficiency and speed of DB2. To determine table data pages you must know the data types and their storage requirements.

DB2 Data Types (Numeric) FOR BIT DATA (boolean) BYTE (0-255) SMALLINT (-32,768 to 32,767 ) INTEGER (-2,147,483,648 to 2,147,483,647) FLOAT <n> (2 types) DOUBLE PRECISION <np,ns> For Bit Data (Boolean)- storage space = 2-bytes SmallInt (Byte)- storage space = 1 byte Integer (Int)- storage space = 2-bytes BigInt (long)- storage space = 4-bytes Float- Floating point data. Single precision: A data type that stores single-precision floating-point variables as 32-bit (4-byte) floating-point numbers, ranging in value from -3.402823E38 to -1.401298E-45 for negative values, and 1.401298E-45 to 3.402823E38 for positive values. Storage space is 4 bytes. Double precision:A data type that holds double-precision floating-point numbers as 64-bit numbers in the range -1.79769313486232E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values. Storage space is 8-byte. Decimal data type. Parameters are: integer number for precision (0-31), integer number for scale (0-np) Scale is by power of 10. A data type that contains decimal numbers scaled by a power of 10. For zero-scaled numbers, that is, numbers with no decimal places, the range is +/-79,228,162,514,264,337,593,543,950,335. For numbers with 28 decimal places the range is +/-7.9228162514264337593543950335. The smallest non-zero number that can be represented as a Decimal is 0.0000000000000000000000000001. Storage space: numeric storage size of 16 bytes

DB2 Parameters in ArcGIS FLOAT < np,ns > nprecision(total field length) = 1-6 nscale (decimal places) = 1-6 np,ns = 5,3  26.589 is OK, 256.381 is not Five (5) total characters 2 6 . 5 8 9

Parameters (cont’d) DOUBLE PRECISION <np,ns> np = 7 or more ns = 0 or more

DB2 Data Types (Character) CHARACTER<n> VARCHAR<n> Character- 1-254 VarChar- varying length, and varying space requirements. 1-32,672 Long VarChar- up to 32,700. User does not specify the max length.

Parameters (cont’d) CHARACTER<n> (AKA, String or Text) Example a field named “URL” with n = 46 http://giscenter.isu.edu/training/it4gis.htm

DB2 Data Types (Special) DATE TIME TIMESTAMP

DB2 Data Types (Special) Stored in special System managed tables BLOB<n[K|M|G]> CLOB<n[K|M|G]> DBCLOB<n[K|M|G]> GRAPHIC<n> VARGRAPHIC<n> BLOB- Binary large object, maximum length or size is n, expressed as Kilobytes, Megabytes, or Gigabytes). Absolute max is 2GB for each data value. CLOB- Character large object (same parameters) DBCLOB- Double byte character large object. (same parameters, however max is now 1GB of double characters) GRAPHIC- Fixed length graphic string, n = 1-127 VARGRAPHIC- Variable length graphic string- 1-16336 LONG VARGRAPHIC- Varying length graphic string- 1-16,350 DATE- store a date that can be used for date arithmetic TIME- Store a time that can be used for time arithmetic TIMESTAMP- timestamp…DB2 generated. DATALINK- for data stored outside the database. N is the number of characters describing the link All data type with LONG (character and special) use 32KB page areas each. This includes the LOB’s as well. They are not stored within the data pages however. Just a descriptor or a pointer is stored in the page.

Table Data Pages All fields with standard data types for each record are contained within a single data page. There is a maximum of 255 records stored on each page. The ART of efficient data modeling is to minimize wasted space on a page while maximizing the proportion of each page written.

An Instance Example 200 records per 4kb page will fit. number of fields KB per record page size KB for 255 records records at page size KB USED KB WASTED 100 GB TABLE SPACE 10 0.02 4 5.1 200 0 GB WASTED 8 255 2.9 29 GB WASTED 200 records per 4kb page will fit. 255 per 8 kb page. However, all the available space will not be used that has been allocated. The number of pages does not matter too much (within reason), however the efficiency of each page is important to overall DB performance and overall size  backup  IO etc. Each table must be evaluated similarly. 4kb will NOT be best for all instances!

DB2 for GIS DB2 Spatial Extender lets you integrate geographic data with your existing business data. It includes: Data types such as points, lines, and polygons Functions such as area, endpoint, and intersect An indexing scheme for spatial data This product is available for all editions of DB2 Details regarding data storage architecture, pre-fetch, and specifically table page space will be addressed when we talk about SDE later in this semester. However, I will tell you that the spatial extender is an example of object-relational databases (ORDBMS) which we will learn more about in the weeks to come.

Questions?

Key Concepts Understand that while data is stored in tables, the tables span TABLE PAGES Understand what PRE-FETCH and CACHE are…and how they differ. Understand DB2 specific data types

Your Assignment Read IBM DB2 Ref (PDF) Complete the exercise Design table pages with the “DB2 Database Administration” exercise