1st December 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

Organisation Of Data (1) Database Theory
Chapter 10: Designing Databases
Relational Database Design UNIT II 1. 2 Advantages of Using Database Systems Centralized control of a firm’s data Redundancy can be reduced (avoid keeping.
11 November 2014Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Databases and Processing Modes. Fundamental Data Storage Concepts and Definitions What is an entity? An entity is something about which information is.
Introduction to Database. File Formats Comma delimited file –"s1","peter",3 –"s2","paul",2.5 –"s3","mary",3.5 –Demo: Excel – Data/Import Extended Markup.
Chapter 9: Database Systems
9th December 2014Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Chapter 5 The Relational Database Model: Introduction
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Databases and Database Management Systems
Management Information Systems MS Access 2003 By: Mr. Imdadullah Lecturer, Department of M.I.S. College of Business Administration, KSU.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Introduction to Databases. Overview  What is a Database?  What is a Database Management System?  How is information organized in a database?  What.
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
Objectives Overview Define the term, database, and explain how a database interacts with data and information Define the term, data integrity, and describe.
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
BUS1MIS Management Information Systems Semester 1, 2012 Access: Creating a Database Week 6 Lecture 2.
Introduction to Database Systems
HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
SQL Structured Query Language Programming Course.
Lecturer: Gareth Jones. How does a relational database organise data? What are the principles of a database management system? What are the principal.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Relational Database. Database Management System (DBMS)
Module 2: Information Technology Infrastructure Chapter 5: Databases and Information Management.
INFORMATION MANAGEMENT Unit 2 SO 4 Explain the advantages of using a database approach compared to using traditional file processing; Advantages including.
Database Concepts. Data :Collection of facts in raw form. Information : Organized and Processed data is information. Database : A Collection of data files.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
Chapter 9 Database Systems Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Object-Relational Modeling. What Is a Relational Data Model? Based on the concept of relations (tables of data) Relationships established by matching.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Chapter 9 Database Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 9 Database Systems. © 2005 Pearson Addison-Wesley. All rights reserved 9-2 Chapter 9: Database Systems 9.1 Database Fundamentals 9.2 The Relational.
Database Fundamentals CSC105 Furman University Peggy Batchelor.
Database Management Systems (DBMS)
Information Systems Today: Managing in the Digital World TB3-1 3 Technology Briefing Database Management “Modern organizations are said to be drowning.
10 November 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
Introduction to Databases CISC Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
Instructor: Pavlos Pavlikas1 How Data is Stored Chapter 8.
Chapter 13.3: Databases Invitation to Computer Science, Java Version, Second Edition.
Data The fact and figures that can be recorded in system and that have some special meaning assigned to it. Eg- Data of a customer like name, telephone.
6.1 © 2007 by Prentice Hall Chapter 6 (Laudon & Laudon) Foundations of Business Intelligence: Databases and Information Management.
Databases Flat Files & Relational Databases. Learning Objectives Describe flat files and databases. Explain the advantages that using a relational database.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
CSCI-235 Micro-Computers in Science Databases. Database Concepts Data is any unorganized text, graphics, sounds, or videos A database is a collection.
IS 130 Information systems 1
Databases Chapter 16.
Database Systems Chapter 3 1.
CSCI-100 Introduction to Computing
Chapter 4 Relational Databases
Chapter 9: Database Systems
Database Fundamentals
Chapter 9: Database Systems
Chapter 9: Database Systems
Database management systems
Presentation transcript:

1st December 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems Autumn 2015 Week 10b: Relational Databases

1st December 2015Brookshear, Section 9.12 Definition of a Database A collection of data with internal links that make the information accessible from a variety of perspectives.

1st December 2015Birkbeck College3 Very Large Databases Facebook357 PB CERN (Higgs Boson)200 PB Microsoft Hotmail150 PB German Climate Computing Centre (DKRZ) 60 PB 1PB=10 15 Bytes = 0.15MB for every person on Earth See en.wikipedia.org/wiki/Petabyte

1st December Different Perspectives In an employee database, list  All employees in personnel  All job titles in Accounts  All employees under 30  All departments with 50 or more employees  … Brookshear, Section 9.2

1st December 2015Brookshear, Section 9.15 File Oriented Information System Customer service dept Customer records Payroll records Payroll dept Employee records Employee dept

1st December 2015Brookshear, Section 9.16 Database Oriented Information System Customer service dept Integrated database Payroll dept Employee dept

1st December 2015Brookshear, Section 9.17 Database Model User’s concept of the database Eg. in a relational database model the user sees all the data in tables The actual storage and management of the data may not correspond to the database model.

1st December 2015Brookshear, Section 9.28 Table in a Relational Database 102Sperry1 The Lane 103Univac15 Retail Road 54Honeywell205 North Street Customer Num NameAddress

1st December 2015Birkbeck College9 User Interface

1st December 2015Brookshear, Section Layers in a Database Implementation Applications Software: user interface, including implementation of the database model. Database Management System: updates the database and supplies data to the applications software. User Applications Software DBMS Actual data

1st December 2015Brookshire, Section Advantages of Splitting AS from DBMS The user sees only the database model. The true complexity of the database is hidden. The DBMS can be changed without affecting users. The AS can be tailored for different groups of users. Easier access control because all access is through a single DBMS.

1st December 2015cf. Brookshear, Section Database Consisting of a Single File Order num Customer name Customer address PriceDue date Product 37Sperry1 The Lane£ Plate 43Univac15 Retail Road£ Case 20Honeywell205 North Street £ Panel If a customer has no orders, then all information about that customer is lost.

1st December 2015Brookshear, Section Relational Model All data is organised into rectangular tables called relations. Each row (or tuple) is a single data item. Each column is an attribute, taking values in a specified domain. The table heading is not a row in the table. 102Sperry1 The Lane 103Univac15 Retail Road 54Honeywell205 North Street Customer Num NameAddress Table heading

1st December 2015Brookshear, Section Advantages and Disadvantages Advantages:  When a table is updated, the information in the other tables is unchanged  Information is not duplicated. Disadvantage:  Once the relations are established they cannot be easily changed.

1st December 2015Birkbeck College15 Relational Database 37102£ Plate 43103£ Case 2054£ Panel 102Sperry1 The Lane 103Univac15 Retail Road 54Honeywell205 North Street Order Num Customer Num PriceDue date Product Order file Customer file Customer Num NameAddress What is the address of Sperry? What is the total value of the orders placed with Honeywell? How many different products are there on order? How many different products are there?

1st December 2015Brookshear, Section Table Structure Each table should correspond to a single concept or task Each row of a table should be uniquely identified by a key Avoid including the same information in different tables

1st December 2015cf. Brookshear, Section Keys Primary key: an attribute whose value uniquely identifies a tuple. Composite key: a minimal set of attributes whose values together uniquely identify a tuple Foreign key: set of attributes pointing to a primary key or a composite key in another table.

1st December 2015Birkbeck College18 Examples of Keys 37102£ Plate 43103£ Case 2054£ Panel 102Sperry1 The Lane 103Univac15 Retail Road 54Honeywell205 North Street Order Num Customer Num PriceDue date Product Order file Customer file Customer Num NameAddress Primary keys: Order Num in the Order file, Customer Num in the Customer file Foreign key: Customer Num in the Order file

1st December 2015Birkbeck College19 Problem Find the names of all customers who have ordered products with a total value of £3000 or less.

1st December 2015Brookshear, Section Lossless Decomposition In lossless decomposition a relation (table) is decomposed into smaller relations without loss of information. Aim: to produce a better table structure.

1st December 2015cf Brookshear, Section Original Relation 37102£ PlateSperry1 The Lane 43103£ CaseUnivac15 Retail Road 2054£ PanelHoneywell205 North Street Order no. Customer no. PriceDue date ProductNameAddress Original table

1st December 2015Brookshear, Section Example of a Lossless Decomposition 37102£ Plate 43103£ Case 2054£ Panel 102Sperry1 The Lane 103Univac15 Retail Road 54Honeywell205 North Street Order no. Custo mer no. PriceDue date Product Order fileCustomer file Customer no. NameAddress

1st December 2015Brookshear, Section Original Relation 203AssistantFinance 17ManagerFinance 18ManagerPlanning Empl Id Job Title Dept

1st December 2015Brookshear, Section Example of a Lossy Decomposition 203Assistant 17Manager 18Manager AssistantFinance ManagerFinance ManagerPlanning Empl Id Job Title Dept

1st December 2015Brookshear, Ch. 9, Problem 2825 Problem 2 NameDepartmentTel.No. JonesSales SmithSales BakerPersonnel DepartmentTel.No. What is the difference in the information supplied by the single relation and the two relations NameDepartment JonesSales SmithSales BakerPersonnel Sales Sales Personnel

1st December 2015Birkbeck College26 Problem 3 Let R(X,Y,Z) be a relation with attributes X, Y, Z, and let R(X,Y) and R(Y,Z) be relations obtained by decomposing R(X,Y,Z). Prove that if Y is a key for R(X,Y), then the decomposition is lossless. See S. Sumathi and S. Esakkirajan, Fundamentals of relational database management systems.