Page 250 -
P. 250

chaPter 8  •  analyzing systems Using Data Dictionaries     217

                                                                                                Figure 8.7
                     Data Type                    Meaning
                                                                                                Some examples of data formats
                     Bit                          A value of 1 or 0, a true/false value         used in PC systems.
                     Char, varchar, text          Any alphanumeric character
                     Datetime, smalldatetime      Alphanumeric data, several formats

                     Decimal, numeric             Numeric data that are accurate to the least significant
                                                  digit; can contain a whole and decimal portion
                     Float, real                  Floating-point values that contain an approximate
                                                  decimal value
                     Int, smallint, tinyint       Only integer (whole digit) data

                     Currency, money, smallmoney  Monetary numbers accurate to four decimal places
                     Binary, varbinary, image     Binary strings (sound, pictures, video)
                     Cursor, timestamp, uniqueidentifier  A value that is always unique within a database

                     Autonumber                   A number that is always incremented by one when a
                                                  record is added to a database table


                     Personal computer formats, such as currency, number, or scientific, depend on how the
                     data will be used. Number formats are further defined as integer, long integer, single pre-
                     cision, double precision, and so on. There are many other types of formats used with PC
                     systems. Unicode is a standardized coding system for defining graphic symbols, such as
                     Chinese or Japanese characters. Unicode is described in greater detail in Chapter 15. There
                     are three standard formats for mainframe computers: zoned decimal, packed decimal, and
                     binary. The zoned decimal format is used for printing and displaying data. The packed dec-
                     imal format is commonly used to save space on file layouts and for elements that require
                     a high level of arithmetic to be performed on them. The binary format is suitable for the
                     same purposes as the packed decimal format but is less commonly used.
                   8. Input and output formats should be included, using special coding symbols to indicate how
                     the data should be presented. These symbols and their uses are illustrated in Figure 8.8.
                     Each symbol represents one character or digit. If the same character repeats several times,
                     the character followed by a number in parentheses indicating how many times the character
                     repeats is substituted for the group. For example, XXXXXXXX would be represented as
                     X(8).
                   9. Validation criteria for ensuring that accurate data are captured by the system. Elements are
                     either discrete, meaning they have certain fixed values, or continuous, with a smooth range
                     of values. Here are common editing criteria:
                     a.   A range of values is suitable for elements that contain continuous data. For example, in
                       the United States a student grade point average may be from 0.00 through 4.00. If there
                       is only an upper or lower bound to the data, a limit is used instead of a range.
                     b.   A list of values is indicated if the data are discrete. Examples are codes representing the
                       colors of items for sale in World’s Trend’s catalog.

                                                                                                Figure 8.8
                    Formatting Character             Meaning
                                                                                                Format character codes.
                            X           May enter or display/print any character
                            9           Enter or display only numbers
                            Z           Display leading zeros as spaces
                            ,           Insert commas into a numeric display
                            ·           Insert a period into a numeric display
                            /           Insert slashes into a numeric display
                            -           Insert a hyphen into a numeric display
                            V           Indicate a decimal position (when the decimal point is not included)
   245   246   247   248   249   250   251   252   253   254   255