Oracle PL/SQL Best Practices
started 8/18/2003; 8:52:36 AM - last post 8/21/2003; 6:02:44 PM
|
|
Chris Rathman - Oracle PL/SQL Best Practices
8/18/2003; 8:52:36 AM (reads: 1522, responses: 2)
|
|
Oracle PL/SQL Best Practices |
Getting ready for a full out assault on Oracle, so I've been reading a lot of PL/SQL material. Had Feuerstein's book recommended as a way to get a quick immersion into the Oracle programming culture. The book is comprised of 120 suggestions of things to-do and not-to-do. Some rather pedantic, but by and large informative, being an authoritative source for PL/SQL best practices. Having completed the text, I'd also recommend it to anyone using PL/SQL.
From a programming language standpoint, I find the genre of Best Practices or Style Guides to be interesting. Some languages have a text that serves the purpose of both defining and setting the style used for the language - K&R comes to mind. My favorite guide would have to be Smalltalk With Style which is an in-depth look at the best practices that have informally cropped up in the Smalltalk world.
Posted to Misc-Books by Chris Rathman on 8/18/03; 8:53:44 AM
|
|
|
|
Chris Rathman - Re: Oracle PL/SQL Best Practices
8/18/2003; 5:18:26 PM (reads: 625, responses: 0)
|
|
Just for the sake of trivial pursuit, here's the OO Shapes in PL/SQL. Oracle 9i has improved classes significantly from 8i. Inheritance and Constructors have been added, though oddly enuf constructors can't be inherited by a subclass - odd how many languages seem to get this mucked up.
On a more general level, I don't see how Oracle gracefully handles updates to the methods of classes. The problem is that as it stores off data - in this case properties of the object, it does not store off the version for an object. If you add properties or revise the methods of the Object, you're left with the possibility of stranded objects. For example, if you add a public method to a superclass, you have to delete all the subclasses first. Before you can delete all the subclasses, you first have to delete all the objects cut from these classes.
Maybe I'm missing something obvious, but there does seem to be a certain fragility in objects. Better get the class definition right before you start saving off a bunch of objects.
|
|
Chris Rathman - Re: Oracle PL/SQL Best Practices
8/21/2003; 6:02:44 PM (reads: 541, responses: 0)
|
|
Probably not the proper venue to be asking questions about Objects in Oracle, but on the off chance that someone might know... :-)
Got into a discussion about downcasting with TREAT in PL/SQL. Treat Doesn't seem to work as a true downcast operator, requiring assignment that seems to do a copy operation. Most OOP languages just use a simple cast operation to achieve the effect, so in Java you might have:
myRectangle = (Rectangle)shapeArray[0];
I would have thought Treat would do the same for PL/SQL but it seems kind of funky.
|
|
|
|