An Improved Approach to Generating Configuration Files from a Database Jon Finke Rensselaer Polytechnic Institute.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

BD05/06 PL/SQL  Introduction  Structure of a block  Variables and types  Accessing the database  Control flow  Cursors  Exceptions  Procedures.
AN INTRODUCTION TO PL/SQL Mehdi Azarmi 1. Introduction PL/SQL is Oracle's procedural language extension to SQL, the non-procedural relational database.
PL/SQL. Introduction to PL/SQL PL/SQL is the procedure extension to Oracle SQL. It is used to access an Oracle database from various environments (e.g.
SQL*PLUS, PLSQL and SQLLDR Ali Obaidi. SQL Advantages High level – Builds on relational algebra and calculus – Powerful operations – Enables automatic.
PL/SQL (Procedural Language extensions to SQL) Prepared by: Manoj Kathpalia Edited by: M V Ramakrishna.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Introduction to SQL Programming Techniques.
Chapter 4B: More Advanced PL/SQL Programming
JMeter Workshop Friday 1 December 2006 Anthony Colebourne IT Services The University of Manchester.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Introduction to PL/SQL Lecture 0 – Self Study Akhtar Ali.
Building Server Behaviors Tom Muck co-author Building Dreamweaver 4 and Dreamweaver UltraDev 4 Extensions.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Introduction to PL/SQL. Procedural Language extension for SQL Oracle Proprietary 3GL Capabilities Integration of SQL Portable within Oracle data bases.
Session Title: Using SQL and PL/SQL for Queries and Reporting Presented By: Stephen Frederic Institution: IHL September 16, 2013.
PL/SQL and the Table API. Benefits of Server-Side Code Speedy Pizza MENU NAPOLITAINE PIZZA Reduced network traffic Maintainability Data integrity Triggers.
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
Distributed Database Applications COSC 5050 Week Three.
BEST PRACTICES - Java By Configuration Use global-forwards/results Helps to avoid duplicate jsp files and redundancy forward mapping.
I Copyright © 2004, Oracle. All rights reserved. Introduction Copyright © 2004, Oracle. All rights reserved.
Stored Procedures, Triggers, Program Access Dr Lisa Ball 2008.
Oracle10g Developer: PL/SQL Programming1 Objectives Programming fundamentals The PL/SQL block Define and declare variables Initialize variables The NOT.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 2 Basic PL/SQL Block Structures.
Accessing MySQL with PHP IDIA 618 Fall 2014 Bridget M. Blodgett.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
XA System-Link A Powerful Development Tool
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
INTRODUCTION TO PL/SQL. Class Agenda Introduction Introduction to PL/SQL Declaring PL/SQL Variable Creating the Executable Section Interacting with the.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to PL/SQL.
Overview · What is PL/SQL · Advantages of PL/SQL · Basic Structure of a PL/SQL Block · Procedure · Function · Anonymous Block · Types of Block · Declaring.
Oracle Data Integrator Procedures, Advanced Workflows.
Session Title: Using SQL and PL/SQL for Queries and Reporting Presented By: Stephen Frederic Institution: IHL September 16, 2014.
Advanced SQL: Cursors & Stored Procedures
PL / SQL By Mohammed Baihan. What is PL/SQL? PL/SQL stands for Procedural Language extension of SQL. PL/SQL is a combination of SQL along with the procedural.
PL/SQL Oracle's Database Programming Language. Remember: Set serveroutput on With serveroutput off (default) executing procedure: With serveroutput on:
1 Copyright © 2004, Oracle. All rights reserved. Introduction to PL/SQL.
CIS4368: Advanced DatabaseSlide # 1 PL/SQL Dr. Peeter KirsSpring, 2003 PL/SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Application Development using PL/SQL Programming.
Experiment Management System CSE 423 Aaron Kloc Jordan Harstad Robert Sorensen Robert Trevino Nicolas Tjioe Status Report Presentation Industry Mentor:
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Implementing The Middle Tier These slides.
CST336, Spring 2015 Week 8: PHP File Upload. PHP provides specific functions to handle binary data such as uploading a file into the server, storing it.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
1 Do You Need an ETL Tool? Ben Bor NZ Ministry of Health Ben Bor NZ Ministry of Health.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Chapter 8 Advanced SQL Pearson Education © Chapter 8 - Objectives How to use the SQL programming language How to use SQL cursors How to create stored.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
Preface IIntroduction Course Objectives I-2 Oracle Complete Solution I-3 Course Agenda I-4 Tables Used in This Course I-5 The Order Entry Schema I-6 The.
1 Copyright © 2004, Oracle. All rights reserved. PL/SQL Programming Concepts: Review.
Slide 1 © 2016, Lera Technologies. All Rights Reserved. Oracle Data Integrator By Lera Technologies.
Slide 1. Reality V12 Slide 3 Reality V12 - Headlines Web Services & XML External File Integration Fast Backup and Recovery Windows Printer Support Reality.
Web Database Programming Using PHP
Fundamental of Databases
SQL and SQL*Plus Interaction
Introduction to PL/SQL Programing
Web Database Programming Using PHP
Oracle11g: PL/SQL Programming Chapter 2 Basic PL/SQL Block Structures.
TYPES OF SERVER. TYPES OF SERVER What is a server.
IBM AS 400 online Training in Hyderabad
PL/SQL week10.
Java Database Connectivity
Chapter 8 Advanced SQL.
PL/SQL Declaring Variables.
MATERI PL/SQL Procedures Functions Packages Database Triggers
Chapter 8 Advanced SQL Pearson Education © 2009.
Enterprise Java Beans.
Created by Atif Aziz. ELMAH means is "Error Logging Modules and Handlers". It is an application-wide error logging facility that is completely pluggable.
Presentation transcript:

An Improved Approach to Generating Configuration Files from a Database Jon Finke Rensselaer Polytechnic Institute

Conclusions Cuts development time –Standard development environment –Host interface written once –Code sharing with web routines –All work done centrally –PL/SQL well integrated to Database Platform independence

The Old Way Custom program for each file type. –Common file system –Small number of platforms –Standard development environment –Lots of cut and paste C coding –Direct access to tables and views

Old Model Relational Database SQL*NET File Format Logic Version Control SQL*NET File Format Logic Version Control

The Problems Loss of common file system –Harder to distribute custom programs Multiple development environments Program logic unavailable to web applications. Minor file format changes require too much work.

New Model SQL*NET Version Control SQL*NET Version ControlFile Format Logic Relational Database Switcher File Format Logic

New Way File format logic stored in DB –Changes made centrally Generic file extraction program –No changes after installation –Platform independence Code sharing with web applications PL/SQL programs are shorter –Faster to write

Stored Procedures and Packages PL/SQL –Procedural extension to SQL Simple Procedure or Function Package –Set of procedures and functions –maintains state Stored and executed by database server

PL/SQL Variables and Constants SQL built in functions –String, Numeric, Date Conditionals Looping Constructs Exception Handling Records

Generic Program Get Filename Null? Done Start Open File Get Line Null? Write Line Version?

“Switcher” functions Standard API for generic program Provides access control Provide filename for simple cases –Also direction, and other attributes Grouping of multiple simple files Environment info for specific file generator routines.

Switcher Get_Filename Record? Return Null Access OK? Return Error Get Next Target Rec Simple? Open? Open Target Rec Files>0? Return Rec.GetFname() Return Rec.Filename

Target Record Target Name, Sequence Number Access List Get Data Routine Name Get FileName Routine Name (C) FileName (S) Direction, DBMS_OUT Flag (S) Version Info (S)

Get_Data (1) Cursor Get_Records is Select Username, Uid Gid, Gecos, Shell, Path from Logins;... Procedure Get_Data(Result out varchar2) is RGet_Records%RowType begin if not Get_Records%IsOpen then Open Get_Records; end if;

Get_Data (2) Fetch Get_Records into R; if Get_Records%NotFound then Close Get_Records; Result := Null; else Result := R.Username || ‘:*:’ || R.Uid || ‘:’ || R.Gid || ‘:’ || R.Gecos || ‘:’ || R.Path || ‘:’ || R.shell; end if; return;

Complex Targets Get_FileName –Like Get_Data –Stashes context info for Get_Data –Provides version info (optionally) Keep calling until no more files. For each file, call Get_Data until no more data.

More Conclusions Replacing existing custom programs Loading data as well as extraction Handler for back end processing –File “STDOUT” Wish I had done this long ago

Package Design Relational Database Tables WP Table Routines WP Web WP File Web ServerFile Gen

Files Currently Generated White Pages –LaTeX, HTML, LDIF, ph, CSV Hostmaster –Resource Record (bind) –Hostfile –DHCP Config TSM Billing –Error Reports

Files Currently Loaded TSM (Backup/archive) –Accounting Records White Pages –CSV staff list (remote campus) Terminal Server –Accounting logs lpd (printing) –Accounting logs

Futures GET from program PUT to program Boilerplate management Call file generation from Web –Faster development for web pages –Alternate Boilerplate testing More platforms

An Improved Approach to Generating Configuration Files from a Database Jon Finke Rensselaer Polytechnic Institute