[Info-vax] SQLite port for OpenVMS (Re: Is there currently a functioning link for hobbyist licenses?)

Paul Sture nospam at sture.ch
Sun Mar 15 08:26:03 EDT 2015


On 2015-03-14, seasoned_geek <roland at logikalsolutions.com> wrote:
> On Friday, March 13, 2015 at 6:16:54 PM UTC-5, Jan-Erik Soderholm wrote:
>> David Froble skrev den 2015-03-13 19:32:
>> > Bill Gunshannon wrote:
>> >
>> >
>> > The ony database I have used is MicroSoft's SQL-2000.  With that, I built
>> > stored procedures, that were stored in the database.  I then invoked the
>> > procedures from Visual Basic, passing parameters as required, and depending
>> > on the operation, got back record sets, or the procedure made changes int
>> > he database.
>> >
>> 
>> Yep, stored procedures (and functions) are suported by most DBs today.
>> 
>> 
>> > Now, I have the impression that other database products don't work in the
>> > same manner.
>> 
>> In what "manner"? All databases let you manage your database and data!
>> 
>> >
>> > I'd like to learn about other database products.  While I may complain
>> > about C code examples as "documentation", I confess that I think the
>> > easiest way I could start with another database product would be to see
>> > some examples.  Go figure ....
>> 
>
> I believe "same manner" means the fact there is no standard SQL. Oh
> yes, there is a standard which is published, but it might as well be
> printed on Charmin.

A few days ago I came across the Money data type in PostgreSQL. While
the documentation does warn of the dangers of using floating point
inherent in this data type (it's from the SQL standard IIRC), I honestly
don't know who uses this.  I honestly don't think I've ever had a
requirement to format monetary values to include the currency symbol or
abbreviation.  Even in multicurrency ledgers, the currency has been
in headings rather than at the field level.  YMMV of course.

> Take something simply like "displaying all tables in the database". On
> RDB and a few other database engines it is SHOW TABLES.  On Oracle you
> have to SELECT some_column FROM USER_something_or_other; then SELECT
> some_column FROM SYSTEM_something_or_other; Under SQLite3 and a few
> other command shells it is .tables but under PostGreSQL it is \d

It's pain indeed.  I'll also note that I've been using \dt to display
tables in PostgreSQL - the difference between the two I see here on a
test database is that the \d flavour also lists a "sequence"
relationship (which in this case is an auto-incrementing key on a table)
but the \dt flavour omits that.

> Now take something as basic as data integrity. Under SQLite you can
> declare a field INTEGER and stuff the text of "Mary Had a Little Lamb"
> in the column. It doesn't care. Some engines will issue a warning if
> you try to stuff a float, double, or other non-integer type into an
> INTEGER column, others will simply truncate without telling you.

That aspect of SQLite can actually be useful in the context of importing
"dirty" or incomplete data, as long as you realise that's what's
happening.

> Now let's take something as simple as character data. Some people will
> do that trendy thing of declaring character columns VarChar. When you
> have RDB using SQLMOD for a COBOL program where the value is expected
> to be PIC X(15) a 3 character value gets space padded for you. Some
> other databases using EXEC statements will leave a NULL in the 4th
> byte because they think everyone will always use C.

Sigh. I remember the days when all language documentation contained
precise examples of what happened with space padding or truncation when
moving data between different sized fields, and visiting that part of
the documentation was one of the first things I would do on encountering
a language new to me.

> SHAMELESS PLUG ALERT:
>
> If the unfortunate soul that has been forced to use legacy Microsoft
> products wants to learn how to use modern and robust OpenVMS they
> should seriously look into a copy of this:
>
> http://theminimumyouneedtoknow.com/app_book.html
>
> It is laid out so if you know one of the languages you can learn how
> to use it on OpenVMS with RDB, MySQL, and RMS files, then quickly come
> up to speed on the other languages because the same application keeps
> getting implemented over and over.


-- 
Don't ever use the last two versions of GCC in serious stuff :)
              -- fortune cookie seen on GCC Bugzilla – Bug List



More information about the Info-vax mailing list