University of Toronto. CSC340S - Information Systems Analysis and Design

Similar documents
University of Toronto. CSC340S - Information Systems Analysis and Design

CS164: Midterm I. Fall 2003

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

Schema And Draw The Dependency Diagram

VIEW OTHER QUESTION PAPERS

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

Question Marks 1 /20 2 /16 3 /7 4 /10 5 /16 6 /7 7 /24 Total /100

Assignment 1: Entity-Relationship Model Solution

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

CS 186 Midterm, Spring 2003 Page 1

NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE

CS 2505 Computer Organization I

Occam & C++ Translator

Student Number: Instructor: Brian Harrington

Last Name Student Number. Last Name Student Number

Example Examination. Allocated Time: 100 minutes Maximum Points: 250

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

1. Consider the following program in a PCAT-like language.

Computer Systems Ms Jennifer. Ms Jennifer Senior 4 1

Ms. Payne, WCSS. This is very much like asking a question, and having a yes/no answer (also known a true/false). The general structure for this is:

Examination paper for TDT4145 Data Modelling and Database Systems

CSC 261/461 Database Systems Lecture 8. Spring 2018

Entity-Relationship Model. From Chapter 5, Kroenke book

UNIVERSITY OF TORONTO Faculty of Arts and Science. December Examinations Duration 3 hours

CS 4400 Introduction to Database Systems 2002 Spring Term Project (Section A)

Chapter 2: Entity-Relationship Model

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2005

CS 536 Midterm Exam Spring 2013

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

University of Toronto Department of Computer Science

How to speed up a database which has gotten slow

CSE 880:Database Systems. ER Model and Relation Schemas

Database Applications (15-415)

CSE P 501 Compilers. LR Parsing Hal Perkins Spring UW CSE P 501 Spring 2018 D-1

Lexical Analysis. COMP 524, Spring 2014 Bryan Ward

Database Applications (15-415)

CSC 407 Database System I COURSE PARTICULARS COURSE INSTRUCTORS COURSE DESCRIPTION

Largest Online Community of VU Students

Chapter 2. Database Design. Database Systems p. 25/540

The Entity Relationship Model

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as:

THE COPPERBELT UNIVERSITY

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

Logical Database Design. ICT285 Databases: Topic 06

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

Lectures 12: Design Theory I. 1. Normal forms & functional dependencies 2/19/2018. Today s Lecture. What you will learn about in this section

CHALMERS UNIVERSITY OF TECHNOLOGY Department of Computer Science and Engineering Examination in Databases, TDA357/DIT620 Thursday 27 March 2008, 08:30

Conceptual Data Models for Database Design

Intro to DB CHAPTER 6

Project Assignment 2 (due April 6 th, 2016, 4:00pm, in class hard-copy please)

Usability Test Report: Bento results interface 1

Compiler Construction D7011E

The Relational Data Model

BCNF. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong BCNF

COMP Instructor: Dimitris Papadias WWW page:

II. Review/Expansion of Definitions - Ask class for definitions

Written Exam Data Warehousing and Data Mining course code:

ECE573 Introduction to Compilers & Translators

XV. The Entity-Relationship Model

Spark is a mobile application that allows teachers to capture, track, and and share their students important learning moments.

EXAMINATION INSTRUCTIONS

Scheme: Data. CS F331 Programming Languages CSCE A331 Programming Language Concepts Lecture Slides Monday, April 3, Glenn G.

STRUCTURED SYSTEMS ANALYSIS & DESIGN

CMPE 152 Compiler Design

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

NAVIGATING THE PARENT PORTAL

Course on Database Design Carlo Batini University of Milano Bicocca

EDMS. Architecture and Concepts

Contents. Database. Information Policy. C03. Entity Relationship Model WKU-IP-C03 Database / Entity Relationship Model

LBSC 690: Information Technology Lecture 05 Structured data and databases

Chapter 2 Conceptual Modeling. Objectives

IMPORTANT: Circle the last two letters of your class account:

Lecture 3. Wednesday, September 3, 2014

Black Box Testing (revisited) Csci 565 Spring 2007

CS145 Final Examination

Chapter 6: Entity-Relationship Model

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

CS/INFO 330 Entity-Relationship Modeling. Announcements. Goals of This Lecture. Mirek Riedewald

MIS Database Systems Entity-Relationship Model.

Click on the Start Icon. Click on All Programs

Assignment 3: Relational Algebra Solution

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems

Syntactic Analysis. The Big Picture Again. Grammar. ICS312 Machine-Level and Systems Programming

EXAMINATION INSTRUCTIONS

Chapter 6: Entity-Relationship Model

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Homework 6: FDs, NFs and XML (due April 13 th, 2016, 4:00pm, hard-copy in-class please)

namib I A U n IVERS I TY

User Experience for Choosing Flight Dates

EXAMINATION INSTRUCTIONS

Software Engineering I (02161)

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

Final Exam 1 /12 2 /12 3 /10 4 /7 5 /4 6 /10 7 /8 8 /9 9 /8 10 /11 11 /8 12 /10 13 /9 14 /13 15 /10 16 /10 17 /12. Faculty of Computer Science

Cover sheet for Assignment 3

Program Proposal for a Direct Converted Program. BS in COMPUTER SCIENCE

Exam Duration: 2hrs and 30min Software Design

Searching for Information SEARCHING FOR INFORMATION

GUJARAT TECHNOLOGICAL UNIVERSITY

CS352 Lecture - The Entity-Relationship Model

Transcription:

csc340 Information Systems Analysis and Design page 1/12 University of Toronto Faculty of Arts and Science Department of Computer Science CSC340S - Information Systems Analysis and Design Spring 2002 John Mylopoulos April-May Examination No Aids Allowed Duration: 2 hours Make sure that your examination booklet has 12 pages (including this one). Write your answers in the space provided. This examination counts for 35% of your final mark. Name: (Please underline your last name) Student Number: Question Marks 1. /15 2. /15 3. /15 4. /20 5. /10 6. /25 Total /100

csc340 Information Systems Analysis and Design page 2/12 The Toronto Public Libraries (hereafter TPL) is a public organization managing the 99 public libraries that operate in Metro Toronto. TPL has decided to redesign its collection material database. Currently, the database holds information on: Books, videos and CDs available for borrowing; Every item (book, video, CD) has a unique collection #, a title, and an ISBN# which is unique for every publication; every item may be in good order or damaged (see below); note that if there are 10 copies of a single book, they have distinct collection #s, but identical ISBN#s; Books can be in English, or another language; in either case, the database stores the language the book is written in; Books have a publisher and one or more authors; CDs and videos have a unique producer, and one or more artists. In addition, the database maintains data on library users and their borrowed material: Each user has a unique userid, address, phone#; users can be adults, children or seniors; seniors can borrow material for longer periods, while children pay a nominal fine of $0.05/day for un-returned material; When a user selects an item to be borrowed, the library clerk updates the database, recording userid, collection#, and date of borrowing; When a user returns an item, the library clerk updates the database, recording the date when the item was returned; if the item is overdue, the clerk also collects a fine calculated as DaysLate * fine/day; the fine per day amount is $0.50, $0.05, $1.00 for seniors, children and adult users respectively; the clerk also records (in the database) the fine collected, if any; in addition, the clerk checks if the returned item is damaged, and if so, records this information (in the database, again). To add new material to the collection, TPL orders it from XYZ Co., a wholesale supplier. When it arrives, it is catalogued (i.e., an entry is added to the database) and it is made available in some library. Damaged and unused material is removed from the collection. This is done once every six months. The process consists of selecting all items that are damaged, or haven't been borrowed in the last year, and physically removing them from the collection. Note: The above description is complex, may leave details out and supply unnecessary information. You will need to make some assumptions about the problem for the parts below. MAKE SURE you write your assumptions down!

csc340 Information Systems Analysis and Design page 3/12 1. [Entity-Relationship Diagrams; 15 marks] Draw an Entity-Relationship diagram that represents the information about collection materials, users and borrowings handled by the TPL database. Make sure to specify clearly the attributes of every class and relationship, as well as cardinalities and keys. Your solution should be an Entity-Relationship diagram, NOT a UML class diagram! Sample solution borrowdate collection# title ISBN Item (0,N) (0,N) Borrow Return (0,N) (0,N) User userid phone address publisher Book (1,N) Video author CD language (1,N) producer artist producer (1,N) artist returndate Adult Child Senior

csc340 Information Systems Analysis and Design page 4/12 2. [Sequence Diagrams; 15 marks] Draw a sequence diagram that describes how returned material is handled by TPL. The sequence diagram should show interactions between a user, a clerk and the TPL database during the process of having a user return a borrowed item. Make sure to show explicitly conditional interactions. Sample solution User Clerk TPLDB receiveitem [damaged?] calculatecharge(item) [undamaged?] getpurchaseprice(item) [late?] calculatefine(user) amountowed [amount>0]pleasepay [amount>0]receive(payment) thanks updaterecord(item,payment)

csc340 Information Systems Analysis and Design page 5/12 3. [State Diagrams; 15 marks] Draw up a state diagram that describes the lifetime of a collection item from the moment it is ordered by TPL until it is removed from the TPL collection. For each state, specify entry, exit, and do actions. For each transition, specify relevant events, conditions and actions. Sample solution /order Waiting for item to arrive arrived Preparing Do/catalogue Exit/place in library /makeavailable On loan returned [damaged?] /requestpayment(itemprice) &updaterecord() &removeitem() borrowed/ updaterecord() returned [undamaged?&ontime?] /updaterecord() returned [undamaged?&late?] /requestpayment(fine) &updaterecord() Available when(beginningof6months) [toberemoved?] /updaterecord() &removeitem()

csc340 Information Systems Analysis and Design page 6/12 4. [Database Design; 20 marks] Suppose you are given the Entity-Relationship (ER) schema shown below. It describes the contents of a student database for Ontario universities. All attributes are assumed to be single-valued. In addition, you may assume that there are students who are neither undergraduate nor graduate (special students, allowed to take courses but not studying towards a degree). startyear name addr Student st# Attends (1,1) (1,N) University name city Undergrad average startdate Graduate (1,2) Supervisor (0,N) thesistitle Professor name dept [Part a; 10 marks] Draw an ER schema that captures the same information as the diagram above, but does not have any generalization relationships. startyear name addr Student (1,1) Undergrad average (0,1) haspart (0,1) st# Attends (1,1) (1,N) haspart (1,1) Graduate thesistitle University startdate (1,2) Supervisor (0,N) name city Professor name dept

csc340 Information Systems Analysis and Design page 7/12 [Part b; 10 marks] Give a relational schema that captures the same information as your ER schema of part (a). Show clearly keys for each relation in your schema. Student(st#,univName,name,addr,startDate) University(name,city) Undergrad(st#,univName,average) Graduate(st#,univName,thesisTitle) Professor(name,dept) Supervisor(st#,univName,profName,startDate)

csc340 Information Systems Analysis and Design page 8/12 5. [Decision Tables; 10 marks] Assume that A, B, C are Boolean variables, X, Y, Z are outcomes. Propose a decision table for the following procedure: If A then if B then X else if C then Y else Z endif endif else if C then X else Z endif endif Make sure your final table is in simplified form, i.e., does not have redundant rows or columns. Unsimplified form A T T T T F F F F B T T F F T T F F C T F T F T F T F X x x x x Y x Z x x x Simplified form A T T T F F F F F B T F F * * T F F C X * T F T F F T F x x x Y x Z x x x x 5 marks for getting the structure of the table right (ie, 6 rows, 8 columns, labels) 8 marks for getting the unsimplified table right.

csc340 Information Systems Analysis and Design page 9/12 6. [Short Questions; 25 marks total] [Database Design; 5 marks] Consider a relation R( A,B,C,D) with primary key A,B and functional dependency C->D. Place this relation in 3NF, or explain why it is already in 3NF. R( A,B,C) R'( C,D) -1 mark for doing R'(C, D ) 1 mark (total) for saying something wrong (but not altogether outrageous ) [Interface Design; 5 marks] Consider the design of an interface for a computer-supported 2-person game, such as chess or checkers. Assume that the game starts with the computer sending a message to usera prompting her for a move. UserA responds with a move, and the computer checks if it is a winning move. If so, the computer announces the win, else it prompts userb for a move. Again, once the move is in, the computer checks if it is a winning move and if not prompts usera for a move, etc. Draw a state diagram that describes the dialogue structure of this interface. Make sure to describe clearly events, conditions and actions associated with each transition of your diagram. start userbmove Computer checks UserB thinks userbquits [nowin]computerpromp() [Win]announceResult() [Win]announceResult() useraquits [nowin]computerprompt() UserA thinks Computer checks useramove 2.5 marks for getting states, transitions right 2.5 marks for getting events, conditions actions right

csc340 Information Systems Analysis and Design page 10/12 [Software Architectures; 5 marks] Consider a software system that compiles programs written in a high-level programming language (e.g., Java) into assembly language programs. The compiler consists of four components: Lexer, Parser, Optimizer and Code Generator. The Lexer reads the input program (an ascii file) and produces a stream of word tokens which are fed into the Parser. The Parser reads in tokens and produces a stream of parse trees, one for each statement of the input program. The Optimizer processes parse trees as they become available by transforming each to another parse tree using optimizing transformations. Finally, the Code Generator takes in optimized parse trees as they become available, and produces assembly language code which is written on an output file. Define a software architecture for such a software system, using one of {pipes-and-filters, data abstraction, layered, event-driven, repository-based}. Make sure to explain and justify your choice. Pipes-and-filters Code Tokens Parse tree Lexer Parser Optimizer Parse tree Assembly language code Code Generator [User Interface Design; 5 marks] Give one example each for a feedback and a forcing function feature from the Netscape or Explorer user interface. (Netscape) Feedback: When the system is downloading a file, clouds are flashing by the big Netscape N in the top righthand corner Forcing Function: When you are looking at a webpage, some of the icons at the top of the window are faded, indicating that the corresponding function is not available. [Database Transactions; 5 marks] Explain the difference between a database transaction and a programming language procedure. A database transaction either executes completely or not at all (i.e., is atomic). If there is a problem in the middle of the execution, all changes done by the transaction are undone and the database returns to the state it was before the transaction started executing. Of course, programming language procedures are not atomic.

csc340 Information Systems Analysis and Design page 11/12 [Scratch paper]

csc340 Information Systems Analysis and Design page 12/12 [Scratch paper]