Fundamentals/ICY: Databases 2013/14 Week 4: Friday John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Slides:



Advertisements
Similar presentations
REACH-CRC. Lookup Functions INDEX-MATCH LOOKUP Database Functions DSUM DMIN DMAX DCOUNT DAVERAGE.
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Fundamentals/ICY: Databases 2013/14 WEEK 4: Monday Intro to tables, etc. John Barnden Professor of Artificial Intelligence School of Computer Science University.
Fundamentals/ICY: Databases 2013/14 Week 6: Monday John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Query-By-Example (QBE) 2440: 180 Database Concepts.
M.S. Access Module CAS 133 Russ Erdman. M.S. Access Module Assignment Overview Two options for the unit: All students complete Units A, B and C In class.
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
Database Design Concepts Info1408
APPENDIX C DESIGNING DATABASES
Database Architecture The Relational Database Model.
Fundamentals/ICY: Databases 2012/13 WEEK 11 (relational operators & relational algebra) John Barnden Professor of Artificial Intelligence School of Computer.
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
Intro to Maths for CS: 2013/14 Sets (2) – OPTIONAL MATERIAL John Barnden Professor of Artificial Intelligence School of Computer Science University of.
Chapter 10 Hypothesis Testing
Fundamentals of Hypothesis Testing: One-Sample Tests
Fundamentals/ICY: Databases 2013/14 REVISION WEEK John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
Concepts of Database Management, Fifth Edition
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Relational Model Session 6 Course Name: Database System Year : 2012.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Tree.
Fundamentals/ICY: Databases 2010/11 WEEK 5 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK.
Fundamentals/ICY: Databases 2012/13 REVISION WEEK John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
Chapter 10 Hypothesis Testing
Concepts and Terminology Introduction to Database.
Fundamentals/ICY: Databases 2012/13 WEEK 5 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK.
Fundamentals/ICY: Databases 2012/13 WEEK 7 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK.
Fundamentals/ICY: Databases 2013/14 Week 10 –Monday –Normalization, contd John Barnden Professor of Artificial Intelligence School of Computer Science.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
Fundamentals/ICY: Databases 2012/13 WEEK 3 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK.
Fundamentals/ICY: Databases 2010/11 WEEK 3 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK.
Fundamentals/ICY: Databases 2012/13 WEEK 11 – 4 th Normal Form (optional material) John Barnden Professor of Artificial Intelligence School of Computer.
Logical Database Design (1 of 3) John Ortiz Lecture 6Logical Database Design (1)2 Introduction  The logical design is a process of refining DB schema.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
1 Database & DBMS The data that goes into transaction processing systems (TPS), also goes to a database to be stored and processed later by decision support.
Fundamentals/ICY: Databases 2013/14 WEEK 9 –Monday John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
In this session, you will learn to: Map an ER diagram to a table Objectives.
Instructor: Craig Duckett Lecture 03: Tuesday, April 14, 2015 SQL Sorting, Aggregates and Joining Tables 1.
WXGE 6101 DATABASE CONCEPTS & IMPLEMENTATIONS. Lesson Overview The Relational Model Terminology of relational model. Properties of database relations.
Fundamentals/ICY: Databases 2013/14 WEEK 9 –Friday John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
Fundamentals/ICY: Databases 2013/14 Week 5: Monday John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Fundamentals/ICY: Databases 2012/13 Week 4 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK.
Intro to Maths for CS: 2012/13 Sets (end, week 3) John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
Fundamentals/ICY: Databases 2013/14 Week 11 – Monday – relations, ended. John Barnden Professor of Artificial Intelligence School of Computer Science University.
April 20022CS3X1 Database Design The relational model John Wordsworth Department of Computer Science The University of Reading
Introduction to Spreadsheets and Microsoft Excel FSE 200.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Database Design Chapters 17 and 18.
Logical Database Design and the Rational Model
Fundamentals/ICY: Databases 2010/11 WEEK 6
Entity Relationships and Normalization
Database Fundamentals
Database Design Chapters 17 and 18.
Getting to First Base: Introduction to Database Concepts
Getting to First Base: Introduction to Database Concepts
Fundamentals/ICY: Databases 2013/14 WEEK 6 - Friday
Getting to First Base: Introduction to Database Concepts
John Barnden Professor of Artificial Intelligence
Presentation transcript:

Fundamentals/ICY: Databases 2013/14 Week 4: Friday John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK

Reminder

Typical Approach to Phone Numbers NAMEPHONEEMPLOYERAGE Chopples E Blurp E Rumpel E (There should really be a FIRST NAME as well)

But the following is possible … NAMEPHONE IDEMPLOYERAGE ChopplesABC123E BlurpABC137E RumpelDEF678E PHONE IDAREA CODEBODY ABC ABC DEF DEF There should really be a FIRST NAME as well

New

Some Operations on Individual Tables uCreating a new empty table of a particular “shape” (mainly, particular column names and value-types for the columns) uChanging the “shape” of an existing table (e.g., adding/deleting a column, or changing the type of a column) uAdding a row or rows to a table uDeleting a row or rows (question: how identified?) uUpdating values in an individual cell (column specified by name; but how identify the row?)

More Operations on Individual Tables uRetrieving values from an individual cell; doing calculations on them uRetrieving the values in the cells in some or all columns for some or all rows uCalculating statistics concerning values in particular columns across all rows, a subset of rows, or several subsets of rows (count, max, min, average, standard deviation, …) uOrdering rows in different ways in displays of a table.

Operations on Coordinated Tables uNeed to be able to combine data from related tables in a variety of ways. E.g.: l Join tables together in various ways l Select things from one table on the basis of information in others uNeed to ensure consistency between related tables. E.g.: l Deletion of something in one table may require deletions from or other modifications to other tables.

ENTITIES, RELATIONSHIPS & ATTRIBUTES (Introduction)

Entities uBasically, entities are just things of the “important types” that we judged above to merit tables. So we had entity types such as: l People l Employing Organizations l Phone Stations (as opposed to just phone numbers as such) uSo what the entity types are in a given working environment are partly a matter of judgment, as explained earlier. But we’ll see that in designing a DB we may need to introduce new, not immediately obvious, entity types. u“Entities” are, or should be, the things of a type: e.g., individual people. An entity is represented by a row in the appropriate table.

Entity Terminology uUnfortunately: “entity” is often used to mean entity type. “entity set” is often used for entity type. “entity occurrence” is often used to mean individual entity.

Relationships uThese are the relationships between entity types, such as l A person being employed by an organization l A person having a phone station uHave to think about both directions of a relationship: e.g., both employed-by and employs. uCAUTION: Tables are also called “relations” [hence “relational” DB] (much more on this later). This is to do with the internals of tables/entities rather than with “relationships” between entities.

Relationship Connectivity uRelationships are importantly categorized as to uniqueness or multiplicity of entities at either end – “connectivity.” Has big effect on DB design. l 1:1 (“one to one”): e.g., the people/phone-stations relationship, if each person has at most one phone station and each phone station is assigned to at most one person. l M:N (“many to many”): e.g., the employs relationship, assuming a person may have more than one employing organization (or none) and an organization may have more than one employee (or none). (Don’t take “many” seriously – just means possibly more than one.) l 1:M (“one to many”): e.g., the employs relationship, if an organization may have more than one employee (or none) but a person has at most one employing-org.

Relationship Cardinality uRelationships can be further specified as to “how many entities allowed or required at either end” – cardinality. Also has significant effect on DB design. uIn a relationship from entity type A to entity type B, a minimum and a maximum can be specified for the number of B entities for each A entity. uA maximum greater than 1 can only be specified if the relationship from A to B is 1:M or M:N. (So the notions of connectivity and cardinality are not properly separated). l E.g., could be specified that a person can only be employed by up to five organizations. uMost normally, the important choice for the minimum is between none and one. E.g., the minimum for employed-by could be none, but the minimum for employs could be one. But the minimum number of wheels for a car could be specified to be three. uIf the minimum is none, then B is optional for A. Otherwise, it is mandatory for A.

Attributes uAttributes of entities of a given type are the names of the different pieces of information that need to be stored for entities of that type. So they’re just the column names for the table for the entity type. l E.g., entities of the type “people” could have the following attributes: person ID number, last name, first name, phone number, age. uNote: Attributes include artificial ones like the employer identity numbers (EMPL. NUM.) that we introduced in an example above. These may have no significance outside the DB itself. uRelationships are represented by associative linking by means of shared attributes. (For now, will always assume that the same attribute name is used in each of the tables involved.)

Attribute Determination uREMEMBER: Rows in a table are uniquely determined (picked out) by the values in some set of columns, i.e. the values of some collection of attributes. That is, given some values for those attributes, there is at most one entity that has those values for those attributes, at any given time. uHence, that collection of attributes determines all the other attributes. uThat is, given some values for the determining attributes, there’s at most one value for each of the other attributes, at any given time.

Attribute Determination, contd. uMore generally, a collection of one or more attributes determines another attribute A if only one value for A is possible given the values for the former attributes. E.g., the collection DAY-NUMBER, MONTH and YEAR specifying birth-date in a table about people could determine DAY-NAME, even though it doesn’t determine other attributes such as NATIONALITY: several people could have the same birth-date but be of different nationalities. uWe alternatively say that DAY-NAME is functionally dependent on DAY-NUMBER, MONTH and YEAR.