Archive for December, 2009
CSV data with Python/pureXML
This tutorial is geared towards developers who want to learn how to store data in XML format in a database, connect to DB2 from a Python application, and learn how to convert data from CSV files into XML documents. No prior knowledge of Python is assumed (you will learn how to install it in this tutorial), but it would be advantageous. This tutorial assumes that you use a Microsoft® Windows® operating system, but the code should work on other platforms without modification. When you complete this tutorial, you will have the skills to create powerful Python applications that can communicate and interact with an IBM DB2 database and harness the power that pureXML offers.
IBM® DB2® pureXML® allows you to store XML data natively in a relational database management system, giving you the power and flexibility to report on this data without disturbing the advantages that its XML format offers. In this tutorial, you will learn how to connect to a DB2 database from the Python programming language, importing data about population from the United States Census Bureau. You will use Python to convert this CSV file into XML, before inserting this XML data natively into DB2. Finally, you will use Python to create a command-line application that produces some informative tables that you can access through a menu system.
Read the tutorial at http://www.ibm.com/developerworks/xml/tutorials/x-csvdb2pytut/
Beginning CouchDB is out now
My book “Beginning CouchDB” is now available in the United States, and should be available internationally in the coming days. The final manuscript comes in at exactly 300 pages, and features everything you need to know to get started with the Apache CouchDB database – from installing it on Mac OS X or Linux to creating applications that work with CouchDB data using JavaScript, Python and Ruby. The following are links to Websites where you can purchase the book:
Amazon.com
Barnes & Noble
Borders
Books-A-Million
Amazon.co.uk
Waterstones
WHSmith
Apress (Buy e-Book Version for $27.99)
The following is the Table of Contents for the completed work:
- About the Author
- About the Technical Reviewer
- Acknowledgements
- Introduction
- Part 1: Getting Started
- Chapter 1: Introduction to CouchDB
- What is CouchDB?
- CouchDB: The Story So Far
- Document-Oriented Databases
- CouchDB Documents
- The JavaScript View Engine
- Restful HTTP API
- Futon
- So…Now What?
- Chapter 2: Installing CouchDB on Linux
- Installing CouchDB on Ubuntu Linux 8.10
- Installing CouchDB on Fedora Linux Using yum
- Building CouchDB (and Prerequisites) from Source Code
- Building Erlang
- Building libcurl
- Building ICU
- Building Spidermonkey
- Building Subversion
- Building CouchDB
- Chapter 3: Installing CouchDB on Mac OS X
- Installing the Xcode Developer Tools
- Installing Macports
- Installing CouchDB
- CouchDBX: A One-Click CouchDB Package for Mac OS X
- Chapter 4: Creating Your First CouchDB Database
- Tools of the Trade
- HTTP Requests
- JSON Response
- Using curl
- Creating Your First Database
- Creating Documents in Your Contacts Database
- Getting Started with CouchDB Views
- Summary
- Chapter 1: Introduction to CouchDB
- Part 2: Managing CouchDB Databases
- Chapter 5: Using Futon: The CouchDB Administration Interface
- Creating a Database
- Creating a Document
- Uploading Attachments
- Compacting the Database
- Futon Tools
- Summary
- Chapter 6: Introduction to JSON
- What is JSON?
- Why JSON?
- JSON 101: Syntax and Data Types
- Working with JSON
- Defining JSON Structures
- Looping Through JSON Arrays
- CouchDB and JSON
- Summary
- Chapter 7: Introduction to CouchDB Views
- Creating Views
- Permanent Views
- Design Documents
- Views and the CouchDB API
- Summary
- Chapter 8: Map/Reduce
- What is Map/Reduce?
- Map/Reduce in CouchDB
- Map/Reduce in Futon
- Map/Reduce Views and the CouchDB API
- Map/Reduce vs. SQL Queries
- Word Count Example
- Summary
- Chapter 9: Advanced CouchDB Views
- Advanced Aggregation
- Ordering and Filtering Results
- Working with Related Data
- Summary
- Chapter 5: Using Futon: The CouchDB Administration Interface
- Part 3: Advanced CouchDB Topics
- Chapter 10: Developing CouchDB Applications with CouchApp
- Installing CouchApp
- Your First CouchApp
- Creating CouchTasks: A Simple Task Manager
- Suggested Improvements
- Summary
- Chapter 11: Developing Applications with CouchDB
- Developing in Python with Couchdbkit
- Developing in Ruby with CouchRest
- Creating a Bookmarks Application with CouchDB and Django
- Summary
- Chapter 12: Advanced CouchDB Topics
- Replication
- Compaction
- Fetching Documents in Bulk
- Writing Documents in Bulk
- Show Functions
- Summary
- Chapter 13: Mechanics of CouchDB Deployment
- Measuring Performance
- Configuring CouchDB
- Conflict Resolution
- Security
- Backup
- Fault Tolerance and Load Balancing
- Clustering
- Summary
- Chapter 10: Developing CouchDB Applications with CouchApp
- Appendices
- Appendix A: CouchDB API Reference
- Appendix B: HTTP and curl Reference
- Index
Store Locator in ASP.NET
This tutorial is geared towards developers who want to learn how to store data in XML format in a database, connect to DB2 from a .NET application, and learn how to develop applications that leverage mapping APIs. To follow this tutorial, familiarity with the .NET framework and C# is recommended. You should also have some experience of developing with HTML and/or XML, and of communicating with a database management system using SQL. When you complete this tutorial, you will have the skills to create map-enabled .NET applications powered by a DB2 database using pureXML® to store XML natively.
We live in a connected and open world, one where data flows freely and where a vast amount of useful information can be found on the Web. In the past, if you wanted to find where the nearest store for your favorite retailer was located, you would probably look it up in the telephone directory, find the company’s phone number, call them, and ask for directions to their nearest outlet. This method is a recipe for getting lost, wasting time, and a general frustration for the customer. Today, however, this has all changed. Now you simply open your Web browser and visit the company’s Web site, where you can usually find a “Store Locator” feature that will help you find the store nearest to you, and conveniently plot it on a map to make it easier to find. In this tutorial, you will learn to develop such a feature using C# ASP.NET and an IBM DB2® database.
Read the tutorial at http://www.ibm.com/developerworks/xml/tutorials/x-purexmlasptut/
