|
Newsletters
(November, 1999)
- EXPERIENCE IS FREEWARE
- THE CHALLENGES OF ORACLE8
- VIKINGS IN WILLHELM TELL’S COUNTRY
EXPERIENCE IS FREEWARE Tilbage
123
When you begin to study French, the teacher will say: Horse is cheval, and so it is all the way. In application programming you can say: Experience you gained far away from the present technical surroundings and context can be used directly – and freely integrated as an enhancement to the project.
IN THE PAST
The good old days: Back in 1985 - 1989 I worked for the Danish airline SAS as freshly graduated. My project in brief was concerned about setting the “optimal” booking level by departure for all the company’s flights. Find the balance between cost of an empty seat and the cost of a denied boarding, i.e. an angry left over passenger. This problem is rather nice and interesting from a mathematical point of view, and a number of suitable algorithms based on passenger statistical behaviour and fares etc. is at hand for solving it.
I practised the models where they were to be implemented in the booking system, regularly sending messages adjusting the number of available seats. The booking system was then (and still is) developed and run on a UNISYS mainframe, characterised by heavy transaction volume (24 hours a day), programmed in FORTRAN and against a relatively simple hierarchical database. Implementing the optimising model demanded reading and updating large amounts of data, so we were forced to find a manageable way of locking and releasing updated data. Any experienced mainframe programmer knows that this “commit” strategy is essential, indeed it determines whether it is possible to run the application.
THE GOOD MODERN DAYS
A recent example, concerning a SAP R/3 installation at the national representation of a well-known German car producer. The company is primarily a sales organisation, so the number of implemented modules is limited, though there is a good package of inhouse developed non-standard programs. Part of this is con-cerned with the matter of importing data from the German mother company, determining models, equipment etc.. A task for the author was to try to improve these import modules - typically an import executed for more than 28 hours(!), during this period the sys-tem was not to be used.
One step in the program concerns deletion of old data, and against a modern relational database, queries written in SQL such as deletion might look like (pseudo coding):
Delete rows where rows are “old”
The syntax is right, the database is optimally configured on highspeed servers etc.. And the deletion lasted 6 hours.
The “old” mainframe programmer would ask: How many rows are to be deleted, and what is the “commit”-strategy? The answer: about 500’000 records and the commit is done right in the next sentence. In other words 500’000 updates without commit - it simply would not work. We must split the deletion into parts, the coding could be like this:
1) Delete first 1000 rows where rows are “old”. 2) Commit the deletion from 1). 3) Are there any “old” left? If yes, go to 1), otherwise finished.
This simple rewriting made the execution time shrink from 28 hours to 20 minutes! Now you can go on using your system! A FINAL EXAMPLE
At a producer of payphones, mail-systems etc., running an SAP R/3, a number of rows in the material master is to be “flagged” on certain conditions. The simple (and syntax correct) code is:
Update rows where conditions are fulfilled.
The code is within 10 lines - head-ings included. Even though the number of rows are limited to 5000, I split (as told by experience) the code in steps. The split coding will perform ade-quately, even if the number of rows rises drastically.
CONCLUSION
Cheval is still horse – and so it is all the way.
THE CHALLENGES OF ORACLE8 Tilbage
123
The world of professional Oracle development has changed forever. The combination of the technology of the Oracle8/8i servers and the current version of various Oracle development tools will change the process of developing applications for Oracle fundamentally.
When using the word "Paradigm" in a computer science context, it is often understood as the basic principles on which developers base their work. According to a popular dictionary (www.m-w.com), the word is defined as “an outstandingly clear or typical example or archetype” or “a philosophical and theoretical frame-work...". When applying this definition to the world of Oracle development, these definitions could be interpreted as the basic standards, methods and principles on which systems are based. This article point to various differences in the current state of Oracle technology compared to earlier. The differences will gradually introduce major changes in approach to designing and programming systems for Oracle.
At the early stages in the development cycle, the introduction and support of the "Unified Modelling Language" (UML) in the Oracle Designer suite of tools adds a fundamentally new approach to systems development based on this tool. UML was developed by well-known object-oriented "gurus" Grady Booch and Jim Rumbaugh in an attempt to create a single approach to system analysis and design based on an object-oriented philosophy. UML is widely accepted outside of the Oracle community and is designed to be independent of programming languages and development processes. Version 6 of Oracle Designer supports a subset of UML that corresponds to the object-oriented features of Oracle8i, but is not a full implementation of UML. Nevertheless UML represents the only way of working with the object-oriented features of the Oracle8 Server from Oracle Designer.
The Oracle8 Server has had basic object-oriented features added and the ability to define and use user-defined data types. This may seem a relatively small and evolutionary change, but it affects the basic design of physical database structures and adds a new and complex set of SQL operations on these structures. This will affect even the process of normalisation, a very basic design technique. As an example, the following small and simple code snippet will frustrate even experienced SQL developers not familiar with these new features.
Select Tab.name Name ,Tab.birthdate Birthdate from the ( select cast(GetPerson() as Person) from dual ) Tab
For the uninitiated, this small query selects data from a userdefined table type. Designing, programming, testing and tuning SQL based on Oracle8 object types and other userdefined data types is much more complex than SQL based on a pure relational data layout.
Starting with the 8i versions of the Oracle Server, it is possible to write database stored procedures using the Java programming language. Although Java is mostly associated with the Internet and World Wide Web, it does not have to be used in this context in the Oracle Server. This is an alternative to writing stored procedures using the Oracle PL/SQL programming language but the two approaches may be mixed, as they are callable from each other. Until now, the use of PL/SQL has permeated every aspect of programming an Oracle server and it has been used at the server and client side. But with the introduction of stored procedures written in Java, PL/SQL does not monopolise Oracle programming anymore. One of the main advantages of PL/SQL is the simple, yet powerful interaction with the Oracle Server it supports. No doubt, Java programming has its own advantages, but simplicity is surely not one of them.
The addition of object oriented features to the Oracle8 Server means that an en-tirely new discipline has to be added to the development cycle, a discipline that could be named "Object Mapping". It is simply the question of maintaining a consistent representa
VIKINGS IN WILLHELM TELL’S COUNTRY Tilbage
123
Due to our business connections in Denmark and Switzerland we also exchange know-how between these countries. With this advantage we can provide our customers with even more experienced Consultants.
For this article I talked to Mrs. Liselotte Grann about her experience of working and settling down in another country.
Why did you decide to work in Switzerland?
I always wanted to work somewhere in Europe where I could use and improve my English or German knowledge. On top of that I was always fas-cinated by the Alps. I love nature and skiing is another passion of mine. Through a Danish job agency I got the opportunity to work for Contracters AG in Switzerland.
Your home is in Goldau/SZ at the bottom of the mountain range “Rigi”. What was your first impression when you moved from Denmark to Switzerland?
Just beautiful! I live very close to the mountains. Every day nature looks different. Switzerland is less windy than Denmark, except during “Föhn” weather, and the climate is milder.
Since over 2 years you have been living in Switzerland, what do you appreciate about this country?
Most Swiss are very polite. I think many Danish could learn from this behaviour. And of course the low taxes. Danish taxes are incredibly high.
What do you dislike in Switzerland?
For a foreigner the state system is quiet complicated. Switzerland is subdivided into cantons and communities. Often the rules change from one canton to another, even to another village. And if you need some specific information too many people must be involved to get the right answer. Another disadvantage is that I must live in the canton of Schwyz because I possess a working permit of this canton. If Switzerland were a member of the EU, I could live in any village or town.
Is there anything you miss from Denmark?
My family and friends.
What is your counterbalance to your job?
Of course skiing. It is absolutely great to have the opportunity to choose nearly every weekend another ski resort. As I already played active handball in Denmark it was also obvious to join a handball team in Schwyz. From the very beginning I was accepted by my partners. We are a great team with a very good team spirit. Our biggest success was last season when we ascended to the 1st national league. Everybody who moves to another country and wants to meet the locals should join a sports club. I can just recommend it!
Liselotte Grann
Application Developer, works as an IBM Mainframe Consultant for Contracters AG
Career 1985-1986: Syscon Software Center A/S 1986-1990: ADM-DATA ApS 1990-1995: Skandinavisk Tobakskompagni A/S 1995-1997: Den Danske Bank A/S 1997: Start with Contracters AG
Special know-how Analysis and programming in PL/1, Cobol, CSP, Natural/Adabas and CICS
In Scandinavia you already worked in different projects. What is the biggest difference to the projects in Switzerland?
Many years ago the tendency in Denmark was to centralise the work, e.g. in a project the responsibility was divided into analysts, programmers etc. This philosophy tended to be less successful as a lot of information between analysts/end users and the developers got lost or forgotten, e.g. during the programming phase there often arose questions and problems which actually belonged in the analyst phase. The new trend in Denmark is to build smaller projects and to involve the whole team in all project phases. Of course in this case it is even more important that the whole team stays together from the beginning to the very end of the project. I hope in the future this trend will also be copied in Switzerland in order to save money, time and motivate the team with this great challenge to realise projects from A to Z.
Return to Newsletters
|