Course on Database Design Carlo Batini University of Milano Bicocca, Italy

Similar documents
Course on Database Design Carlo Batini University of Milano Bicocca

Course on Database Design Carlo Batini University of Milano Bicocca Part 5 Logical Design

Introduction to Databases Fall-Winter 2010/11. Syllabus

Introduction to Databases Fall-Winter 2009/10. Syllabus

City University of Hong Kong Course Syllabus. offered by Department of Computer Science with effect from Semester A 2017/18

Database Foundations. 2-3 Conceptual Data Modeling. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

WELCOME TO A SPANISH SPEAKING WORLD

KDI EER: The Extended ER Model

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

City University of Hong Kong. Course Syllabus. offered by Department of Information Systems with effect from Semester A 2017 / 2018

DOWNLOAD PDF FUNDAMENTALS OF DATABASE SYSTEMS

Course Design Document: IS202 Data Management. Version 4.5

Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services

LIS 2680: Database Design and Applications

ET345P Control Systems [Onsite]

B. Subject-specific skills B1. Problem solving skills: Supply the student with the ability to solve different problems related to the topics

CSC 4710 / CSC 6710 Database Systems. Rao Casturi

Advanced Database Organization INF613

Database Management System Implementation. Who am I? Who is the teaching assistant? TR, 10:00am-11:20am NTRP B 140 Instructor: Dr.

WebEx University. WebEx University. Mastering Cisco WebEx Meeting Center. Program Overview

Data analysis and design Unit number: 23 Level: 5 Credit value: 15 Guided learning hours: 60 Unit reference number: H/601/1991.

Liberal Arts and Science Test (LAST)

CPS352 Database Systems Syllabus Fall 2012

Syllabus DATABASE I Introduction to Database (INLS523)

Specific Objectives Contents Teaching Hours 4 the basic concepts 1.1 Concepts of Relational Databases

Databases and Database Management Systems

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

CS 525 Advanced Database Organization - Spring 2017 Mon + Wed 1:50-3:05 PM, Room: Stuart Building 111

Data Modeling: Beginning and Advanced HDT825 Five Days

Education and technology are two of our greatest social equalizers.

Informatics 1: Data & Analysis

Work-ready skills in Business, Administration and IT

BSc (Honours) Computer Science Curriculum Outline

Database Management Systems MIT Lesson 01 - Introduction By S. Sabraz Nawaz

Can you name one application that does not need any data? Can you name one application that does not need organized data?

Database Design and Management - BADM 352 Fall 2009 Syllabus and Schedule

Network Architecture I

ONLINE ADMISSION 2017 QUICKSTART v

Course Computer Science Academic year 2015/16 Subject Databases II ECTS 6

School of Information Studies (ischool)

Marco Porta Betim Çiço Peter Kaczmarski Neki Frasheri Virginio Cantoni. Fernand Vandamme (BIKEMA)

NEW YORK CITY COLLEGE OF TECHNOLOGY COMPUTER SYSTEMS TECHNOLOGY DEPARTMENT CST4714 DATABASE ADMINISTRATION (2 class hours, 2 lab hours, 3 credits)

The University of Aizu School of Computer Science and Engineering Introduction to Programming. Course Syllabus (Special Track for Foreign Students)

Curriculum Mapping for National Curriculum Statement Grades R-12 and Oracle Academy.

MASTER OF SCIENCE IN COMPUTER SCIENCE

Only the original curriculum in Danish language has legal validity in matters of discrepancy

NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY

NOTE 1: This is a closed book examination. For example, class text, copies of overhead slides and printed notes may not be used. There are 11 pages.

Study (s) Degree Center Acad. Period

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Module Documentation

Fundamentals of Database Systems

Education and technology are two of our greatest social equalizers.

Open Educational Resources

TEACHING & ASSESSMENT PLAN

Introduction to Data Integration

240AR059 - Geometric Fundamentals for Robot Design

BCS Level 4 Certificate in Data Analysis Tools QAN 603/0824/2 Version 1.1 December 2016

Unit 2. Unit 3. Unit 4

Car Sounds with JavaScript

Education Brochure. Education. Accelerate your path to business discovery. qlik.com

Information Technology

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS ADVANCED DATABASE MANAGEMENT SYSTEMS CSIT 2550

ISTE SEAL OF ALIGNMENT REVIEW FINDINGS REPORT

FREQUENTLY ASKED QUESTIONS (FAQ)

CPS352 - DATABASE SYSTEMS. Professor: Russell C. Bjork Spring semester, Office: KOSC 242 x4377

Globally recognised qualifications. Edexcel Business and Economics qualifications

Introduction to the course


Course Title: Network+/Networking Fundamentals. Course Section: CNS-101-I1. FORMAT: Online

CMPUT 391 Database Management Systems. Fall Semester 2006, Section A1, Dr. Jörg Sander. Introduction

COURSE SYLLABUS COURSE TITLE: 2009A-SharePoint Designer 2013 FORMAT:

ECOM 2314 COMPUTER PROGRAMMING II

ABD - Database Administration

INFC20, Informatics: Advanced Database Systems, 7.5 credits Informatik: Avancerade databassystem, 7,5 högskolepoäng First Cycle / Grundnivå

Master & Doctor of Philosophy Programs in Computer Science

Avi Silberschatz, Henry F. Korth, S. Sudarshan, Database System Concept, McGraw- Hill, ISBN , 6th edition.

CMPT 354 Database Systems I. Spring 2012 Instructor: Hassan Khosravi

The course can be taken as part of the MSc Programme in Information Systems, or as a separate course.

The Cisco 360 Learning Program for Cisco CCIE Routing and Switching

13: MOODLE WIKIS. Oklahoma Department of CareerTech WELCOME TO THE MOODLE WIKIS TUTORIAL! In this tutorial, you will learn:

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling

City University of Hong Kong

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus

MIT Database Management Systems Lesson 01: Introduction

Syllabus for CSC 455 Database Systems 3 Credit Hours Spring 2012

Big Sandy Community and Technical College. Course Syllabus

Designing Database Solutions for Microsoft SQL Server 2012

Education and technology are two of the greatest social equalizers. Education helps people

Textbook(s) and other required material: Raghu Ramakrishnan & Johannes Gehrke, Database Management Systems, Third edition, McGraw Hill, 2003.

EE3315 Internet Technology EE3315 Internet Technology Overview Slide 1

IBM Skills Academy. For <<Academy>> Career-based Education

An Effective Methodology for an Upper-level Fundamentals of Database Systems Course

GCSE Design and Technology

ISTQB Expert Level. Introduction and overview

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

Web Help Desk. 2. Enter your AD login: the login you use to log into your computer in the morning.

Programming 2. Outline (112) Lecture 0. Important Information. Lecture Protocol. Subject Overview. General Overview.

BSc (Hons) Information Systems - IC 311

Create and Modify Queries 7

Transcription:

Course on Database Design Carlo Batini University of Milano Bicocca, Italy 1

Course on Database Design The course is made of six parts: Part 0 What you will learn in this course Part 1 Introduction to Databases Part 2 Entity Relationship Model Part 3 Relational Model Part 4 Conceptual Data Base Design Part 5 Logical Data Base Design Carlo Batini, 2015 This work is licensed under the Creative Commons Attribution NonCommercial NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/bync nd/4.0/. 2

Course on Database Design Part 0 What you will learn in this course In the appendix: The data management learning project 3

Carlo Batini, 2015 This work is licensed under the Creative Commons Attribution NonCommercial NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/bync nd/4.0/. 4

Part 0 What you will learn in the Course on Database Design In this course, you will achieve expertise in two topics, which I would like to introduce by means of an example. Assume that you are a student in a Chinese University and you want for some reason to organize information of interest for you and your colleagues on courses passed. Such information is represented in Figure 1. Assume we are in a Chinese University (where grades are between 0 and 100). You want to represent: three exams passed by a student with Student Id = 12127 referring to: 1. Course with Course Id = 37 and exam passed with grade 80. 2. Course with Course Id = 29 and exam passed with grade 90. 3. Course with Course Id 18 and exam passed with grade 85. one exam passed by a student with Student Id = 23344 referring to: 1. Course with Course Id = 29 and Exam passed with grade 95. Figure 1: Data that you may need to organize.. A first competence you will achieve concerns database models, that provide you modeling constructs to organize data. In software systems for databases, called Data Base Management Systems, data are organized in tables (also called relations). Figure 2 shows you how the above data are organized in the relational model of data adopted in Data Base Management Systems. Student Student Id Course Id Grade 12127 37 80 12127 29 95 12127 18 85 23344 29 95 Figure 2: The same data in the relational model So, you will be able to use data models for your needs, transforming requirements as shown in Figure 1 in terms of tables as illustrated in Figure 2, through a process called modeling, see Figure 3. 5

Assume we are in a Chinese University (where grades are between 0 and 100). You want to represent: three exams passed by a student with Student Id = 12127 referring to: 1. Course with Course Id = 37 and exam passed with grade 80. 2. Course with Course Id = 29 and exam passed with grade 90. 3. Course with Course Id 18 and exam passed with grade 85. one exam passed by a student with Student Id = 23344 referring to: 1. Course with Course Id = 29 and Exam passed with grade 95. Modeling Relational Model Student Student Id Course Id Grade 12127 37 80 12127 29 95 12127 18 85 23344 29 95 Figure 3: The modeling issue Look with more attention at the table of Figure 3. We can identify (see Figure 4) two parts with completely different roles, that are called: 1. the schema, which represents concepts, such as Grade, and 2. data instances, that represent values of concepts, e.g. for grades, 80 and 95. We can also represent the schema of the relation in the following way: Student (Student Id, Course Id, Grade). Schema Data Student Student Id Course Id Grade 12127 37 80 12127 29 95 12127 18 85 23344 29 95 Figure 4: Schema and data instances 6

Frequently it happens that requirements are not expressed in terms of long lists of data, but, instead, refer to concepts, such as the following requirements in Figure 5. Figure 5: Requirements of a database application In this course, you will achieve a second important skill; you will be able to design a database, that is to transform requirements into a database schema, as illustrated in the following Figure 6; the relational database schema, made of eleven relation schemas, is represented using the notation introduced above. Students of a University attend courses, and pass them. Courses have a last name, a first name and a year of enrollment. Students have an ID, a Last Name and First Name. For Chinese Students we want to represent City of Birth and Region of Birth. For Foreign Students we want to represent the Country of Birth and the Continent of Birth. A Course passed by a Student has a grade and a date. Courses are taught by professors. Professors have a last name and a first name. They may be Associate Professors or Full professors, only for Full Professors we are interested to the City of Birth, with name and region. Every professor belongs to a Department. Departments have a Name and an address. Database Design 1. Student (Student Id, Last Name, First Name, Type) 2. Course (Course Id, Year of Enrollment) 3. Enrolled in (Student Id, Course Id) 4. Passed (Student Id, Course Id, Grade, Date) 5. Professor (Last Name, First Name, Type, Department Name) 6. Department (Name, Address) 7. Full Professor (Last Name, First Name, City of Birth) 8. City (Name, Region) 9. Foreign Student (Student Id, Country) 10. Chinese Student (Student Id, City of Birth) 11. Country (Name, Continent) Figure 6: Design of requirements in terms of a relational schema 7

The relational model, adopted in Database Management Systems, is a bit far from the way human beings mentally model a reality of interest; so, we introduce two models for the design process, the Entity Relationship model for the first phase called conceptual design, and the relational model for the second phase called logical design, see Figure 7. Students of a University attend courses, and pass them. Courses have a last name, a first name and a year of enrollment. Students have an ID, a Last Name and First Name. For Chinese Students we want to represent City of Birth and Region of Birth. For Foreign Students we want to represent the Country of Birth and the Continent of Birth. A Course passed by a Student has a grade and a date. Courses are taught by professors. Professors have a last name and a first name. They may be Associate Professors or Full professors, only for Full Professors we are interested to the City of Birth, with name and region. Every professor belongs to a Department. Departments have a Name and an address. ID Last Name First Name Name Year of Enrollment Student many many Enrolled in Passed many many Course one Foreign St. Chinese St. one Born many Country Name Name Continent Region City Name Address many many Grade Date one Born many one Belongs to Department Full Professor one Born in Teach many Professor First Name Last Name Associate Professor 1. Student (Student Id, Last Name, First Name, Type) 2. Course (Course Id, Year of Enrollment) 3. Enrolled in (Student Id, Course Id) 4. Passed (Student Id, Course Id, Grade, Date) 5. Professor (Last Name, First Name, Type, Department Name) 6. Department (Name, Address) 7. Full Professor (Last Name, First Name, City of Birth) 8. City (Name, Region) 9. Foreign Student (Student Id, Country) 10. Chinese Student (Student Id, City of Birth) 11. Country (Name, Continent) Figure 7 Two steps design to ease the design activity The Entity Relationship model is nice, as it has an easy to understand diagrammatic representation of concepts. For instance, the box Student represents the set of students enrolled in the University, and Id, Last Name and First Name are the properties to which data values will be assigned. 8

Learning resources 9

1. Web Video MOOC Course Soon accessible. 10

2. This book Transcription of lessons of the Web MOOC Course Course on Database Design Carlo Batini University of Milano Bicocca, Italy Carlo Batini, 2015 This work is licensed under the Creative Commons Attribution NonCommercial NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/bync nd/4.0/ This text is a transcription of the video lessons. It can be useful for those of you that, after watching at the video, need for a moment of further in depth analysis of the concepts presented. It is also useful for those of you that do not possess entirely spoken English language, and need for a written version of lessons to be examined comfortably. It can also be used independently form the video version. Enjoy! 11

3. Map of concepts, reproduced at the beginning of every part Figure 8: High level map of concepts Figure 9: Low level map of concepts 12

4. Teaching & Learning method In this course teaching & learning are not seen as separate, rather as two faces of the same coin. I always start from examples, students are invited to solve a problem, or understand hidden or tacit features of the example, so that concepts are learnt with a free, autonomous and unconstrained learning process. Let us see an example! Part 2 Lesson 2 Entity and Attribute of entity Entity Let us start with an example. Exercise 2.1 Look at these pictures. Now, how do you refer to these pictures? 1. This is a set of persons 2. This is a set of students 3. This is set of Chinese students. Figure 10: A set of pictures The student is invited to think autonomously, or in collaboration with other students. After that, a discussion in proposed (in the book, in the next page, in the video in the next video frame). In this case: Discussion on Exercise 2.1 Probably your answer is the second one. The first answer is too generic, while the third answer is wrong, since some of the pictures do not show Chinese people. We say also that this set of pictures represents a class, and we say that such class is an entity in the Entity Relationship model. We can assign to the entity the name Student (see next Figure). More precisely. Definition An entity is a class of real world objects that: 1. Are of interest for a database application. 2. Have common properties. 3. Have autonomous existence 13

Figure 11: The four student instances and the entity Student 14

5. Atzeni s et al. book and solutions to exercises in Atzeni s et al. book Paolo Atzeni, Stefano Ceri, Stefano Paraboschi and Riccardo Torlone Database Systems Concepts, Languages and Architectures McGraw Hill Book Company 1999, ISBN 0 07 709500 6 Freely available at http://dbbook.dia.uniroma3.it/ For Part 1 Introduction to Databases Part 2 Entity Relationship Model Part 3 Relational Model Part 4 Conceptual Data Base Design Part 5 Logical Data Base Design 15

6. Batini s et al. book Carlo Batini, Stefano Ceri, Sham B. Navathe Conceptual Database Design: an Entity Relationship Approach ISBN 10: 0805302441 ISBN 13: 9780805302448 1992, Addison Wesley, 470 pp, available in the e market For Part 2 Entity Relationship Model Part 4 Conceptual Data Base Design Part 5 Logical Data Base Design 16

Appendix: The Data Management Learning Project The course on Database Design is part of a larger, more ambitious project on Data Management. In 1975 M. Porat produced a figure on the dynamics of jobs in the last 2 millions years and in subsequent 75 years, as long as 2050. Such forecast, that has revealed correct so far, says that in the next 30 years the percentage of jobs in informative services, namely services based on information will increase up to 60% and more. Figure 12: The figure from Porat (M. Porat,The information Economy: Definiton and Measurement, Office of Telecommunications, Washington DC, 1977) This is not surprising, if we consider that every year and a half the amount of information exchanged in the Web doubles. The term Big Data has been coined to describe the phenomenon of large quantities of data that, due to their volume, velocity and heterogeneity exceed the processing capacity of conventional data management systems and need for innovative techniques and alternative ways to process it. At the same time, all over the world the MOOC phenomenon is rapidly growing. MOOC means Massively Open On line Courses, that is courses delivered in the Web and accessible by a wide audience of students and professionals. 17

This course on Database Design is the first milestone of a wider and more ambitious learning project on Data Management. The building blocks of the Data Management learning project are: 1. Data Management basics a. Data Base Design b. Data Base Querying 2. Data Management advances a. Data and Text Mining b. Data Analytics c. Business Intelligence d. Data Visualization e. Data and Information Quality & Value f. Semantic Web and Linked Data g. Open source SW platforms and languages for data analytics. h. Techniques and Tools for Data Management 3. Data Management domain specific Examples a. Business Intelligence in Finance b. Big data in Physics c. Open Data Both the Data Management advances and the Data Management domain specific courses have to be seen as open ended lists of topics. 18

Carlo Batini, 2015 This work is licensed under the Creative Commons Attribution NonCommercial NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/bync nd/4.0/. 19