For Programmers: Free Programming Magazines  


Home > Archive > Cobol > December 2007 > Relational Database









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Relational Database
Pete Dashwood

2007-12-17, 6:56 pm

I'd like to draw your attention to a short article I found very interesting,
about databases in general and RDB in particular. I use MySQL quite a bit
and find it to be very responsive and, for a free product, excellent.

As some of you know I have been reticent for some time about the wisdom of
embedded SQL, and I see it as coming to the end of its usefulness. This
raises the question: "So, if we don't embed DB connections into our code,
how SHOULD we access databases?"

I think some of the concepts surrounding this are covered in the article.

http://www.drdobbs.com/database/202802994

Pete.

--
"I used to write COBOL...now I can do anything."


Robert

2007-12-18, 3:55 am

On Tue, 18 Dec 2007 12:19:17 +1300, "Pete Dashwood" <dashwood@removethis.enternet.co.nz>
wrote:

>I'd like to draw your attention to a short article I found very interesting,
>about databases in general and RDB in particular. I use MySQL quite a bit
>and find it to be very responsive and, for a free product, excellent.
>
>As some of you know I have been reticent for some time about the wisdom of
>embedded SQL, and I see it as coming to the end of its usefulness. This
>raises the question: "So, if we don't embed DB connections into our code,
>how SHOULD we access databases?"
>
>I think some of the concepts surrounding this are covered in the article.
>
>http://www.drdobbs.com/database/202802994


Most databases, as well as the SQL Standard, have the things Jim Starkey wishes for. They
have column level security. They all have one type -- NUMERIC -- that deals with numbers
of any size. To keep old timers feeling useful, they let you put a size on it, NUMBER(5).
The (5) is just an edit check to insure new values are not too big. Inside the database,
all NUMERICs are stored the same way. In other words, changing (5) to (6) doesn't require
any database reformat.

They all have VARCHAR for variable length strings.

For recursive tree structures, Oracle has START WITH, CONNECT BY and PRIOR (link in
parent). It's not in the Standard, but I believe others have comparable extensions.

For application code closer to the database, the '03 SQL Standard FINALLY defined a
PL/SQL-like language (SQL/PSM) for stored procedures, and managed external procedures
written in any language (SQL/CLI). Nearly all major databases already had them before the
Standard.

I dislike stored procedures for administrative (political) reasons. They usually wind up
in the DBA domain rather than in application development. The external kind don't cause
that objection because they're not stored in the database, only a prototype, and DBAs have
no interest in application programming languages such as Cobol, C, Python, PERL, etc.
They do present a security risk on some databases (e.g. Oracle), because they run under
the DBA's userid.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com