COMP102: Introduction to Databases, 8 Dr Muhammad Sulaiman Khan Department of Computer Science University of Liverpool U.K. 18 February, 2011 Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Database Analysis and Design Techniques: Fact-Finding Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Specific topics for today: When fact-finding techniques are used in the database system development lifecycle (DSDLC). The types of facts collected throughout DSDLC. The types of documentation produced throughout DSDLC. The commonly used fact-finding techniques. How to use fact-finding techniques and their advantages/disadvantages. About a video rental company called StayHome. How to use fact-finding techniques in the early stages of DSDLC. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Fact-finding Fact-finding: The formal process of using techniques such as interviews and questionnaires to collect facts about systems, requirements, and preferences. When are fact-finding techniques used ? Many occasions for fact-finding during DSDLC. Particularly crucial to the early stages of DSDLC, including the database planning, system definition, and requirements collection and analysis stages. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 What facts are collected ? Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Fact-finding techniques A database developer normally uses several fact-finding techniques during a single database project, including: Examining documentation Interviewing Observing the business in operation Research Questionnaires Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Examining documentation Examining documents, forms, reports, and files associated with the current system, to quickly gain some understanding of the system. Examples of documentation to examine: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Interviewing Interviewing is the most commonly used, and normally most useful, fact-finding technique. Objectives include: Finding out and/or checking facts. Generating user interest and/or feelings of involvement. Identifying requirements and/or gathering ideas and opinions. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Advantages / disadvantages of interviewing: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Interviewing There are two types of interviews: unstructured and structured. Unstructured interviews: Conducted with only a general objective in mind and with few, if any, specific questions. Structured interviews: The interviewer has a specific set of questions to ask the interviewee. There are two types of questions: open-ended and closed-ended. Open-ended questions: allow the interviewee to respond in any way that seems appropriate. Closed-ended questions: restrict answers to either specific choices or short, direct responses. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Observing the business in operation One of the most effective techniques. Can either participate in, or watch a person perform activities to learn about the system. Advantages/disadvantages: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Research Useful to research the application and problem. Good sources of information: computer trade journals, reference books, the Internet. May find how others have solved similar problems, plus you can learn whether or not software packages exist to solve your problem. Advantages/disadvantages: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Questionnaires Can conduct surveys through questionnaires. Questionnaires are special-purpose documents that allow you to gather facts from a large number of people while maintaining some control over their responses. Two formats for questionnaires: free-format and fixed-format. Free-format questionnaires: offer the respondent greater freedom in providing answers. Fixed-format questionnaires: contain questions that require specific responses from individuals. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Advantages/disadvantages of questionnaires: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 The StayHome case study This case study describes a company called StayHome, which rents out videos to its members. The first branch of StayHome was established in 1982 in Seattle but the company has now grown and has many branches throughout the United States. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Examining documentation: StayHome staff registration form Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Example: StayHome–page of report listing members of staff: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Example: StayHome–page of report listing videos: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome member registration form: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Example: StayHome–page of report listing members: Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Example: StayHome–video rental form : Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome case study: database planning Define mission statement for the database project. Defines the major aims of the database system. Clarifies purpose of database and provides clearer path towards the efficient and effective creation of the required database system. Define mission objectives. Each mission objective identifies a particular task that the database must support. Additional information specifies, in general terms, the work to be done, the resources with which to do it, and the money to pay for it all. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Creating mission statement for StayHome: Interviewing Example: Interviewing the Director of StayHome: Database developer (DD): What is the purpose of your company ? Director: We provide a wade range of videos for rent to members registered at our branches throughout the US. DD: Why do you feel the you need a database ? Director: To be honest we can’t cope with our own success. Over the last few years we’ve opened several new branches, and at each branch we now offer a larger collection of videos to a growing number of members. However, this success has been accompanied by increasing data management problems, which means that the level of service we provide is falling. Also, there’s a lack of cooperation and sharing of information between branches. DD: How do you know that a database will solve your problems ? Director: All I know is that we’re drowning in paperwork. We need something that will speed up the way we work, that is, something to automate a lot of the day-to-day tasks that seem to take forever these days. Also, I want the branches to start working together. Databases do this, don’t they ? Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Mission statement for StayHome database system Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Creating mission objectives for StayHome: Interviewing Example: Interviewing the Director of StayHome: DD: What role do you play for the company ? Director: I oversee the running of the company to ensure that we continue to provide the best possible video rental service to our members. DD: What kinds of tasks do you perform in a typical day ? Director: I monitor the running of each branch by our Managers. I try to ensure that the branches work well together and share important information about videos and members. I oversee the work carried out by the Buyer for our company; that’s the person responsible for buying videos for all our branches. I normally try to keep a high profile with our branch Managers by calling into each branch once or twice a month. DD: What kinds of data do you work with ? Director: I need to be able to get my hands on everything used or generated by our company. That includes data about staff, videos, rentals, members, video suppliers, and video orders. I mean everything! DD: What types of reports do you use ? Director: I need to know what’s going on at all the branches. I get my information from various reports on staff, videos in stock, video rentals, members, video suppliers, and orders. DD: What types of things do you need to keep track of ? Director: As I said before, I need to track everything, I need to see the whole picture! DD: what service does your company provide to your members ? Director: We try to provide the best and most competitively priced video rental service in the US. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Creating mission objectives for StayHome: Interviewing Example: Interviewing an Assistant at StayHome: DD: What is your job description ? Assistant: My job title is Assistant. I deal directly with our members in providing a video rental service. DD: What kinds of tasks do you perform in a typical day ? Assistant: I answer queries from members about videos for rent. You know what I mean: “Do you such and such a video?” I process the renting out and return of videos. I restock the shelves with returned videos and when we are not too busy I try to file paperwork. DD: What kinds of data do you work with ? Assistant: Data about videos, rentals, and members. DD: What types of reports do you use ? Assistant: None. DD: What types of things do you need to keep track of ? Assistant: Whether certain videos are available for hire. DD: what service does your company provide to your members ? Assistant: We try to answer questions about videos in stock such as: “Do you have videos starring Ewan McGregor?” and “Who starred in or directed 2001 A Space Odyssey?” You wouldn’t believe what our members expect us to know, but luckily most of us work here because we’re really into films, so if I don’t know the answer, one of the others will. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Mission objectives for StayHome database system Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome case study: system definition Define scope and boundary of database system and its major user views. A user view represents requirements to be supported by a database system as defined by a particular job role (such as Manager or Assistant) or business application area (such as video rentals or stock control). Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Boundary for the StayHome database system Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 User views for the StayHome database system Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome case study: requirements collection and analysis Gather more details on user views to create users’ requirements specification, which describes data to be held in d database and how data is to be used. Collect general requirements for the system to create systems specification; describes features of the new database system, e.g., networking, shared access, performance, and security requirements. Decide how to manage project where database system has more than one user view. Three approaches to dealing with multiple user views: centralized approach; view integration approach; combination of both approaches. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Requirements collection and analysis: gathering more info on user views DD can ask the following questions: What type of data do you need to hold on X ? What sorts of things do you do with data on X ? Example: Interviewing a Manager at StayHome: DD: What type of data do you need to hold on staff ? Manager: The type of data held on a member of staff is his or her name, position and salary. Each member of staff is given a staff number , which is unique throughout the company. DD: What sorts of things do you do with data on staff ? Manager: I need to be able to enter the details of new members of staff and delete their details when they leave. I need to keep the details of staff up to date and print reports that list the name, position, and salary of each member of staff at my branch. I need to be able to allocate the Supervisors to look after staff. Sometimes when I need to communicate with other branches, I need to find out the names of Managers. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Requirements collection and analysis: gathering info on system requirements DD can ask the following questions in this case: DD: What transactions run frequently on the database ? Manager: Frequent questions, e.g., on the phone, asking for a particular video; if available for rent. DD: What transactions are critical to the operation of the business ? Manager: As above. DD: When do the critical transactions run ? Manager: Every day. DD: When are the low, normal, and high workload for the critical transactions ? Manager: Quiet in the mornings, busier as the day progresses. Busiest between 6 p.m. and 9 p.m., especially Fridays and Saturdays. DD: What type of security do you want for the database system ? Director: I don’t want our competitors to see our data on our members and video rentals. Staff should only see the data necessary to do their job. DD: Is there any highly sensitive data that should only be accessible to certain staff members ? Director: E.g., Supervisors should be able to see staff details, but I should be the only one to see salary details. DD: What historical data do you want to hold ? DD: What are the networking and shared access requirements ? DD: What kind of protection from failures or data loss do you want ? Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome: managing user views and data Cross-reference of user views and the main types of data in StayHome: Can use centralized approach to merge the Director and Buyer views under collective name Business user views. Use centralized approach to merge the views of the Manager, Supervisor and Assistant views under collective name Branch user views. Develop the local logical data models for the Business user views and for the Branch user views. Use view integration approach to the data models into the global logical data model. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome: creating the users’ requirements specification Data requirements (not complete): Each branch has branch address (street, city, state, zip code), phone numbers, given unique branch number. each branch has staff, including a Manager, one or more Supervisors, and other staff. Manager responsible for ..., each Supervisor for ... . The data held for each staff member is her name, position, salary, given unique staff number. Each branch is allocated a stock of videos. The data held for each video is ... Before renting a video from the company a member must first register ... Once registered the member is free to rent up to 10 videos at the same time, ... Transaction requirements (not complete): Data entry: Enter details of a new branch; Enter details of a new staff member; Enter details of a newly released video; Enter details of copies of a new video at a given branch; Enter details of a new member registering at a given branch; ... Data update/deletion: Update/delete details of a branch; Update/delete details of a staff member at a branch; Update/delete details of a given video; ... Data queries: List the details of branches in a given city; List the name, position and salary of a staff member in a given branch; List the details of all videos a specified member currently has on rent; ... Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome: creating the systems specification It should list all the important features of the StayHome database system, including: Initial database size (not complete): Approx. 20,000 video titles and 400,000 videos for rent distributed over 100 branches. On average 4000 and maximum 10,000 videos for rent at each branch. Approx. 2000 staff in the company. On average 15, maximum 25 staff working at each branch. Approx. 100,000 members registered across all branches. On average 1000, maximum 1500 members registered at each branch. ... Database rate of growth (not complete): Approx. 100 new video titles and 20 copies of each video are added to the database each month. Approx. 20 staff members join and leave the company each month. ... The types and average number of record searches (not complete): Searching for the details of a given video – approx. 5000 per day (Sun to Thu), 10000 per day (Fri and Sat), peak workload 6-9pm each day. ... Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 StayHome: creating the systems specification, contd It should list all the important features of the StayHome database system, including: Networking and shared access requirements (not complete): All branches securely networked to the headquarters in Seattle. Allow for at least 3 people from each branch accessing the system simultaneously. Consider licensing requirements for this number of concurrent accesses. System performance (not complete): During opening hours but not during peak periods expect less than 1 second response for all single record queries; less than 5 seconds response for same during peak periods (6-9pm each day). Security (not complete): Database should be password protected; each staff member should be assigned access privileges wrt the particular user view (Director, Manager, Supervisor, Assistant, Buyer). Backup and recovery: Database should be backed up each day at 12 midnight. User interface: Menu-driven, online help. Legal issues: Database holds data on people; should comply with laws that govern the way computerized storage of personal data is handled. Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8 Next step in DSDLC ... Database design: to be covered ... Dr Muhammad Sulaiman Khan COMP102: Introduction to Databases, 8