Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Learning Objectives Learning Objectives The Entity-Relationship(ER) modeling to develop a conceptual model of data. How to organize data required in an application as relations. The need for normalizing relations. The various normal forms and their relevance. How to normalize relations to successive higher normal forms to form a relational database. The need for an integrated database in organizations. The goals of Data Base Management systems (DBMS). The structure and organization of DBMS. V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore //V1/June 04/1 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/ Data Oriented Systems Design Motivation Motivation When a DFD is developed we have knowledge of all data elements required by an application. Data dictionary lists all data elements but does not say anything about relationships between data elements. Relationships are needed to logically group data elements into related sets or tables. Such an organization o Reduces data duplication o Simplifies adding, deleting and updating data o Simplifies retrieval of desired data Logical databases give conceptual model.. Logical databases need to be stored in physical media such as a hard disk for use by applications. A system is needed to map the logical database to a physical medium, which is transparent to an application program.. Database management systems achieve this purpose. V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore //V1/July 04/1 What is Data Dictionary • Data dictionary is a catalogue of all data used in an application, In other words it is data about data which is called metadata • Data dictionary gives a single point reference of data repository of an organization • It is thus an important documentation which would be useful to maintain a system V.Rajaraman SAD/M7/LU1/V1/2004 1 How is Data Dictionary Developed? • Starting point is DFD Example : Consider the Receiving office process described in Module 3. DFD is reproduced below. V.Rajaraman SAD/M7/LU1/V1/2004 2 How is Data Dictionary Developed? (Contd.) Vendor Delivery note Receiving Process Items Received note Inspection Office Purchase Office Orders Discrepancy note We will recall the word statement from requirement specification now. V.Rajaraman SAD/M7/LU1/V1/2004 3 Word Statement of Requirements • Vendor sends items with a delivery note while fulfilling an order (along with the physical items) to a receiving office. • Receiving office compares a delivery note against order placed.If there is a discrepancy a discrepancy note is sent to purchase office. • Actual items received note is sent to the inspection office along with items received. V.Rajaraman SAD/M7/LU1/V1/2004 4 Data Elements in Data Flow From word statement we derive data elements in each data flow. 1. Delivery note • Order no,Vendor name, Vendor address, item name, delivery date, quantity supplied, units • Item name and Vendor name may not be unique to ensure uniqueness we assign unique codes for them. V.Rajaraman SAD/M7/LU1/V1/2004 5 Data Elements in Data Flow (Contd.) Name is however still kept to aid people. Thus delivery note is: Delivery note = Order no + Vendor code + Vendor name + Vendor address + item code + item name + delivery date + quantity supplied + units. V.Rajaraman SAD/M7/LU1/V1/2004 6 Data Elements in Data Flow Discrepancy note : Order no + Vendor code + Vendor name + Vendor address + item code + item name + delivery date + quantity supplied + units + excess/deficiency + no of days late/early. Items received note = Delivery note Data in data store Order records = order no + vendor code + vendor name + vendor address + item code + item name + order date + qty ordered + units + delivery period. V.Rajaraman SAD/M7/LU1/V1/2004 7 Data Dictionary Format Data dictionary gives in detail the characteristics of a data element. Typical characteristics are: Data name : Should be descriptive and self explanatory.This will help in documentation and maintenance Data description : What it represents Origin : Where the data originates V.Rajaraman SAD/M7/LU1/V1/2004 8 Data Dictionary Format (Contd.) e.g. input from forms, comes from receiving office, keyed in by user etc. Destination : Where data will flow and will be used (if any) Data Type : numeric, alphanumeric,letters(or text),binary(0 or 1; True or False), Integer, Decimal fixed point, real (floating point), currency unit, date V.Rajaraman SAD/M7/LU1/V1/2004 9 Typical Characteristics of Data Elements(contd) Length : no of columns needed Limits on value : (if relevant) e.g. upper and lower bounds of value (age>0,<100) Remarks : (if any) V.Rajaraman SAD/M7/LU1/V1/2004 10 Example of Data Dictionary Entry Name : Order number Description : Used to identify order given to vendor Origin : Part of delivery note from vendor Destination : Receiving process Data type : Numeric Integer Length : 8 digits Limits on value : >000,<=99999999 Actual value not relevant.Used only as unique identifier Remarks: It is a key field. V.Rajaraman SAD/M7/LU1/V1/2004 11 Example of Data Dictionary Entry (Contd) Name : Delivery date Description : Date item is to be delivered Origin : Part of delivery note from vendor.Is also in orders data store which is input to receiving process Destination : Receiving process Data type : Numeric Integer V.Rajaraman SAD/M7/LU1/V1/2004 12 Example of Data Dictionary Entry (Contd) Length : 8 digits Limits on value : Date field in the form DDMMYYYY. Should satisfy constraints of a date in calendar Remarks: Blank fields not allowed. e.g. 05082004 is ok but not 582004 V.Rajaraman SAD/M7/LU1/V1/2004 13 Data Dictionary Uses • Data dictionary can be enormous in size.Requires careful development. However,it is centralized reference document. • Invaluable resource to design • Input forms and screens • Data checking programs • Process specification • Database • Very useful in understanding and maintaining system V.Rajaraman SAD/M7/LU1/V1/2004 14 Data Input Methods • On-line - User directly Enters data using screen prompts • Off-line -Forms filled by users- for example-candidates for admission to a college fill forms • Data from forms keyed in by a data entry operator V.Rajaraman SAD/M7/LU2/V1/2004 1 Error Sources • Errors in on-line data entry due to poor screen design. System should inform the user immediately when wrong data is input • Errors in off-line data entry due to bad form design and human errors by users and data entry operator V.Rajaraman SAD/M7/LU2/V1/2004 2 Error Sources System should prevent user making mistakes by • Good form design by leaving enough space for writing legibly • Clear instructions to fill form System should prevent data entry operator making mistakes by • Good form design • Reducing key strokes • Immediate error feedback V.Rajaraman SAD/M7/LU2/V1/2004 3 Off Line Data Entry - Problems • Forms batched • Desirable for the machine to give message when input is wrong. Not always possible • Error found after elapse of time • Need good controls to automatically detect and if possible correct errors V.Rajaraman SAD/M7/LU2/V1/2004 4 Batch Data Entry Data entered in forms Keyboard Data entry Input batch Input file Error batch Error report Output report V.Rajaraman Data validation program Data processing program SAD/M7/LU2/V1/2004 Update program Data store 5 Batch Data Entry Name Address Bad design : Tendency will be to fill name on top line. Not enough space for letters of address Tick as applicable Individual Hindu undivided family Parent/Guardian of minor V.Rajaraman Bad design : Choices are not codified. Data entry operator will be confused. SAD/M7/LU2/V1/2004 6 Batch Data Entry Enter date Enter date Day Month Year (Bad design) (Good design) Enter time Hr Min Sec Enter time (Good design) (Bad design) V.Rajaraman SAD/M7/LU2/V1/2004 7 Batch Data Entry Enter name and address using capital letters Use one box for each alphabet Tick any of the following Shri Smt 1 Kum 2 3 Name Only address (do not Repeat name) V.Rajaraman Pin SAD/M7/LU2/V1/2004 8 Batch Data Entry (Contd.) I am applying as: Tick one of the boxes below Individual Hindu undivided family Parent or guardian Of minor Clear instructions . Enough space for entry manually. Data entry operator can be simple instructions for data entry V.Rajaraman SAD/M7/LU2/V1/2004 9 Computer Readable Forms • As manual data input from forms are slow and expensive attempts have been made to automate form reading using scanners • Needs hand writing recognition and correct form alignment – Not very successful • However if forms require just darkening some pre-defined areas they can be machine read and interpreted. • Example – Multiple choice questions in exams where specific boxes are darkened based on the choice. V.Rajaraman SAD/M7/LU2/V1/2004 10 Interactive Data Input • Advent of PC’s and client/server model in computer networks, interactive data input is now widely used • Advantages are instant response when data is input so that errors are immediately corrected. • Flexibility in screen design which minimizes manual effort • Use of mouse and icons simplifies pre-determined choices of data V.Rajaraman SAD/M7/LU2/V1/2004 11 Interactive Data Input Three main models of interactive data input : • Menus • Templates • Commands V.Rajaraman SAD/M7/LU2/V1/2004 12 Models of Data Input Menus: User Presented Several Alternatives And Asked To Type His/Her Choice Example Select Alternative Type 1 For entering new student record Type 2 For deleting student record Type 3 For changing student record Your choice V.Rajaraman SAD/M7/LU2/V1/2004 13 Models of Data Input Template: Template analogous to form • Has features to reject incorrect data input using built-in program • User friendly visual presentation Example: Roll no Name FIRST NAME/INTIALS V.Rajaraman LAST NAME SAD/M7/LU2/V1/2004 14 Models of Data Input (Contd.) Dept code CE CS ME EE IT Year Hostel code A CODES B C D Pre-programmed to reject incorrect Roll no, Dept code, Year, Hostel code V.Rajaraman SAD/M7/LU2/V1/2004 15 Models of Data Input Interactive commands guides user through alternatives Example Computer : Did you request deletion of record ? Type Y or N User :Y Computer : Give student roll no User : 56743 Computer : Is name of the student A.K.Jain? Type Y or N User :Y Computer : Is he 1st year student Type Y or N User :Y Computer : Shall I delete name? User :Y V.Rajaraman SAD/M7/LU2/V1/2004 16 Models of Data Input • Normally all three models will occur together in application . In other words Menu, Forms and Commands are not mutually exclusive. • Graphical user interface design very rich area-languages such as Visual Basic simplifies design of user interface. • We have given only a flavor of the topic. V.Rajaraman SAD/M7/LU2/V1/2004 17 Why do we need Codes? Need for Coding: • Unique Identifier - Example Roll no instead of name • Cross Referencing Between Applications - Unique Roll no may be used in examination records,accounts, health centre • Efficient Storage And Retrieval - Codes concise- a long name will have a shorter roll no V.Rajaraman SAD/M7/LU3/V1/2004 1 What are the Requirements of a Good Code? • Concise - Smallest length to reduce storage and data input effort • Expandable - Add new members easily • Meaningful- Code must convey some information about item being coded • Comprehensive - Include all relevant characteristics of item being coded • Precise - Unique, unambiguous code V.Rajaraman SAD/M7/LU3/V1/2004 2 What methods do we use to Code 1) Serial No: Assign serial number to each item 2) Block Codes: Blocks of serial numbers assigned to different categories. 3) Group Classification Code- Groups of digits/characters assigned for different characteristics V.Rajaraman SAD/M7/LU3/V1/2004 3 What methods do we use to Code (Contd.) Roll no 87 1 05 2 Year admitted Term admitted Dept Status UG/PG Serial No in Dept 1 CS UG 465 (use meaningful characters) 87 V.Rajaraman SAD/M7/LU3/V1/2004 465 4 What Methods do we use to Code (Contd…) 4) Significant Codes - Some Or All Parts Given Values Roll no BA 1 95 Banian Male Chest Size (cms) V.Rajaraman C Cotton SAD/M7/LU3/V1/2004 B R Style Color (Round (blue) neck) 5 Characterstics of Codes Characteristics Codes Concise Expandable Meaningful Comprehensive Precise SERIAL NO Yes Yes No No Yes BLOCK CODES Moderate Yes No No Yes GROUP CLASSIFICATION CODE No Yes Yes Yes Yes SIGNIFICANT CODE No Yes Yes Yes Yes V.Rajaraman SAD/M7/LU3/V1/2004 6 Error Detection Code • Incorrect data entry can lead to chaos • Mistakes occur as volume of data processed is large • Need to detect and if possible correct errors in data entry • Error detected by introducing controlled redundancy in codes • Error control digits added based on statistics of types of errors normally committed during data entry V.Rajaraman SAD/M7/LU3/V1/2004 7 Modulus 11 Check Digit System • Error detection digit added at the end of a numeric code • Code designed in such a way as to detect all single transcription and single transposition errors which is 95% of all errors Single transcription errorÆ 49687Æ48687 Single transposition errorÆ 45687Æ48657 V.Rajaraman SAD/M7/LU3/V1/2004 8 Modulus 11 Check Digit System • Given code 49687 modulus check digit obtained as follows: Multiply each digit by Weights of 2,3,4 etc starting with least significant digit 7*2+8*3+6*4+9*5+4*6=131 131/11=11,remainder 10; or 131 mod (11) =10; (11-10)=1 append it to the code • The code with check digit=496871 • If remainder is 1 then append(11-1)=10 code as X V.Rajaraman SAD/M7/LU3/V1/2004 9 Error Detection 496871 Correct code 486871 Code as entered Error detection - 1*1 + 7*2 + 8*3 + 6*4 + 8*5 + 4*6 = 127/11 Remainder != 0 => Error 496871 Error detection - 416879 9*1 + 7*2 + 8*3 + 6*4 + 1*5 + 4*6 = 100/11 Remainder != 0 => Error V.Rajaraman SAD/M7/LU3/V1/2004 10 Why does Modulus 11 Check Digit Work • Given dn, dn-1,……..d1 where d1 is the check digit n (∑Widi ) mod N=0 by design i=1 What should be the values of N & Wis Single transcription error: dk become t n n (∑Widi ) = (∑Widi ) + t Wk - Wk dk i=1 i=1 V.Rajaraman SAD/M7/LU3/V1/2004 11 Why does Modulus 11 Check Digit Work (Contd.) As (∑Widi ) mod N=0 (t- dk ) Wk mod N = 0 (t- dk ) Wk = p.N where p is any integer Conditions 1. integer not a prime => N a prime 2. Smallest 0<Wk<N 3. As [t-dk] < 10 and Wk < N, N>10 4. Product of prime > 10 =11 => N=11 V.Rajaraman SAD/M7/LU3/V1/2004 12 Why does Modulus 11 Check Digit Work Given dn,dn-1,……..d1 where d1 is the check digit n (∑Widi ) mod N=0 by design i=1 What should be the values of N & Wis Single transcription error: dk become t n n (∑Widi ) = (∑Widi ) + t Wk - Wk dk i=1 i=1 As (∑Widi ) mod N=0 (t - dk ) Wk mod N = 0 • (t-dk ) Wk = p. N where p is any integer V.Rajaraman SAD/M7/LU3/V1/2004 13 Why does Modulus 11 Check Digit Work Single transposition error Let dk and dm get interchanged n [ ∑ Wi,di + (dkWm + dmWk - dkWk - dmWm )] mod N = 0 i=1 Or (dk-dm)(Wm-Wk) = p.N 1. (Wm - Wk) = 0 => Weights distinct 2. (dk- dm) <10 If N> 10 equation satisfied 3. If N prime product cannot be prime therefore N =11 satisfies conditions V.Rajaraman SAD/M7/LU3/V1/2004 14 Other Checking Systems • Use modulo n check with n prime > largest code character value • For hexadecimal codes symbols = 16, n =17 • For alphanumeric codes 26 letters 10 digits 36 symbols • Therefore n=37. V.Rajaraman SAD/M7/LU3/V1/2004 15 Validating Input Data • When large volume of data is input special precautions needed to validate data • Validation checks : • Sequence Numbering - Detects Missing Record • Batch Control - Use Batch Totals • Data Entry And Verification-dual Input • Record Totals-add Individual Values For checking • Modulus 11 Check Digit V.Rajaraman SAD/M7/LU3/V1/2004 16 Checks on Individual Fields • Radix errors - For example seconds field cannot exceed 60,month field cannot exceed 12 • Range check - Fields should be within specified range • Reasonableness check - Telephone bill cannot be more than 10 times average bill of last few months • Inconsistent data - For example : 31-04-99 V.Rajaraman SAD/M7/LU3/V1/2004 17 Checks on Individual Fields (Contd.) • Incorrect data- Batch total checks this • Missing data - Batch control data checks this • Inter field relationship check • For example - Student of 8lh class cannot have age > 25 V.Rajaraman SAD/M7/LU3/V1/2004 18 Prof. V.Rajaraman System Analysis and Design System Analysis and Design / Data Oriented Systems Design Question Bank Question Bank – 7 7.1 What is a data dictionary? 7.2 Why is a data dictionary necessary? 7.3 What are the main advantages of creating a data dictionary? 7.4 What data about a data element is stored in a data dictionary? 7.5 For the requirements statement given in PPT 7.1.3 (Vendor supplying items to a company) develop the data dictionary entry for vendor code, vendor name and vendor address. 7.6 What is the difference between on-line and off-line data entry? 7.7 Why are input data records divided into batches for off-line data entry? 7.8 What is the purpose of a data validation program? 7.9 What are the main principles used in designing forms for data entry? 7.10 A good and a bad design for entering date in a form is given in Section PPT 7.2.5 and 7.2.6. What are the reasons for saying that one of them is good and the other bad? 7.11 Design a form to be used by a salesman to report to the office about the sales executed by him at different customer locations. 7.12 What is the main difference between menus, templates and command modes of interactive data entry? When is each of these modes appropriate? 7.13 Design a dialogue hierarchy for entering data on customers (of a manufacturer). 7.14 Design a dialogue hierarchy and the screens for a system used to reserve seats in long distance buses. 7.15 Why are data fields coded in an information system? 7.16 Can the name of a person be used as a code, for say, his bank account? If not, why? V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/1 Prof. V.Rajaraman System Analysis and Design System Analysis and Design / Data Oriented Systems Design Question Bank 7.17 What are the requirements of a good coding scheme? 7.18 Is a concise code comprehensive? If not, why? 7.19 Is a meaningful code necessarily comprehensive? 7.20 Is a comprehensive code necessarily meaningful? 7.21 Is a precise code necessarily concise? 7.22 What is the advantage of a serial number code? Why is it not normally used? 7.23 What is the main advantage of block codes? 7.24 Design a group classification code to code (i) motor vehicles,, (ii) music cassettes, and (iii) books 7.25 Is a group classification code meaningful? 7.26 Give an example of a significant code. Are significant codes expandable? 7.27 Add a Modulus-11 check digit to the codes (i) 48467, (ii) 96432, and (iii) 87646257. 7.28 Modulus-37 check is suitable for alphanumeric codes. Add a modulus-37 character to the codes (i) 4AB9W, (ii) XBY483, and (iii) CAZ4642. 7.29 The following code was entered by an operator:449632. The last digit is a modulus-11 check digit. Is this code correct? 7.30 If a code uses hexadecimal digits, what should be N if the modulus-N check digit system is to be used with such codes? What are the allowable weights if single transcription and transposition errors are to be detected? 7.31 If modulus-11 check digit system is to generate detection of multiple identical digit transcription error (i.e., a code such as 45565 is wrongly entered as 48868), what should be the constraints on the weights? V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/2 Prof. V.Rajaraman System Analysis and Design System Analysis and Design / Data Oriented Systems Design Question Bank 7.32 A see-saw error is one in which one digit of the code is increased by x and another decreased by x. For example, 486732 becoming 456762. When can modulus N check detect such errors? 7.33 Why is it useful to assign sequence numbers for data records? What are the types of errors detected by sequence numbering? 7.34 What is the purpose of batch control record? What is the type of information contained in a batch control record? A set of data records for student examination results has the following format: Roll no. Name Marks (out of 100) Paper 1 Paper 2 Paper 3 Paper 4 Design for these records a batch control record and a record control field and any other appropriate checks for the fields. 7.35 Give some example of fields for which a radix error check is appropriate. 7.36 What is the difference between range check and a radix check? 7.37 What are the appropriate range checks for the age of individuals in an employee file, a high school student file, and height of students in a student file. 7.38 Give some examples of fields where reasonableness check would be applicable. 7.39 Give some examples of inter-field relationship checks. 7.40 What is the main difference between menus, templates and command modes of interactive data entry? When is each of these modes appropriate? 7.41 Design a dialogue hierarchy for entering data on customers (of a manufacturer). 7.42 Design a dialogue hierarchy and the screens for a system used to reserve seats in long distance buses. V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/3 Prof. V.Rajaraman System Analysis and Design Summary Module 7 1. Data dictionary is a catalogue of all data used in an application. Each entry in the dictionary has the name of the data, its type, origin, destination, range of values,length and where used. 2. It is useful as a documentation and assists in maintaining systems and also in designing data input. 3. Data dictionary is developed using data flows in a DFD and contents of data stores in DFD 4. Data may be input to a computer off-line or on-line. In on-line entry a user enters data interactively via a video terminal connected to the computer. In off-line data entry data filled in forms are entered by operators in a separate PC or a data entry machine. 5. Off-line data entry is suitable if the number of records is very large. 6. In off-line data entry, batches of data are formed and entered. They are checked by a validation program and the corrected records are stored in a file. 7. To reduce errors in input, it is essential to carefully design the forms used for entering data. 8. For interactive data input, special screens are designed on video terminals for easy data entry. Errors in data entry are instantly detected by a validation program during data entry and can be immediately corrected. 9. Common methods of interactive data input is by use of menus, templates and interactive commands for data entry. 10. A menu method is used to pick one out of many alternatives, a template method to enter new data, and a command method to add and delete data. Indian Institute of Science Bangalore System Analysis and Design Prof. V.Rajaraman 11. These methods are combined to provide a user the most appropriate technique for a particular type of interactive data entry. 12. Important data elements are coded. Codes are necessary for unique identification, easily cross-referencing and efficient storage and retrieval. 13. There are many methods for coding. An ideal code must be concise, expandable, meaningful, comprehensive and precise. It is not possible to incorporate all these ideal features in a code. 14. Codes are classified as: (i) Serial number codes, (ii) Block codes, (iii) Group classification codes, and (iv) Significant codes. Group classification codes and Significant codes are most meaningful, expandable, precise and comprehensive. They are, however, not concise, Serial and Block number codes are more concise. They are also precise and expandable but are not meaningful and comprehensive. 15. Any error made in entering important data fields such as account codes and identification codes must be detected during data entry. 16. The most common errors made during data entry are: a single digit is incorrectly entered or any two digits in the code are interchanged. These errors are called respectively single transcription and transposition errors and account for 96% of all data entry errors. 17. Given a code, the digits in it starting from the last digit are multiplied by weights 2, 3, 4, etc., and the products are added. The sum is divided by 11. The remainder is subtracted from 11. This number (which is called a check digit) is appended as the last digit of the code. The code constructed in this way is called a midulus-11 check digit code. Indian Institute of Science Bangalore System Analysis and Design Prof. V.Rajaraman 18. After data entry the digits in the code starting from the last digit are multiplied by weights 1, 2, 3, 4, etc., and the products are added. The sum is divided by 11. If the remainder is not zero then there is an error in the code. 19. Modulus-11 check digit code guarantees detection of all single transcription and transposition errors. It also detects 95% of all other errors. 20. It is essential to design good data validation programs to prevent data entry errors from corrupting files of input data. Validation programs need information for detecting errors. This information is provided by controls exercised during data preparation. 21. Important control mechanisms are; giving unique sequence numbers to each data record, providing a batch control record containing a count of number of records and a total of one of the fields.. 22. The same data is entered by two different persons and compared to reduce transcription errors. 23. Besides this, individual data fields are checked using information on their range of allowed values, range of reasonable values, and relationships between different fields. Batch control provides information to detect incorrect values entered, missing records, and data in the wrong sequence. 24. With the advent of Personal Computers, remote terminals connected to a computer and local computer networks, considerable amount of data is entered in files interactively. Indian Institute of Science Bangalore Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Worked Out Problems Worked Examples 7.1 What is the purpose of data validation program? To detect errors which may have been made by a data entry operator in entering data from forms into a computer’s secondary memory. The detected errors are then corrected to ensure that data file has no errors. 7.2 What are the main principles used in designing forms for data entry? (i) Reduce human efforts in filling forms (ii) Minimize possibility of errors in entering data from forms into a computer’s secondary memory (iii)Minimize effort in entering data from forms into a computer’s secondary memory. 7.3 Design a form to be used by a salesman to report to the office about the sales executed by him at different customer locations See Table below A Salesperson Form Sales Person Your name : M . R A M A M U R T H Y Your code : M R 4 Your budget code: 1 2 Sales details D D M M Y Y Date: Item Code Description Qty. Sold Price K 2 4 8 Toilet soap 256 3.50 J 4 6 8 Detergent cake 468 2.25 P 7 6 4 Liquid soap bottles 28 8.45 752 14.20 Enter Totals V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/1 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Worked Out Problems Customer details Customer name: Customer code: Customer address: PIN Mode of payment (Tick code) 1 CASH 2 CHEQUE 3 BILL 7.4 Is concise code comprehensive? If not, why? No. In a concise code the aim is to keep the length of the code small whereas in a comprehensive code it is to include as much information as possible about the entity being coded. 7.5 Is meaningful code necessarily comprehensive? No. Meaningful code aids in recognizing the entity being coded whereas a comprehensive code tries to include as much information as possible about the entity being coded. For example BICYCLE 24 indicates a 24 inch height cycle. It is meaningful. A code such as BC 24 G R HERO 2684 Describes 24-inch bicycle, which is for gents, red in color, manufactured by Hero with serial number 2684. 7.6 What is the advantage of serial number code? Why is it not normally used? It is concise, expandable and precise. It is not meaningful or comprehensive and thus not often used. 7.7 Design a group classification code to code (i) motor vehicles, (ii) music cassettes, and (iii) books. (i) Motor vehicles Types of vehicle 2 alphabets Year of manufacture 4 digits Engine CC 4 digits Brand Serial no. 3 alphabets 7 digits Mnemonic codes Vehicle types Two wheeler Three wheeler Private car Taxi Bus V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore code TW RW PC TA BU Manufacturer Bajaj Telco Leyland Maruti Ambassador Vespa Code BAJ TEL LEL MAR AMB VSP M7/V1/July 04/2 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Worked Out Problems Fiat Honda FAT HDA Sample code: PC 19 88 800 MAR 0056789 (ii) Music cassettes Types of music Nature of music Type Publisher code Serial no. 2 alphabets 2 alphabets 3 digits 1 digit 4 digits Mnemonic codes Music type Code Nature of music Code Classical North Classical South Classical West Film North Film South Film West Pop North Pop South Pop West CN CS CW FN FS FW PN PS PW Instrumental Vocal Orchestra Chorus IN VO OR CH Type Mono Stereo Code 1 2 Publisher code: 3 digits, Serial no.: 4 digits. Example: FNIN14506784 (iii) Books ISBN code is a good example. Area U.S. U.K. Germany, U.S.S.R. etc. Example: 0 Publisher code Book no. 8 digits (Total) Check digit Publishers publishing a small number of books have a long publisher code and smaller no. of digits for book no. | 87692 | 617 | 0 7.8 Give an example of significant code. Are significant codes expandable? Code for a shirt SH 40 95 58 Shirt Collar size (Cm) Chest size (Cm) Sleeve size (Cm) Yes. 7.9 Add a modulus-11 check digit to the codes (i) 48467 (ii) 96432 and (iii) 87646257. Check digits are respectively (i) 9 (ii) 8 (iii) 3. V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/3 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Worked Out Problems 7.10 Modulus–37 check is suitable for alphanumeric codes. Add a modulus-37 character to the codes (i) 4AB9W (ii) XBY483 and (iii) CAZ4642. (i) 2 (ii) N (iii) N. 7.11 If modulus-11 check digit system is to generate detection of multiple identical digit transcription error (i.e., a code such as 45565 is wrongly entered as 48868), what should be constraints on the weights? A digit t becomes x for weights wq, wr, ws. Let wi be the weights. n ∑ widi = p.N if no error i=1 n n ∑ widi = ∑ widi + (wq+ wr+ ws)t =p.N i=1 i=1 i == q,r,s The condition for detecting error is (wq + wr + ws)(x – t) == p.N Therefore, (wq + wr + ws) == p.N Sum of any subset of weights should not be equal to 11 or a multiple of 11. Possible only for codes less than 4 digits long, including check digit. 7.12 A see-saw error is one in which one digit of the code is increased by x and another decreased by x. For example, 486732 becoming 456762. When can modulus-N check detect such errors? Let the kth digit become (dk + t) and qth digit (dq – t) Weighted sum = ∑n i =1 widi + wkt – wqt with these errors condition is ∑n widi + t(wk – wq) == p.N Satisfied if (i) wk == wq (ii) N is prime (iii) |wk – wq| < N These are satisfied if wk = wq, wk, wq > 0 and wk, wq < N. Therefore all weights are distinct i =1 7.13 Why is it useful to assign sequence numbers for data records? What are the types of errors detected by sequence numbering? Can trace missing records using sequence numbers. Records out of sequence can be detected. Excess records (with duplicate sequence numbers) can be detected. 7.14 A set of data records for student examination results has the following format: Roll No. Name V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore Marks (out of 100) M7/V1/July 04/4 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Paper 1 Paper 2 Worked Out Problems Paper 3 Paper 4 Design for these records a batch control record and a record control field and other appropriate checks for the fields Batch control record (i) No. of records in batch (ii) Sum of marks in papers 1 to 4 (iii) No. of records with marks in papers 1 to 4 >=60 (iv) No. of records with marks in papers 1 to 4 < 40 Record check (i) Sum of marks in papers 1 to 4, (ii) No. of papers in record with marks >= 60 Other checks for the fields (i) Modulus-11 check for Roll no. (ii) Each marks field <= 100, >= 0 (iii) Sum field <= 400 (iv) Flag record with marks in any paper >= 80 and another paper <= 30. 7.15 What is the difference between range check and radix check? Range gives maximum allowable value for a field as determined by the analyst. For example in one paper if maximum marks is 50, range check will use 50 and if it is 100 in another it will use 100 as range. Radix is however an invariant. No. of hours/day are always 24 and is universally known. 7.16 Give some examples of fields where reasonableness check would be applicable. If normal electricity consumption of a consumer is 250 kWh/month, a value of 1500 kWh in a month will be considered unreasonable. Other examples are: (i) Deductions in a paybill (ii) Price/unit of some items (iii)Qty. ordered in comparison to normal averages. 7.17 Give some examples of inter-field relationship checks Employee status vs. salary Age vs. marital status (Age <= 12 cannot normally be married) Age vs. Education 7.18 Design a dialogue hierarchy for entering data on customers (of a manufacturer). Select Menu alternative 1 2 3 New customer Delete customer Change customer details Enter details Enter details Details to be changed Verify OK V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore No New name New address Status change M7/V1/July 04/5 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Delete Worked Out Problems Manual 0 1 2 3 Individual Retailer Distributor Wholesale Design a dialogue hierarchy and the screens for a system used to reserve seats in long distance buses. 7.19 Select Menu alternative 1 2 3 Reservation Cancellation Change of date Queries to customer Queries to customer 1. Destination 1. Destination 2. Date 2. Date 3. Time 3. Time 4. No. of seats 4. No. of seats 5. Display position 5. Display refund of seats (status) 6. Enter selection 7. Display ticket Queries to customer 1. Destination 2. Date 3. Time 4. New date 5. New time 6. No. of seats 7. Display position 8. Enter selection 9. Display excess charge Screen 1 • • • • • Reservation 1 Cancellation 2 Change of date Screen 2 reservation commands What is your destination ? • Queries on terminal Mercara User responses Date of journey? 260589 Time of bus 0830 How many seats? • Adults 2 • child 1 Screen display Front (Seats in bus) 1 2 Entrance 4 5 6 7 8 9 10 11 12 13 14 V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore 3 3 already booked M7/V1/July 04/6 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Worked Out Problems 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 • Which seats do you want ? 19 20 21 • Ticket display DESTINATION DATE TIME SEAT Nos. FARE MERCARA 260589 0830 19 Rs. 140 V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore 20 21 M7/V1/July 04/7 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design 7.1 A data dictionary has consolidated list of data contained in (i) dataflows (ii) data stores (iii) data outputs 7.2 Multiple Choice Questions (iv) processes a. (i) and (iii) b. (i) and (ii) c. (ii) and (iv) d. (i) and (iv) A data dictionary is useful as (i) it is a documentation aid (ii) it assists in designing input forms (iii) it contains al data in an application including temporary data used in processes (iv) it is a good idea in system design 7.3 7.4 7.5 7.6 a. (i) and (ii) b. (i) and (iv) c. (i),(ii) and (iii) d. (i) and (iv) By metadata we mean a. very large data b. data about data c. data dictionary d. meaningful data A data dictionary is usually developed a. At requirements specification phase b. During feasibility analysis c. When DFD is developed d. When a datadase is designed A data dictionary has information about a. every data element in a data flow b. only key data element in a data flow c. only important data elements in a data flow d. only numeric data elements in a data flow A data element in a data dictionary may have a. only integer value b. no value c. only real value d. only decimal value V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/1 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design 7.7 Multiple Choice Questions A data element in a data flow (i) may be an integer number (ii) may be a real number (iii)may be binary (iv)may be imaginary a. (i),(ii),(iv) b. (iii),(iv),(ii) c. (i),(ii),(iii) d. (i) and (ii) 7.8 It is necessary to carefully design data input to a computer based system because a. it is good to be careful b. the volume of data handled is large c. the volume of data handled is small d. data entry operators are not good 7.9 Errors occur more often when a. data is entered by users b. data is entered by operators c. when data is handwritten by users and entered by an operator d. the key board design is bad 7.10 Good system design prevents data entry errors by (i) Designing good forms with plenty of space to write in block capitals (ii)By giving clear instructions to a user on how to fill a form (iii)Reducing keystrokes of an operator (iv)Designing good keyboard a. i, ii, iii b. i, ii, iv c. i, ii d. iii and iv 7.11 In on-line data entry it is possible to a. Give immediate feedback if incorrect data is entered b. Eliminate all errors c. Save data entry operators time d. Eliminate forms 7.12 The main problems encountered in off-line data (i)Data are entered by operators V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore entry are: M7/V1/July 04/2 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Multiple Choice Questions (ii)Data entered by hand in forms batched and forms may be missed or misread (iii) Errors are detected after a lapse of time (iv)Data are entered by users 7.13 7.14 7.15 7.16 7.17 7.18 7.19 7.20 a. i and ii b. i and iii c. ii and iii d. iii and iv In interactive data input a menu is used to a. enter new data b. add/delete data c. select one out of many alternatives often by a mouse click d. detect errors in data input In interactive data input a template is normally used to a. enter new data b. add/delete data c. select one out of many alternatives often by a mouse click d. detect errors in data input In interactive data input terminal commands are normally used to a. enter new data b. add/delete data c. select one out of many alternatives often by a mouse click d. detect errors in data input Data inputs which required coding are a. fields which specify prices b. key fields c. name fields such as product name d. fields which are of variable length Key fields are normally coded a. i and ii b. i and iv c. ii and iii d. i and iii A code is useful to represent a key field because a. it is a concise representation of the field b. it is usually done by all c. it is generally a good idea d. it is needed in database design By the term “concise code” we understand that the code a. conveys information on item being coded b. is of small length c. can add new item easily d. includes all relevant characteristics of item being coded By the term “expandable code” we understand that the code a. conveys information on item being coded b. is of small length V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/3 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design 7.21 7.22 7.23 7.24 Multiple Choice Questions c. can add new item easily d. includes all relevant characteristics of item being coded By the term “meaningful code” we understand that the code a. conveys information on item being coded b. is of small length c. can add new item easily d. includes all relevant characteristics of item being code By the term “comprehensive code“ we understand that the code a. conveys information on item being coded b. is of small length c. can add new item easily d. includes all relevant characteristics of item being coded A concise code is necessarily a. Precise b. Meaningful c. Comprehensive d. Difficult Serial numbers used as codes are (i) concise (ii ) meaningful (iii) expandable (iv) comprehensive a. i and ii b. ii and iii c. ii and iv d. i and iii 7.25 Block codes are (i)concise (ii )meaningful (iii)expandable (iv)comprehensive a. i and ii b. ii and iii c. iii and iv d. i and iii 7.26 Group classification codes are (i)concise (ii)meaningful (iii) expandable V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/4 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Multiple Choice Questions (iv)comprehensive a. i and ii b. i, ii and iii c. ii, iii and iv d. i, ii and iv 7.27 Significant codes are (i)concise (ii)meaningful (iii )expandable (iv)comprehensive 7.28 7.29 7.30 7.31 7.32 a. i and ii b. i, ii and iii c. ii, iii and iv d. i, ii and iv In significant codes some or all parts of the code a. are meaningful b. are usable c. are significant d. represent values Errors in codes are detected by a. proper design of code b. introducing redundant digits/characters designed to detect errors c. making the code concise d. making the code precise Design of error detecting codes requires good a. knowledge of mathematics b. statistical mechanics c. statistics of errors normally committed during data entry d. Boolean algebra A modulus-11 check digit is used to detect error in a. alphanumeric codes b. numeric codes c. hexadecimal codes d. serial number code A modulus-11 check digit will detect (i)single transcription errors (ii)single transposition errors (iii)multiple digit transcription errors (iv)and correct a single error a. b. c. d. i and iii i and iv i and ii iii and iv V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/5 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Multiple Choice Questions 7.33 A modulus-17 check will detect single transcription errors in a. alphanumeric codes b. hexadecimal codes c. decimal numerical codes d. serial number codes 7.34 For modulus-11 check digit to detect a single transposition errors a. weights should all be distinct b. weights may all be equal and > 0 c. weights should be less than 8 d. weights should all be > 0 and distinct 7.35 For modulus-11 check digit to detect a single transcription errors a. weights should all be distinct b. weights may all be equal and > 0 c. weights should be less than 8 d. weights should all be > 0 and distinct 7.36 Modulus-11 check digit for the code 45672 is a. 0 b. 1 c. 2 d. 3 7.37 Modulus-11 check digit for the code 85672 is a. 0 b. 1 c. X d. 3 7.38 For modulus-11 check digit to detect single transposition or single transcription error the number of digits in the codes should not exceed a. 9 b. 10 c. 11 d. 99 7.39 Modulus-17 check character for the hexadecimal code AB4567 is a. F b. D c. 1 d. 0 7.40 Sequence numbering of records is used to (i)Identify each record uniquely (ii)Track a missing record in a batch of records (iii)Count number of records (iv) Sort the records a. b. c. d. i, ii i, ii, iii i, ii, iii, iv i and iv V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/6 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Multiple Choice Questions 7.41 A batch control record uses (i)Batch totals of selected fields (ii)A simple count of number of records in a batch (iii)Modulus-11 check digit of each key field (iv)Totals of selected fields of record totalled for the batch 7.42 7.43 7.44 7.45 7.46 7.47 7.48 a. i and ii b. i, ii, iv c. i, ii, iii, iv d. iii and iv A record total uses a. batch totals of selected fields b. count of numbers of records c. modulus-11 check digit sum of all fields d. total of selected fields of a record If a field is known to represent an angle of a triangle, radix used to check should be a. 90 b. 60 c. 180 d. 360 If a field is known to represent days of a month, radix used to check should a. 30 b. 31 c. 28 d. 29 Radix check for a field representing year is a. Possible b. not possible c. not relevant d. may be tried An appropriate range check for marks in an examination paper whose maximum marks 100 is a. 100 b. 0 to 100 c. – 99 to +99 d. 99 An appropriate range check for month field in a date is a. 12 b. –12 to 12 c. 1 to 12 d. 0 to 12 An appropriate range check of age of a tenth standard student in a high school a. 5 to 15 b. 10 to 25 V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/7 Prof. V.Rajaraman System Analysis and Design System Analysis and Design/Data Oriented Systems Design Multiple Choice Questions c. 8 to 20 d. 3 to 18 7.49 Reasonableness checks for monthly mess bill of a student if daily rate is Rs. 40 is a. 1200 b. 12000 c. 120 d. 2400 7.50 Batch control totals will detect (i)incorrect data entry of a field (ii)missing record (iii) data records out of order ( iv)inconsistent data a. i and ii b. i, ii and iii c. ii, iii and iv d. iii and iv 7.51 If records are out-of-order then error may be detected by a. batch control totals b. radix check c. sequence number check d. range check 7.52 In payroll record a reasonable inter-field relationship check is to relate salary field with a. age field b. department field c. designation field d. increment field V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/8 System Analysis and Design System Analysis and Design/Data Oriented Systems Design Prof. V.Rajaraman Multiple Choice Questions Key to Objective Questions 7.1 b 7.2 c 7.3 b 7.4 c 7.5 a 7.6 b 7.7 c 7 .8 b 7.9 c 7.10 a 7.11 a 7.12 c 7.13 c 7.14 a 7.15 b 7.16 b 7.17 d 7.18 a 7.19 b 7.20 c 7.21 a 7.22 d 7.23 a 7.24 d 7.25 b 7.26 c 7.27 c 7.28 d 7.29 b 7.30 c 7.31 b 7.32 c 7.33 b 7.34 d 7.35 b 7.36 b 7.37 c 7.38 b 7.39 b 7.40 c 7.41 b 7.42 d 7.43 c 7.44 b 7.45 b 7.46 b 7.47 c 7.48 c 7.49 d 7.50 a 7.51 c 7.52 c V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/9 Prof. V.Rajaraman System Analysis and Design System Analysis and Design / Data Oriented Systems Design Question Bank Question Bank – 7 7.1 What is a data dictionary? 7.2 Why is a data dictionary necessary? 7.3 What are the main advantages of creating a data dictionary? 7.4 What data about a data element is stored in a data dictionary? 7.5 For the requirements statement given in PPT 7.1.3 (Vendor supplying items to a company) develop the data dictionary entry for vendor code, vendor name and vendor address. 7.6 What is the difference between on-line and off-line data entry? 7.7 Why are input data records divided into batches for off-line data entry? 7.8 What is the purpose of a data validation program? 7.9 What are the main principles used in designing forms for data entry? 7.10 A good and a bad design for entering date in a form is given in Section PPT 7.2.5 and 7.2.6. What are the reasons for saying that one of them is good and the other bad? 7.11 Design a form to be used by a salesman to report to the office about the sales executed by him at different customer locations. 7.12 What is the main difference between menus, templates and command modes of interactive data entry? When is each of these modes appropriate? 7.13 Design a dialogue hierarchy for entering data on customers (of a manufacturer). 7.14 Design a dialogue hierarchy and the screens for a system used to reserve seats in long distance buses. 7.15 Why are data fields coded in an information system? 7.16 Can the name of a person be used as a code, for say, his bank account? If not, why? V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/1 Prof. V.Rajaraman System Analysis and Design System Analysis and Design / Data Oriented Systems Design Question Bank 7.17 What are the requirements of a good coding scheme? 7.18 Is a concise code comprehensive? If not, why? 7.19 Is a meaningful code necessarily comprehensive? 7.20 Is a comprehensive code necessarily meaningful? 7.21 Is a precise code necessarily concise? 7.22 What is the advantage of a serial number code? Why is it not normally used? 7.23 What is the main advantage of block codes? 7.24 Design a group classification code to code (i) motor vehicles,, (ii) music cassettes, and (iii) books 7.25 Is a group classification code meaningful? 7.26 Give an example of a significant code. Are significant codes expandable? 7.27 Add a Modulus-11 check digit to the codes (i) 48467, (ii) 96432, and (iii) 87646257. 7.28 Modulus-37 check is suitable for alphanumeric codes. Add a modulus-37 character to the codes (i) 4AB9W, (ii) XBY483, and (iii) CAZ4642. 7.29 The following code was entered by an operator:449632. The last digit is a modulus-11 check digit. Is this code correct? 7.30 If a code uses hexadecimal digits, what should be N if the modulus-N check digit system is to be used with such codes? What are the allowable weights if single transcription and transposition errors are to be detected? 7.31 If modulus-11 check digit system is to generate detection of multiple identical digit transcription error (i.e., a code such as 45565 is wrongly entered as 48868), what should be the constraints on the weights? V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/2 Prof. V.Rajaraman System Analysis and Design System Analysis and Design / Data Oriented Systems Design Question Bank 7.32 A see-saw error is one in which one digit of the code is increased by x and another decreased by x. For example, 486732 becoming 456762. When can modulus N check detect such errors? 7.33 Why is it useful to assign sequence numbers for data records? What are the types of errors detected by sequence numbering? 7.34 What is the purpose of batch control record? What is the type of information contained in a batch control record? A set of data records for student examination results has the following format: Roll no. Name Marks (out of 100) Paper 1 Paper 2 Paper 3 Paper 4 Design for these records a batch control record and a record control field and any other appropriate checks for the fields. 7.35 Give some example of fields for which a radix error check is appropriate. 7.36 What is the difference between range check and a radix check? 7.37 What are the appropriate range checks for the age of individuals in an employee file, a high school student file, and height of students in a student file. 7.38 Give some examples of fields where reasonableness check would be applicable. 7.39 Give some examples of inter-field relationship checks. 7.40 What is the main difference between menus, templates and command modes of interactive data entry? When is each of these modes appropriate? 7.41 Design a dialogue hierarchy for entering data on customers (of a manufacturer). 7.42 Design a dialogue hierarchy and the screens for a system used to reserve seats in long distance buses. V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/3 Prof. V.Rajaraman System Analysis and Design System Analysis and Design /Data Oriented Systems Design Pointers References 1. Most of the material in this module has been adapted from the book “Analysis and Design of Information Systems”, 2nd Edition, by V.Rajaraman, Prentice Hall of India, 2003. Chapter 5 (pp. 49-52) and Chapter 11 (pp.154-170). 2. Good material on Data Dictionary is found in K.E.Kendall and J.E.Kendall , “Systems Analysis and Design”, 5th Edition, Pearson Education Asia, 2003. Chapter 10 on Data Dictionaries. Chapter 16 Designing Effective Input. V. Rajaraman/IISc. Bangalore Indian Institute of Science Bangalore M7/V1/July 04/1
© Copyright 2025 ExpyDoc