SQL PROGRAMMING STYLE- P44

SQL PROGRAMMING STYLE- P44: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). | 2 CHAPTER 1 NAMES AND DATA ELEMENTS Names In the early days every programmer had his or her own personal naming conventions. Unfortunately they were often highly creative. My favorite was a guy who picked a theme for his COBOL paragraph names one program might use countries another might use flowers and so forth. This is obviously weird behavior even for a programmer but many programmers had personal systems that made sense to themselves but not to other people. For example the first FORTRAN I used allowed only six-letter names so I became adept at using and inventing six-letter names. Programmers who started with weakly typed or typeless languages like to use Hungarian notation see Leszynski and Reddick . Old habits are hard to give up. When software engineering became the norm every shop developed its own naming conventions and enforced them with some kind of data dictionary. Perhaps the most widespread set of rules was MIL STD set up by the . Department of Defense but it never became popular outside of the federal government. This was a definite improvement over the prior nonsystem but each shop varied quite a bit some had formal rules for name construction whereas others simply registered whatever the first name given to a data element was. Today we have ISO-11179 standards which are becoming increasingly widespread required for certain government work and being put into data repository products. Tools and repositories of standardized encoding schemes are being built to this standard. Given this and XML as a standard exchange format ISO-11179 will be the way that metadata is referenced in the future. Watch the Length of Names Rationale The SQL-92 standards have a maximum identifier length of 18 characters. This length came from the older COBOL standards. These days SQL implementations allow longer names but if you cannot say it in 18 characters then you have a problem. Table shows the maximum length for names of the most important SQL .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.