Muutke küpsiste eelistusi

E-raamat: Foundation Db2 and Python: Access Db2 with Module-Based API Examples Using Python

  • Formaat: EPUB+DRM
  • Ilmumisaeg: 04-Aug-2021
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484269428
  • Formaat - EPUB+DRM
  • Hind: 67,91 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: EPUB+DRM
  • Ilmumisaeg: 04-Aug-2021
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484269428

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Work with Db2 to write SQL and access databases using optimized code for the fastest response. This book will give you complete documentation on DB2 via Python for the IBM_db module and provide a number of examples for the usage of each module API.

Begin by getting your free version of Db2 for Linux and Windows. While the book concentrates more on the Linux version of Db2, it also covers enough of the Windows version so that you're comfortable with obtaining and installing Db2 on your version of Windows. Next, you'll see how to install the sample database that comes with Db2, and take some data from the web to design a database around it, including tables and indexes.

For Db2 to be really useful you need to use strong SQL expressions. This book provides specific examples of how to avoid using poor ones that can cause extra processing time for the query. Lastly, you'll look at each API in the ibm_db and ibm_db_dbi module. This module is not sponsored by IBM and must be installed separately from the Db2 database.

After reading Foundation Db2 and Python you'll be able to install Db2 on Windows or Linux, and perform backups and restore data. 

What You'll Learn
  • Obtain and install Db2 properly on Linux and Windows
  • Create databases and load them on Db2
  • Work with ibm_db and ibm_db_dbi API modules for Python
  • Write SQL for Db2
  • Review the future of the ibm_db Python module 
Who This Book Is For

Python programmers and DB2 administrators interested in building application with Python and DB2
About the Author xiii
About the Technical Reviewer xv
Chapter 1 Introduction to Db2 1(8)
What Is a Relational Database?
3(3)
The Relational Model
3(1)
Domains
4(1)
Keys and Indexes
4(1)
Relationships
4(1)
Transactions
5(1)
Stored Procedures
5(1)
Constraints
6(1)
Normalization
6(1)
SQL
6(2)
Data Definition Language (DDL)
7(1)
Data Query Language (DQL)
7(1)
Data Control Language (DCL)
7(1)
Data Manipulation Language (DML)
7(1)
The ibm_db Project
8(1)
Summary
8(1)
Chapter 2 Installing Db2 9(14)
My Development Environment
9(1)
Installation Prerequisites
10(1)
Planning the Db2 Install
11(1)
Installing Db2
12(7)
Db2 Post-install Tasks
19(1)
Installing the Db2 Sample Database
20(1)
Summary
21(2)
Chapter 3 Db2 Management 23(22)
Db2 Instances
23(7)
db2ilist
25(1)
Instance Environment Commands
25(1)
Creating an Instance
26(1)
Arranging a Communication Port and Host for an Instance
26(1)
Updating an Instance
27(1)
Upgrading an Instance
28(1)
Dropping an Instance
29(1)
Using Other Commands with an Instance
29(1)
Databases
30(7)
Db2 Catalog Views
31(1)
Locking Event Monitor
31(1)
Tablespace Information
32(1)
Storage Group Control Files
33(1)
Global Configuration File
33(1)
History Files
33(1)
Logging Files
33(1)
Automated Storage Containers
33(1)
Creating a Database
34(1)
Listing Databases
35(1)
Activating a Database
36(1)
Deactivating a Database
36(1)
Connecting to a Database
36(1)
Dropping a Database
36(1)
Tables
37(7)
Table Types
39(1)
Built-in Data Types
39(2)
Creating a Table
41(2)
Alter a Table
43(1)
Other Table SQL Statements
43(1)
Dropping a Table
44(1)
Summary
44(1)
Chapter 4 Database Physical Design 45(10)
Phase 1: Data Gathering and Normalization
46(5)
Data Gathering
46(2)
Data Normalization
48(3)
Business Rules
51(1)
Phase 2: Physical Design of the Database
51(2)
Backups
52(1)
Summary
53(2)
Chapter 5 Db2 Utilities 55(12)
Backup Command
56(3)
What Is a Backup?
56(1)
Backup Verification
57(1)
Advanced Backup Options
57(1)
Backup Syntax
57(2)
Export Command
59(2)
Command syntax
60(1)
Usage Notes
60(1)
Import Command
61(1)
Command Syntax
61(1)
Load Command
62(1)
Command Syntax
62(1)
Restore Command
63(2)
Command Syntax
64(1)
Summary
65(2)
Chapter 6 Business Rules and Constraints 67(10)
NOT NULL Attribute
67(1)
Primary Key
68(1)
Indexes
69(1)
Foreign Keys
70(1)
CHECK and Unique Constraints
71(1)
DEFAULT Constraint
72(1)
Triggers
72(4)
Summary
76(1)
Chapter 7 Writing Good SQL for Db2 77(10)
Relational Theory
77(1)
Reduce Passes Through Data
78(3)
Using Indexes to Increase Performance
81(1)
Sorting and Grouping
81(1)
Programs Containing SQL
82(1)
Use Db2 Utilities Where Possible
83(1)
Db2 Functions
84(2)
Multiple Ways to Code SQL
86(1)
Summary
86(1)
Chapter 8 Python and ibm_db 87(52)
Your First Python ibm_db Program
89(41)
Using Parameter Markers
96(2)
More on Parameter Markers
98(2)
Producing Multiple Reports with Parameter Markers
100(3)
Using Parameter Markers Without Binding Variables
103(3)
Joining Tables
106(3)
Inserts, Updates, and Deletes
109(3)
Some Other ibm_db APIs
112(4)
Creating Database Objects
116(4)
Obtaining Attributes of an Existing Table
120(6)
Obtaining Attributes of a Result Set
126(4)
ibm_db_dbi and Python
130(3)
Where Is the ibm_db Module Going?
133(4)
The ibm_db_dbi Module
134(1)
The Django Database Interface
134(1)
The =Alchemy Adapter
135(1)
The Alembic Adapter
136(1)
The Future
137(1)
Summary
137(2)
Appendix A: Python ibm_db API 139(72)
ibm_db APIs
139(71)
ibm_db.active
139(1)
ibm_db.autocommit
140(1)
ibm_db.bind_param
141(2)
ibm_db.callproc
143(1)
ibm_db.client_info
144(2)
ibm_db.close
146(1)
ibm_db.column_privileges
147(1)
ibm_db.columns
148(3)
ibm_db.commit
151(1)
ibm_db.conn_error
152(1)
ibm_db.conn_errormsg
153(1)
ibm_db.connect
154(3)
ibm_db.createdb
157(1)
ibm_db.createdbNX
158(1)
ibm_db.cursor_type
159(1)
ibm_db.dropdb
160(1)
ibm_db.exec_immediate
160(2)
ibm_db.execute
162(1)
ibm_db.execute_many
163(2)
ibm_db.fetch_tuple
165(1)
ibm_db.fetch_assoc
166(1)
ibmdb.fetch_both
167(1)
ibm_db.fetch_row
168(1)
ibm_db.field_display_size
169(1)
ibm_db.field_name
169(1)
ibm_db.field_num
170(2)
ibm_db.field_precision
172(1)
ibmdb.field_scale
173(1)
ibm_db.field_type
174(1)
ibm_db.field_width
174(1)
ibm_db.foreign_keys
175(3)
ibm_db.free_result
178(1)
ibm_db.free_stmt
179(1)
ibm_db.get_option
179(2)
ibm_db.next_result
181(2)
ibm_db.num_fields
183(1)
ibm_db.num_rows
184(1)
ibm_db.pconnect
185(2)
ibm_db.prepare
187(1)
ibm_db.primary_keys
188(2)
ibm_db.procedure_columns
190(2)
ibm_db.procedures
192(2)
ibm_db.recreatedb
194(1)
ibm db.result
194(1)
ibm_db.rollback
195(1)
bm_db.server_info
196(3)
ibm_db.set_option
199(2)
ibm_db.special_columns
201(2)
ibm_db.statistics
203(3)
ibm_db.stmt_error
206(1)
ibm_db.stmt_errormsg
206(1)
ibm_db.table_privileges
207(2)
ibm_db.tables
209(1)
Summary
210(1)
Index 211
W. David Ashley is a technical writer for SkillSoft where he specializes in open source, particularly Linux. As a member of the Linux Fedora documentation team he recently led the Libvert project documentation, and wrote the Python programs included with it. He has developed in 20 different programming languages during his 30 years as a software developer and IT consultant, including more than 18 years at IBM and 12 years with American Airlines.