Groups | Blog | Home
all groups > sql server (alternate) > march 2004 >

sql server (alternate) : use an array like a field on a table?



joe.celko NO[at]SPAM northface.edu
3/26/2004 10:13:22 AM
[quoted text, click to view]
<<

No. The foundation of the relational model is that a table is a set
of things of the same kind; a row models an element of that set; a
column (which is not anything like a field at all!) is a scalar or
atomic value.

Would you mind taking a quick survey for me? I have to several
hundred new SQL programmers in the next year. You have made a typical
"Newbie Error" and I want to know what your underlying assumptions
were that lead to the flaw -- your "logic of failure", as it were.
You can answer to my email instead of on the newsgroup.

1) How many years/months have your been programming? Was your first
language a procedural language? Was your first language an OO
language?

2) How many years/months have your been programming in SQL?

3) Have you used a sequential file system before?

4) Have you used a network Database before?

5) Have you ever had a course in Data Modeling?

6 Have you ever had a course in RDBMS theory? University or
commercial?

7) Have you ever had a course in SQL? University or commercial?

I am not picking on you; I want to know how you came to ask this
Rasta X
3/26/2004 12:04:28 PM
Can I create an array (n-dimensional) on a field on a table?
How can I do that?
Tx



Simon Hayes
3/26/2004 6:54:26 PM

[quoted text, click to view]

I'm not really sure what you're trying to do, but perhaps this article may
help:

http://www.sommarskog.se/arrays-in-sql.html

Simon

Craig Kelly
3/26/2004 9:16:13 PM
[quoted text, click to view]

I know from your previous posts that your experience indicates that this
type of conceptual problem often arises because someone's main education
and/or experience in is in the realm of procedural programming (with or
without OO), mag tapes, sequential files, direct access to B+ tree files,
etc.

However, given your impromptu survey and your impending intersection with a
newbie set, I'm assuming that your opinion may change, expand, narrow, or
stay the same depending on what you see.

Although I realize your schedule must be very tight, if you could dash off
even a 2-3 paragraph description of what you discover, I think it would be
immensely valuable. I for one often have to help people with a programming
background but no relational experience whatsoever. Any insight you can
give on helping people in this boat would be vastly appreciated.

If you think it warrants a book-length treatment, just post the ISBN when it
comes out! :)

And lest all this be thought off-topic, I think this is *very* relevant for
this newsgroup. For whatever reason, it seems that an IT shop with little
or no experience in the RDBMS realm will quite often choose SQL Server. I'm
not slamming MS, SQL Server, or these shops: that's just a statistical
observation (although I think the OSS databases like MySQL, Postgre, and
Firebird are changing this rapidly). I have come to the conclusion that
anyone working in a small IT department with an RDBMS needs to keep his/her
"teaching" skills as sharp as their skills in data modeling, OO design, or
the latest visual gobblety-gook.

Craig

Joe Celko
3/26/2004 10:17:47 PM
[quoted text, click to view]
you discover, I think it would be
immensely valuable. <<

I want to get a feature or column for INTELLIGENT ENTERPRISE out of it
actually.

[quoted text, click to view]
background but no relational experience whatsoever. Any insight you can
give on helping people in this boat would be vastly appreciated. <<

I'm doing the same thing with college students. We are a start-up
for-profit school with a small first class. When this thing scales up,
I will need to serious teaching aids. The ideal situation would be to
automate this thing so that a student sits down, keys in his profile
(education aotn, experience, programming languages, etc.) and gets
customized suggestions for his problem -- "You punch card programmers
could only read a file in a forward direction, so you tend to sort every
table before you use. Tables are not sorted in SQL; see training module
".#432-B

[quoted text, click to view]
when it comes out! :) <<

Jerry Weinberg beat me to it years ago, so I'll settle for the article.

[quoted text, click to view]
experience in the RDBMS realm will quite often choose SQL Server. <<

The cost and the desktop environment would be my guess. With DB2
getting cheaper than SQL Server, nicer open source RDBMSes and Yukon
running late, this might start changing.

[quoted text, click to view]
an RDBMS needs to keep his/her "teaching" skills as sharp as their
skills in data modeling, OO design, or the latest visual gobblety-gook.
<<

Yes, you do, but that is because Pointy-Haired Bosses will not play for
training. This is like ditch digging where the call for help tells you
"Hard Work! Low Pay! $10.00 per ton! Bring your own Shovel!"

--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
Craig Kelly
3/29/2004 3:52:52 AM
[quoted text, click to view]

Excellent! I'll look for it.

[quoted text, click to view]

Are you referring to his work in general or to a specific book?

Craig

Joe Celko
3/29/2004 2:57:46 PM
[quoted text, click to view]

The Psychology of Computer Programming, by Gerald Weinberg, Dorset
House, "Silver Anniversary" edition released 1998. It is a classic.
PL/I was the "language du jour" and it was a horrible mix of Cobol,
Fortran and Algol. Weinberg could tell the original language of the
programmers by how they wrote their PL/I.

--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button