Python for Oracle Geeks or, “Just a wafer-thin slice of Python” or, “Python as a Second Language (PSL)” Catherine Devlin IntelliTech Systems.

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advertisements

CF and JSP/Servlets Developed originally by Robi Sen For the CF UnderGround II Seminar, Apr 2001 Edited and enhanced by Charlie Arehart (Robi had an emergency.
How to enter the world of Python Programming for ArcGIS Or, a funny thing happened on the way from an ESRI conference By Katherine Paybins WVAGP Membership.
The Web Warrior Guide to Web Design Technologies
Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann,
Languages for Dynamic Web Documents
The Division of Labor on a Campus Hosting Open Journal Systems and Open Conference Systems.
True IT Solutions For You 1 IT Solutions Software Development and Web Design.
Server-Side vs. Client-Side Scripting Languages
DT211/3 Internet Application Development
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
MC365 JDBC in Servlets. Today We Will Cover: DBVisualizer Using JDBC in servlets Using properties files.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Project Implementation for COSC 5050 Distributed Database Applications Lab1.
Eclipse is an open source IDE (Integrated Development Environment) for developing applications in Java, C/C++, HTML, Cobol, Perl, etc. The official Eclipse.
07/19/04 NorCal OAUG Training Day, Paper 2.4 John Peters, JRPJR, Inc.1 Oracle Workflow Notifications John Peters JRPJR, Inc.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
Intro to PHP Introduction to server-side scripts (It’s all good :D) © TAFE NSW
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
PHP - Hypertext Preprocessor Yaron Benita De Paul University.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 35 – Python Outline 35.1 Introduction First Python Program Python Keywords 35.2 Basic.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
Ling Guo Feb 15, 2010 Database(RDBMS) Software Review Oracle RDBMS (Oracle Cooperation) 4()6 Oracle 10g Express version DB2 (IBM) IBM DB2 Express-C SQL.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Promoting Open Source Software Through Cloud Deployment: Library à la Carte, Heroku, and OSU Michael B. Klein Digital Applications Librarian
Putting What We Learned Into Context – WSGI and Web Frameworks A290/A590, Fall /16/2014.
Python: An Introduction
M1G Introduction to Database Development 6. Building Applications.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
Ruby! Ronald L. Ramos. What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms,
Programming Languages , perfSONAR-PS Developers Meeting Aaron Brown, Maxim Grigoriev, Eric Pouyoul.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
PHP Features. Features Clean syntax. Object-oriented fundamentals. An extensible architecture that encourages innovation. Support for both current and.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
1 Developing WBEM Clients Using Python Tim Potter Hewlett-Packard Company
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
CS105 Computer Programming PYTHON (based on CS 11 Python track: lecture 1, CALTECH)
Philip Repsher October 29 th, 2008 Or Maybe November 3 rd, 2008.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
PHP Introduction PHP is a server-side scripting language.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Collaborative Development Services Learning From the Open Source Agile Development Process Richard Kilmer, InfoEther LLC.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Basic Concepts for Python Web Development. What Does Make Python Different Batter Software QA Developer Productivity Advance Program Portability Support.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
Fundamental of Databases
CST 1101 Problem Solving Using Computers
1Z0-071 Exam : Oracle Database 12c SQL
PYTHON: AN INTRODUCTION
Ch 1. A Python Q&A Session Bernard Chen 2007.
PHP / MySQL Introduction
Introduction to Python
Google App Engine Ying Zou 01/24/2016.
Automate Database Deployment with Python
Intro to PHP.
MATERI PL/SQL Procedures Functions Packages Database Triggers
Web Application Development Using PHP
Presentation transcript:

Python for Oracle Geeks or, “Just a wafer-thin slice of Python” or, “Python as a Second Language (PSL)” Catherine Devlin IntelliTech Systems

Outline ● Brainwashing ● Getting started ● Working with files ● Querying Oracle ● Building Web application

Me S. B. (sic) in Chemical Engineering Oracle DBA since1999 Pythonista since IntelliTech Systems Fairborn, OH

Tasks of a Database Administrator Task 1: Evaluate the Database Server Hardware Task 2: Install the Oracle Database Software Task 3: Plan the Database Task 4: Create and Open the Database Task 5: Back Up the Database Task 6: Enroll System Users Task 7: Implement the Database Design Task 8: Back Up the Fully Functional Database Task 9: Tune Database Performance Task 10: Download and Install Patches Task 11: Roll Out to Additional Hosts From Oracle® Database Administrator's Guide 10g Release 2 (10.2): “I work in the database.” Is that really all you do?

● Data files on filesystem ● Batch files and executables ● System resources (memory, CPU) ● Internet ● Object-oriented programming ● Complex text parsing Sometimes SQL and PL/SQL aren't enough

● Easy to learn and use ● Easy to read and maintain ● Powerful and versatile ● Free of cost! Dear Santa, I have been a very good DBA. For Christmas, I want a language that is... Consider a dynamic language (Perl, PHP, Ruby...)

Easy to learn and use Easy to read and maintain Very readable - “executable pseudocode” Unit testing Powerful and versatile Exception handling, XML Web publishing, Web browsing, Web services, GUI development... Free of cost!

Let's write something! Compare init.ora file to parameters in database db_block_size=8192 -OK- compatible= (live) (file) cursor_sharing=EXACT -OK- Web application

org DEMO

Pitfalls for the Oracle-minded 1. Everything is case-sensitive

object-orientation

Pitfalls for the Oracle-minded 1. Everything is case-sensitive 2. When calling a function, () is not optional

fileParams = { 'log_archive_start': True, 'db_block_size': 8192 } What we want is a table In Python, it's called a 'dictionary' and indicated by {}

STOP IT! Write a script already!

Pitfalls for the Oracle-minded 1. Everything is case-sensitive 2. When calling a function, () is not optional 3. No knee-jerk indenting!

Are you confused about where the “for” block begins and ends? Even though there is no END LOOP? Are you confused about where each command ends? Even though there are no semicolons? Python reads your code the same way your eye does!

Python core You have access without doing anything Standard library You must 'import' into a script or session External modules You must go get and install the code then import

1. Choose a web application platform Albatross, Aquarium, CherryPy, Cymbeline, Django, Draco, Impostor, JOTWeb, Karrigell, mod_python, Nevow, Paste, Python Servlet Engine, PyWork, QLime, Quixote, SkunkWeb, Snakelets, SnakeSkin, Subway, Twisted, TurboGears, WareWeb, WebWare, Zope

1. Choose a web application platform CherryPy – my favorite TurboGears – compare to Ruby on Rails (no Oracle support, yet) Zope – most popular; Web administration Plone – content management 2. Download and install 3. Read the CherryPy tutorial

Pitfalls for the Oracle-minded 1. Everything is case-sensitive 2. When calling a function, () is not optional 3. No knee-jerk indenting! 4. CherryPy tutorial is one version obsolete

Bind variables in cx_Oracle Use a :colon in the SQL string, then send a dictionary as second argument cursor.execute( “””SELECT hiredate FROM emp WHERE ename = :empName”””, {'empName':'SCOTT'})

What's next? Documentation > Tutorial Object-orientation Convenience wrapper: sqlWrap.py Object-relational mapping (a la Oracle TopLink) Exception handling, unit testing,...

References > Topic Guides > Databases tml API.html