System Analysis and Design System Design - Mr. Ahmad Al-Ghoul learning Objective Explain the importance of codes and describe various coding schemes Avicenna System Analysis and Design System Design 2 Using Codes During System Design Overview of Codes A code is a set of letters or numbers that represents a data item. Codes can be used to simplify output, input, and data formats. Avicenna Because codes often are used to represent data, you encounter them constantly in your everyday life They save storage space and costs, reduce transmission time, and decrease data entry time Can reduce data input errors in situations when the coded data is easier to remember and enter than the original source data System Analysis and Design System Design 3 Using Codes During System Design Code example A ZIP code contains multiple items of information compressed into nine digits First digit identifies one of ten geographical areas of the USA The next three digits identifies a major city or major distribution point Fifth digit identifies an individual post office, an area within a city The last four digits identify a post office box or a specific street address Broad geographical area in eastern U.S Local postal delivery point Elizabeth City, NC Avicenna Specific location for College of the Albemarle System Analysis and Design System Design 4 Using Codes During System Design Types of Codes Avicenna Companies use many different coding methods Codes should be easy to learn and apply When the analyst crate codes for the information system, he first should obtain comments and feedback from users We will describes seven common coding methods System Analysis and Design System Design 5 Using Codes During System Design Types of Codes 1. 2. 3. Avicenna Sequence codes: Sequence codes are numbers or letters assigned in a specific order. Sequence codes contain no additional information other than an indication of order of entry into a system. Block sequence codes: use blocks of numbers for different classification Alphabetic codes: use alphabet letters to distinguish one item from another based on a category, an abbreviation, or an easy-to-remember value, called a mnemonic code. Many classification codes fit more than one of the following definitions: System Analysis and Design System Design 6 Using Codes During System Design Types of Codes a. b. Avicenna Category codes: identify a group of related items. For example, a local department store may use a twocharacter category code to identify the department in which a product is sold. Abbreviation codes: Abbreviation codes are alphabetic abbreviations. For example, standard state codes include NY for New York, ME for Maine, and MN for Minnesota. – mnemonic codes: use a specific combination of letters that are easy to remember. Many three-character airport codes are mnemonic codes. For example, LAX represents Los Angeles International Airport System Analysis and Design System Design 7 Using Codes During System Design Types of codes 4. Significant digit codes: Significant digit codes distinguish items by using a series of subgroups of digits. ZIP codes, for example, are significant digit codes. Warehouse location code Section code Floor number Bin number Aisle number Sample of a code that uses significant digits to pinpoint the location of an inventory item. Avicenna System Analysis and Design System Design 8 Using Codes During System Design Types of codes 5. Derivation codes: Derivation codes combine data from different item attributes, or characteristics, to build the code. Most magazine subscription codes are derivation codes. A magazine subscriber code is derived from various parts of the name and address. Avicenna System Analysis and Design System Design 9 Using Codes During System Design Types of codes 6. 7. Avicenna Cipher codes: Cipher codes use a keyword to encode a number. A retail store, for example, may use a 10-letter word, such as CAMPGROUND, to code wholesale prices, where the letter C represents 1, A represents 2, and so on. Action codes: Action codes indicate what action is to be taken with an associated item. For example, a student records program might prompt a user to enter or click an action code such as D (to display the student's record), A (to add a record), and X (to exit the program). System Analysis and Design System Design 10 Using Codes During System Design Developing a Code Codes should be easy to remember, decipher, and verify Keep the following suggestions in mind when developing a code: 1. 2. 3. Avicenna Keep codes concise. Do not create codes that are longer than necessary Allow for expansion. A coding scheme must allow for reasonable growth in the number of assigned codes Keep codes stable. Changes in codes can cause consistency problems and require data updates. During the changeover period, you have to change all the stored occurrence of a particular code and all documents containing the old code, as users switch to the new code System Analysis and Design System Design 11 Using Codes During System Design Developing a Code 4. 5. 6. Avicenna Make codes unique. Codes used for identification purposes must be unique to have meaning Use sortable codes. ensures that data sorts into usable groups. Avoid confusing codes. Avoid allowing both letters and numbers to occupy the same positions within code because some of those are easily confused, like the number 0 and the letter O System Analysis and Design System Design 12 Using Codes During System Design Developing a Code 7. 8. 9. Avicenna Make codes meaningful. Codes must be easy to remember, useful for users, convenient to use, and easy to encode and interpret. Using ENG as the code for the English department is easier to interpret and remember than either XVA or 132 Use a code for a single purpose. Do not use a single code to classify two or more unrelated attributes. Keep codes consistent. For example, if the payroll system already is using two digit codes for departments, do not create a new, different coding scheme for the personal system System Analysis and Design System Design 13 Sequence Summary You learned that a code is a set of letters or numbers used to represent data in a system By using codes, you can speed up data entry, reduce data storage space, and reduce transmission time Codes also can be used to reveal or to conceal information The main types of codes are sequence codes, block sequence codes, classification codes, alphabetic codes (including category codes, abbreviation codes, and mnemonic codes), significant digit codes, derivation codes, cipher codes, and action codes Avicenna System Analysis and Design System Design 14 Sequence Summary In this Sequence we have Defined the term code Explained the the importance of codes described various coding schemes including sequence codes, block sequence codes, classification codes, alphabetic codes (including category codes, abbreviation codes, and mnemonic codes), significant digit codes, derivation codes, cipher codes, and action codes Avicenna System Analysis and Design System Design 15 Reference [1] System Analysis and Design, Sixth Edition Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt Publisher: SHELLY CASHMAN SEWIES. Avicenna System Analysis and Design System Design 16