* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Database Design
Survey
Document related concepts
Serializability wikipedia , lookup
Microsoft Access wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Oracle Database wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Concurrency control wikipedia , lookup
Versant Object Database wikipedia , lookup
Clusterpoint wikipedia , lookup
Relational model wikipedia , lookup
Transcript
International Study Centre Foundation Computing Module Handbook Database Design and Development Semester 2 – January 2016 Tutor: Pat Hodgkins Module Introduction How does on-line retailing keep track of millions of products and customers? Why does a database need to be ‘designed’? A database is a collection of organized and related information. A database consists of the physical files and their contents on a computer. A database model is a logical concept, not a physical object. This model is used to create the physical files. These files contain not just the data but also the metadata which describes the structure of the database. For that reason is Database is said to be self referring. Aims and Objectives The aim of this module is to develop an understanding of the range of problems that database applications can help to solve and to develop an understanding of the main principles of solving problems using relational databases. The objectives of the module are: To acquire skills necessary to apply this understanding to developing database solutions to problems. To demonstrate an understanding of the principles of system analysis and design and be able to apply this to simple methods of problem formulation and planning of solutions using databases. To acquire the skills needed to apply this understanding to systematic methods of implementing, testing and documenting database solutions To facilitate the formative development of students by broadening their knowledge base, and their understanding of topics studied and practising appropriate study skills. 1. Learning Outcomes At the end of this module, the successful student will be able to: 1. Demonstrate an understanding of the development and advantages of Relational Databases. 2. Analyse a problem, identifying the parts that are appropriate for a Rational Database solution and constructing Entity-Relationship Models 3. Demonstrate knowledge and understanding of SQL as used to implement a relational database design (DDL), and insert, delete, update and retrieve data from one or more tables (DML). 4. Design, document and test a Relational Database solution to a specified problem. 2. Tutors and contact details Pat Hodgkins [email protected] Patrick Hodgkins January 2016 [email protected] 3. Teaching and assessment Teaching modes All teaching takes the form of seminar/workshops and a laptop computer is an essential piece of equipment. Laptops need to have MySQL Community Server and Workbench installed. They will also need an integrated database application installed such as Microsoft Access or Open Office Base. Some teaching will be on line through Study Direct. Mode of delivery: The module will be delivered through seminars, workshops and on-line resources. Each student will attend for 4 hours per week. Total time for module 120 hours, including 48 hours of contact time, the balance made up of assignments and selfstudy. Contributory assessment Mode Code Outline MCQ test TST Database concepts and terminology % Final Mark 10% Time (week) Week 3 Learning outcomes assessed 1,2 Written Design task MCQ test REP Logical ER design tasks 10% Week 5 2 TST Database concepts and terminology 10% Week 8 1,2 Written Design task Database REP Physical design task 10% Week13 3 REP 40% Week13 1,2,3,4 MCQ test TST A completed Related Database solution to a chosen problem. Extensive review of SQL (DDL and DML) 20% Week13 4 4. Your tutors will expect that you: Attend all lectures and seminars Prepare adequately for all seminars o core reading must be completed before each seminar Make an active contribution to seminars and discuss each sessions topics o bring examples you wish to discuss to the seminar Discuss all questions with your tutor during seminars/workshops Be prepared to undertake group work and make timely contributions 3 Submit all assessed assignments on or before deadlines 5. Feedback Coursework assignments will be read and, where appropriate, be tested by the tutor. Errors on written work will be indicated by the tutor on a hard copy of the student’s work. The tutor will also comment on the student’s work and give recommendations for improvement. An exemplar solution to the set problem will be posted on Study Direct. 6. Module overview Week Topic Detail Assessment 1 Introduction Introduction to Related Database systems. The structure and functions of a DBMS. Disadvantages of flat file databases. Insert, Update and Delete anomalies. 2 Data Modelling The Entity Relationship Model 3 Logical Design 1 MCQ Quiz 1 10% 4 Logical Design 2 Normalisation. Planning a database. Entity Relationship Modelling. Keys Introduce SQL DML Relationships, Cardinalities. Resolving ‘many to many’ relationships. Weak and Strong Entities. Referential Integrity 5 Logical Design 3 From requirements to a logical ER Design. Logical Design Task 10% 6 Structured Query Language 1 Using SQL (DDL) to create a database. 7 Structured Query Language 2 Using more advanced SQL (DML) to select, update and delete data. Stored procedures, Views and Triggers. 8 Physical Design Implementing the Relational Model. A more detailed look at Attributes, Data types and Indexes. 9 Connecting to a database. Testing and administration Using forms and php. Web servers. Writing documentation. Introduction to control, security and reliability. Using test data. 10 The Database Project Start documentation for chosen project 11 12 13 MCQ Quiz 2 10% Work on project Reading week Work on project Complete and submit completed database and documentation Patrick Hodgkins January 2016 MCQ Quiz 3 20%. Documentation 10% Database 40% 14 Exam week – No exam for this course Indicative references: Core Text Kroenke,D & Auer,D (2014). Database Concepts. Washington: Prentice Hall. Further reading Kroenke,D (2010). Database Processing . 11th Edition. Washington. Prentice Hall. MYSQL documentation at: http://dev.mysql.com/doc/refman/5.7/en/ 7. Module detail Week 1 This week you will learn that the purpose of a database is to keep track of data and that a database stores information that is more complicated than that in a simple list or a even a spreadsheet. A relational database stores information in tables. Each informational topic is stored in its own table and a relational database will have several tables. These related tables are needed to avoid what is called ‘data redundancy’. You will learn about Insert, Delete and Update Anomalies and how they are detected and eliminated by relating tables using Primary and Foreign Keys. We will then briefly look at the special language, SQL, that is used to search and update databases. Finally you will learn about the components of a database system, that is, the database itself, the database management system (DBMS) and the user interface. You need to read Chapter 1 of the Core Text You can look at the Chapter 1 presentation on SyD 5 Week 2 This week you will take your first steps in database modeling. You will learn about the Entity Relationship Model and how it is used to logically design a database. You will learn about Relations, Keys, Records and Fields. We will learn how to use the MySQL Workbench Workshop In our first practical sessions we will be creating a Database System for The Wedgewood Pacific Corporation (WPC). The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The company database contains data about employees; departments; projects; assets, such as computer equipment; and other aspects of company operations. This week we will create our first Database Table, the Employees table, using MySQL Workbench. Reading You need to read Chapter 2 Section 1 – Relations and Chapter 1 Workbench You can look at the Chapter 2 presentation on SyD Week 3 This week you will start to consider issues of Normalization using functional dependencies. At the end of this week you will also do your first assessment which will be a MCQ on work we have done so far. (see below for details) Workshop You will add another table, the Department Table to your database and relate the two tables using Primary and Foreign keys. Reading You can look again Chapter 2 Section 2 – Functional Dependencies You can look at the Chapter 2 presentation on SyD Week 4 This week you will learn about Relationships and how to resolve ‘many to many’ relationships. You will also learn about Referential Integrity and Cardinalities. Workshop You will complete the WPC database by adding the Department, Project and Assignment tables. We will add some data to the system. Patrick Hodgkins January 2016 You will use this database later on in the course to learn about and practise SQL Reading Chapter 4 – Part 1 Data Modelling You can look at the Chapter 4 presentation on SyD Week 5 This week you will use your knowledge to design ERDs for a variety of scenarios and requirements. Workshop You will develop ERD models for some scenarios I will give you. This will be Assessment 2 and is worth 10% of the total marks. You can look again at slides on Chapter 4 p on SyD Week 6 This week you will learn about Data Definition Language which is part of SQL. You will see how this can be used to create and modify database structures. You can look again at slides in the Chapter 3 presentation on SyD Week 7 This week you will learn about Data Manipulation Language and how it is used to query and modify the actual data of the database. We will also learn how php pages are used as an interface between the database and the user. You can look again at slides in the Chapter 3 presentation on SyD Week 8 This week you will learn how to transform a Data Model into a Database Design. You will also learn more about Normalization. At the end of the week you will do your second MCQ quiz (10%) of final mark. Reading Chapter 5 – Part 1 Database Design You can look again at slide at the Chapter 5 presentation on SyD 7 Week 9 This week you will learn about database management issues such as concurrency, record locking, security, backup and recovery. You will also learn about how web forms can be used to insert and select data. You can look again at slides in the Chapter 6 presentations on SyD Week 10 to 13 This week you choose a database project and start the design, implementation and testing process. Your work will be handed in during week 13 and is worth 40% of the total marks. In week 13 there will also be a MCQ covering your knowledge of SQL which will be worth 20% of the total marks. There is no final written exam for this module. 8. Guidance on assessment Assessment 1 A Multiple Choice quiz that will test knowledge and understanding of work taught in weeks 2 to 5 inclusive in the form of an on-line multiple choice quiz. Learning outcome 1 Examples of questions: A key that contains more than one attribute is called A) a composite key. B) a complex key. Patrick Hodgkins January 2016 C) a multi-key. D) a candidate key. Assessment 2 Students will need to create an Entity Relationship model for a given scenario. One such scenario could be as follows Learning outcome 2 A car dealership named Wallingford Motors is the dealer for a new line of hybrid cars named Gaea.3 Instead of using only a gasoline or diesel engine, hybrid cars are powered by a combination of energy sources, such as gasoline and electricity. Gaea produces the following four models: 1. SUHi The sport-utility hybrid (Gaea’s answer to the SUV) 2. HiLuxury A luxury-class four-door sedan hybrid 3. HiStandard A basic four-door sedan hybrid 4. HiElectra A variant of the HiStandard that uses a higher proportion of electrical power Interest in hybrid cars—and specifically in the Gaea product line—is increasing. The sales staff at Wallingford Motors needs a way to track its customer contacts. The database application will be a used by sales staff to track current, past, and potential customers as well as the sales staff’s contacts with these customers. Identify the entities that will be needed and the relationships between these entities. Draw an Entitiy Relationshp diagram for the system using Crow’s Foot notation. Add maximum and minimum cardinalities to your diagram. Assessment 3 A Multiple Choice quiz that will test knowledge and understanding of work taught in weeks 2 to 7 inclusive in the form of an on-line multiple choice quiz. Learning outcomes 1, 2 and 3 Given this diagram of an E-R model, which of the following is known to be true? A) There are more instances of ENTITY A than there are instances of ENTITY B in the user's environment. B) A single instance of ENTITY B may be related to many instances of ENTITY A. 9 C) A single instance of ENTITY A must be related to many instances of ENTITY B.. D) The degree of the relationship is "many." Assessment 4 This will be the documentation for your database project and will be worth 10% of the module total. It will be submitted with the database. Learning outcomes 2 and 4 Assessment 5 This will be the database project itself, started in week 10. You will submit the MySQL model and the queries that you have created to test the database. This is worth 40% of the module total. Learning outcomes 3 and 4 Assessment 6 A Multiple Choice quiz that will test knowledge and understanding of work taught in weeks 2 to 13 inclusive in the form of an on-line multiple choice quiz. This is worth 20% of the module total. Which of the following is the correct SQL clause to restrict the results of a SELECT query to only records that have a value in the range of 10 to 50 in the Hours column? A) WHERE Hours = MIN(10) and MAX(50) B) WHERE Hours IN [10, 50] C) WHERE Hours = 10 and Hours = 50 D) WHERE Hours BETWEEN 10 AND 50 Learning outcomes 1, 3 and 4. Patrick Hodgkins January 2016