You are here: Re: SQL to combine columns « MsSQL Server « IT news, forums, messages
Re: SQL to combine columns

Posted by yuri on 03/10/07 16:34

> But do you want to be a good SQL programmer instead?

No, I want to be the worst programmer on the planet. I mean really.

> Yes it is brought up all the time because people will not bother to
> read even one book on RDBMS, so they keep asking this kind of thing
> over and over. Please post DDL, so that people do not have to guess
> what the keys, constraints, Declarative Referential Integrity, data
> types, etc. in your schema are. Let's start by doing what you should
> have done for us:

Oh, I'm sorry about that. I failed to get a copy of the CELKO SQL posting
etiquette. Could you please point me in the right direction?
Sarcasm aside, I will do this in the future. Thanks.

> Why do you wish to destroy First Normal Form (1NF) with a concatenated
> list structure? It is the foundation of RDBMS, after all. See why I
> say you never read a book on RDBMS.

You're right I should have went out and bought a book on RDBMS. I mean who
would ever think about asking a question on the internet was possible. I
mean everybody should shut down all forums and rely on tech manuals because
they are always so well written and contain every piece of knowledge on the
planet about the subject, including all the hidden tips and tricks.
Questions will be a thing of the past. Just grab a book and your answer
will be there. Did you get criticized in class when you had a question
about something? Did the teacher yell at you, tell you to read the book and
never answer the question?

Since, my application is small and does very basic SQL usage, the internet
provided all the information I needed, but a book would have answered my
question so the might CELKO would not have been bothered. I guess I figured
there are some decent people out there that would be willing to help out
somebody new to the RDBMS world, thank you proving me wrong. Others, seem
just fine. Maybe you need to relax and not get so worked up over a
question. I mean if it bothers you that much you might want to take a
vacation and relax buddy before your next heart attack.

> Why did you think that an owner is an attribute of a dog? It is a
> relationship! It might have attributes of its own, like license
> numbers, issue date, etc. but let's ignore that.

> Why are you formatting data in the back end? The basic principle of a
> tiered architecture is that display is done in the front end and never
> in the back end. This is a more basic programming principle than just
> SQL and RDBMS.

Thank you for all you criticism and posting how I failed to put license
numbers, issue date, and any other things for you. I tried to make it small
and simple for the example. I guess for CELKO it was a very, very poor
example.

I think a dog belongs to an owner. Can an owner have more than 1 dog?
Hmmm.... I think so in this example. Yes, creating a seperate table in this
example to handle 1 to many is politically correct but I wasn't asking to be
critiqued on correctness but for a simple answer to a simple question. I
already handle this in my application but it was a passing fancy to see if
it was possible to do in SQL to better my knowledge. Thanks for not
anwering my question and making a noob to RDBMS feel welcome. I appreciate
it!!!

Maybe, the great CELKO can recommend a book and help out a newly RDBMS
programmer into this world instead of criticising each and every word and
never help out except to say how bad and wrong the post was.

Steve London (Yuri)


"--CELKO--" <jcelko212@earthlink.net> wrote in message
news:1173533747.995999.210930@s48g2000cws.googlegroups.com...
>>> I'm sure this has been brought up many times, but I will ask anyway. <<
>
> Yes it is brought up all the time because people will not bother to
> read even one book on RDBMS, so they keep asking this kind of thing
> over and over. Please post DDL, so that people do not have to guess
> what the keys, constraints, Declarative Referential Integrity, data
> types, etc. in your schema are. Let's start by doing what you should
> have done for us:
>
> CREATE TABLE Owners -- plural if you have more than one
> (owner_id INTEGER NOT NULL PRIMARY KEY,
> owner_name CHAR(20) NOT NULL);
>
> CREATE TABLE Dogs -- plural if you have more than one
> (dog_id INTEGER NOT NULL PRIMARY KEY,
> dog_name CHAR(20) NOT NULL);
>
> Why did you think that an owner is an attribute of a dog? It is a
> relationship! It might have attributes of its own, like license
> numbers, issue date, etc. but let's ignore that.
>
> CREATE TABLE Ownership-- plural if you have more than one
> (owner_id INTEGER NOT NULL
> REFERENCES Owners(owner_id)
> ON UPDATE CASCADE
> ON DELETE CASCADE,
> dog_id INTEGER NOT NULL
> REFERENCES Dogs(dog_id)
> ON UPDATE CASCADE
> ON DELETE CASCADE,
> PRIMARY KEY (dog_id, owner_id));
>
>>> How can I make a query that will produce the following results: <<
>
> Why do you wish to destroy First Normal Form (1NF) with a concatenated
> list structure? It is the foundation of RDBMS, after all. See why I
> say you never read a book on RDBMS.
>
> Why are you formatting data in the back end? The basic principle of a
> tiered architecture is that display is done in the front end and never
> in the back end. This is a more basic programming principle than just
> SQL and RDBMS.
>
> Yes, trhre are some proprietary, stinking kludges that can do this.
> But do you want to be a good SQL programmer instead?
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация