SQL PROGRAMMING STYLE- P42

SQL PROGRAMMING STYLE- P42: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). | 12 CHAPTER 1 NAMES AND DATA ELEMENTS The same rules and warnings about affixes apply to all schema objects. You will see usp_ for user-defined stored procedures trig_ for triggers and so forth. In MS SQL Server this is a serious problem because the prefix sp_ is used for system procedures and has special meaning in the architecture. If the schema object does something triggers procedures then use a verb object format for the name the subject of the sentence is understood to be the procedure. We will go into more details on this topic in Chapter 8. Exceptions You can find other opinions at http There was also a series of articles at http columnists sjones http columnists sjones Develop Standardized Postfixes This list of postfixes is built on Teradata s internal standards and common usage. The Teradata standards are given in the Appendix. _id identifier. It is unique in the schema and refers to one entity anywhere it appears in the schema. Never use table name _id that is a name based on location and tells you this is probably not a real key at all. Just plain id is too vague to be useful to anyone and will screw up your data dictionary when you have to find a zillion of them all different but with the same data element name and perhaps the same oversized data type. _date or dt date temporal dimension. It is the date of something employment birth termination and so forth there is no such column name as just a date by itself. _nbr or num tag number. This is a string of digits that names something. Do not use _no because it looks like the Boolean yes no value. I prefer nbr to num because it is used as a common abbreviation in several European languages. _name or nm alphabetic name. This explains itself. It is also called a nominal scale. Follow the ISO-11179 Standards Naming Conventions 13 _code or _cd a .

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.