Re: MV and SQL
Date: 19 Jan 2006 07:02:20 -0800
Message-ID: <1137679787.138095.286740_at_g44g2000cwa.googlegroups.com>
x wrote:
> <michael_at_preece.net> wrote in message
> news:1137637589.943828.10850_at_z14g2000cwz.googlegroups.com...
> >
> > x wrote:
> >
> > > With SQL DBMSs one :
> > > - have the liberty to define any field to be a varchar no matter how bad
> the
> > > design is
> >
> > Well... with Pick you don't have to define it at all - as a varchar or
> > as anything else. You just start using it. Saying
> > "thisfield=thatfield+theotherfield" requires that both thatfield and
> > theotherfield be assigned a value prior to this code being executed
> > though - or you get a runtime warning and thatfield and/or
> > theotherfield are treated as being equal to zero. You can use it as a
> > "varchar" if you want - and/or as a boolean - and/or as a numeric...
> > anything. You can perform string operations on it, add it to another
> > field, then put it through code that says "if
> > thisfield+thatfield[startlen,forlen]-theotherfield then...". When you
> > perform enquiries on it using the query language then, again, how the
> > field is treated depends on its use - or the dictionary definition.
>
> > Total freedom. Of course this can be abused - and it often is. People
> > often experience difficulties when trying to extract data from Pick to
> > move to an SQL-relational DB because a single field, or column if you
> > prefer, can have a mixture of data types.
>
> Are you sure that a column in Pick is equivalent to a column in an SQL table
> ?
> Are you sure you are not confusing physical storage with logical relations ?
What I'm dealing with in the application code is "fields" in attributes (or lower levels - multivalues and subvalues) in files. They are logical entities. An "attribute" in an "item" in Pick is similar, I think, to a column in a row in an SQL-relational table - except that it can contain >=0 "fields". It can be a scalar or a set (if I've got the terminology right this time). Or it can be both at the same time. You can simply start using a field that has always previously been used as a scalar as a set. It can be of infinite length and has no "type" as such. At the physical level it's simply a delimited part of a string containing an infinite number of delimited strings of infinite length, which can in turn contain an infinite number of delimited strings of infinite length. There's nothing to stop me getting down into the physical realm and using my own delimiters to go beyond the subvalue level - if I want. The fact that they are delimited strings can be useful - if you want to perform operations on a group of "fields" and treat them as a single string - but, generally, they are treated as variables in their own right - or as elements in a dimensioned or dynamic array. To me the purely physical level is all about frames and file control blocks and all that side of things. I couldn't care less about that most of the time. I just open a file, read an item, and go to work on it in any way I choose. I can also issue a command to get a single "field" (be it an attribute or multivalue or whatever (oconv('myitem','tmyfile;x1;;1)) without any file opens or reads. I generally prefer not to issue direct reads and writes though. I have a set of IO routines - or procedures - I like to use. That way I can build in any additional smarts I want to extend the DBMS's out-of-the-box capabilities. You don't have to go to this extent - it's just my preferred approach. The DBMS handles the physical side of things for me in any case.
> If a column is called phones then it is expected to "store" phones not
> moneys and phones.
>
Yes. If you had some bizarre need to do this in a Pick DBMS though, you could go right ahead.
> > > - have the liberty to define stored procedures for implementing a domain
> > > specific language
> >
> > I guess you could say that everything in Pick is a kind of stored
> > procedure. Hell - what's an unstored one? Bear in mind here that we're
> > talking about what goes on within the DBMS. As I said in the post you
> > responded to, a Pick DBMS application covers any or all of the layers
> > from client user interface down to file IO. As such, a Pick procedure
> > can execute SQL commands or be called from dictionary items used within
> > an SQL command. It can also be called from a VB application to retrieve
> > data. It can also be used to fire off an executable or generate and
> > execute script to perform a function on a server/client/browser... I'm
> > struggling here... Ask me a specific question about what it can't be.
>
> I only said that an SQL DBMS can do this too with the exception that one
> cannot modify the DBMS.
I'm confused. Could you please clarify this for me.
> > > - have the liberty to choose the programming language and reporting
> tools
> > > used to access the database
> >
> > Ummm.. OK. Here's where I show my ignorance. I thought the only way to
> > get data into or out of a SQL DBMS is/was through SQL. I thought that
> > was the only way to access the database. If I'm wrong about that then
> > please feel free to educate me a little - and have a go at me too while
> > you're at it if you like.
>
> SQL is not the only language. It can be used with other languages like VB,
> JAVA, C#, proprietary/standard stored procedures languages, C, C++, COBOL,
> ADA, etc. Some of these can be used to write code running "inside" the
> DBMS. Some of these can be used to extend the base types/indices supported
> by the DBMS. Some of these can be used to write code running "outside" the
> DBMS.
I could do with some clarification on this too. I'm quite familiar with
writing VB code to get data into and out of an SQL DBMS via SQL - but
that's the only way I've ever accessed an SQL DBMS - via SQL. As might
be clear to you and others, I am an SQL tenderfoot and a Pick veteran.
> Besides the query language of Pick (search, list, etc.) what other ways do
> you have to access the data ?
> These access methods are for Pick what SQL + proprietary interfaces are for
> an SQL DBMS.
>
Yes. The tool-box is quite extensive though. That is why I was saying it is a mistake for people to simply compare the query languages. Pick's query language is very cool - but it's by no means the be-all and end-all.
> > Of course people use all kinds of programming languages and reporting
> > tools on top of Pick. I, personally, prefer the browser-web languages
> > but am also using VB - and a lot of people combine aspects of those two
> > by using ActiveX components. There are also a lot of Pickies out there
> > who prefer to use Java on top of Pick. There are also a lot of people
> > that use various reporting tools written in various languages, some of
> > them not just sitting on top of Pick, but actually written in Pick -
> > MITS and Datastage for example - which are often used as the sole Pick
> > application in an otherwise SQL DBMS environment (because they're
> > judged by their users to be better tools than those based on SQL).
>
> I was not saying that Pick cannot do the above. I was saying that one can do
> the same things using an SQL DBMS.
> > > - have the liberty to use the DBMS out of the box without any other
> tools
> >
> > If you ever get a DBMS out of the box that can't be used without any
> > other tools I suggest you send it straight back where it came from and
> > tell everyone about it.
>
> I was saying than one can describe the tables, enter the data and retrieve
> it whithout having to write various sorts of code like locking code, IO
> code, code for virtual fields.
>
Lock-handling and things like that are a function of the DBMS - and come as standard. I have done quite a bit of work in extending these capabilites btw (to handle maintenance of pessimistic locks for non-persistent web applications) - but again, this is just an "added extra" I've developed on my own because I can. A handful of others have developed similar capabilities in an effort to give their applications an edge. I'm pretty sure some of the Pick DBMS vendors - IBM in particular have this on their list of things to do. I also have a list of things to do - and that list is fed by new developments and capabilities I learn about in non-Pick DBMSs. Anything they can do...
>
> > > Using a C compiler one even have the liberty to define its own
> specialized
> > > DBMS for an application domain.
> >
> > Again - I plead ignorance. Sorry. I thought you had to use SQL with an
> > SQL DBMS.
>
> I was talking about a C compiler not about an SQL DBMS.
> Using a C compiler you have total freedom to develop whatever you like. You
> don't have to use SQL or an SQL DBMS or even Pick.
>
> > >
> > > So what is the advantage of MV systems ?
> >
> > Over SQL-relational? Well - because you can use SQL - if you want - or
> > you can go way beyond what SQL limits you to. I'll be keeping an eye on
> > Dawn's blog over the next year or so. I believe it'll go quite a long
> > way towards answering this question - much further than I can at the
> > moment.
>
> What SQL limits one to ?
> SQL is only a sublanguage always used together with other general purpose
> language.
> It's like saying that a Pick system is bad because the Pick query language
> is very limited (more limited than SQL in fact).
> If one have an SQL DBMS with unlimited field size and a general purpose
> language one can develop any database application using only one table with
> only one column and only one row. But that doesn't mean he should.
I honestly do appreciate that SQL is very powerful, btw. If I've done nothing else in this post, though, I hope I have managed to show why I think Pick is so much more powerful - and liberating.
Regards,
Mike.
Received on Thu Jan 19 2006 - 16:02:20 CET
