TAILIEUCHUNG - SQL PROGRAMMING STYLE- P14

SQL PROGRAMMING STYLE- P14:Im mot trying to teach you to program in SQL in this book. You might want to read that again. If that is what you wanted, there are better books. This ought to be the second book you buy, not the first. I assume that you already write SQL at some level and want to get better at it. If you want to learn SQL programming tricks, get a copy of my other book, SQL for Smarties (3rd edition, 2005). | 152 CHAPTER 8 HOW TO WRITE STORED PROCEDURES principles to SQL programmers. If you look at the SQL code posted in newsgroups much of it is written as if all of the work done in the 1970s and 1980s by Yourdon DeMarco Dijkstra Wirth and others. never happened. Wake up people Those rules still apply to any programming language because they apply to programming. Most SQL 4GLs Are Not for Applications Rationale Most of the proprietary procedural languages added to SQL by vendors were never meant to replace application development languages note the exceptions . They were meant to be micro-languages that could be used for procedural operations inside the database. The classic micro-language has no real input output I O you can print a message on the standard system output and that is about all. There is no file control no complex computations and no display formatting functions. These languages were for writing triggers and short cleanup modules in the schema and the rule of thumb was never to have a procedure over one page or 50 lines long. This is fine in a tiered architecture display and complex computations are done in the host language of the presentation layer. But if you read the SQL newsgroups you will constantly find newbie programmers who want to do display formatting in the database. They want to add leading zeros in a SELECT statement concatenate first and last names put line numbers on the result set to display ranges of those line numbers and a host of other things. SQL is strictly a data-retrieval language and has nothing to do with application presentation layers. Exceptions Informix 4GL Progress Oracle s PL SQL and a few other languages were actually meant for application development. Sometimes the language came before the SQL database and vice versa. A proprietary language can be fast to execute fast to write and have lots of nice features. A lot of mainframe packages are implemented in Informix 4GL under the covers Oracle sells packages written in

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.