HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design.

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Lecture-7/ T. Nouf Almujally
Management Information Systems, Sixth Edition
Relational Databases Chapter 4.
Databases and Processing Modes. Fundamental Data Storage Concepts and Definitions What is an entity? An entity is something about which information is.
Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.
Database Design concepts INFO 1408 Lecture 3 What is a database?
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Databases and Database Management Systems
Database Design Concepts Info1408
Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2012 (September 5, 2012)
 Introduction Introduction  Purpose of Database SystemsPurpose of Database Systems  Levels of Abstraction Levels of Abstraction  Instances and Schemas.
Introduction. 
Invitation to Computer Science 5th Edition
Course Introduction Introduction to Databases Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
Web-Enabled Decision Support Systems
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Management Information Systems By Effy Oz & Andy Jones
CS 474 Database Design and Application Terminology Jan 11, 2000.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Unit Seven Database 1.Passage One. Foundation of Database.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
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,
INFS614, Dr. Brodsky, GMU1 Database Management Systems INFS 614 Instructor: Professor Alex Brodsky
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
 Three-Schema Architecture Three-Schema Architecture  Internal Level Internal Level  Conceptual Level Conceptual Level  External Level External Level.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
DAY 14: MICROSOFT ACCESS – CHAPTER 1 Madhuri Siddula October 1, 2015.
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.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The concept of Data, Information and Knowledge  The fundamental terms:  Database and database system  Database.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
HNDComputing – DeMontfort University  DeMontfort University 2011 Entity Relationship Modelling (continued) wk4 Database Design ConceptsDatabase Design.
Fall CSE330/CIS550: Introduction to Database Management Systems Prof. Susan Davidson Office: 278 Moore Office hours: TTh
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 1: Introduction to IS2803 Rob Gleasure
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
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.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1.
Database Planning Database Design Normalization.
CSCI-235 Micro-Computers in Science Databases. Database Concepts Data is any unorganized text, graphics, sounds, or videos A database is a collection.
1 Lecture1 Introduction to Databases Systems Database 1.
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Databases Chapter 16.
Fundamentals & Ethics of Information Systems IS 201
Databases and Database Management Systems Chapter 9
Chapter 4 Relational Databases
CS 174: Server-Side Web Programming February 12 Class Meeting
Database Management Systems CSE594
Database Design Hacettepe University
DATABASE TECHNOLOGIES
Presentation transcript:

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design Concepts IMAT1408 Lecture 2 Database Fundamentals

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Database Design Concepts IMAT1408 Lecture 2 Database Fundamentals

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 3 Objectives To introduce: The three layers of data abstraction (ways of viewing/handling data) The terms physical and logical data independence Table types and associated terms.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 4 Is this a database? Is this Organised? Efficient? Easily accessible? Flexible? ……

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 5 Paper based databases Have been around for a long time Data is organised and quickly accessible So is easier to maintain – fewer errors But is not all that flexible – things are filed in one place only (why would it not be a good idea to have duplicates?).

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 6 Computer based databases Are managed by a Moves data to and from physical data files Manages multiple users Manages transactions: ‘ all or nothing ’ units of work Supports a Query Language to retrieve data from the database Manages back ups Provides security mechanisms.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts Logical Shema (Relational Tables) MAPPING Database Server MySQL DATABASE APACHE WEB-SERVER communicates with the web users PHP or ASP.NET ODBC/API communicates with DB INTERNET Firefox Browser Internet Explorer Browser Typical Example of a Database Internet Architecture

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 8 Layers of data abstraction Databases are obviously very complicated pieces of software How do we understand how they work? They are divided into 3 layers – known as the 3 layer architecture We can look at each layer in turn……

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 9 External layer Logical layer Physical layer What the user sees How the database organises the data for viewing How the computer’s operating system stores the data

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts The DBMS enables multi-user access to the same data at the same time Userview 1 EXTERNAL layer Userview 2 LOGICAL layer Logical Schema MAPPING INTERNAL layer DATA INDEXES MAPPING

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 11 Database File Database File Database File Database File Database File Conceptual Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 12 The Physical Layer The files that actually contain the data Data could be stored over multiple disk drives – maximise performance by running in parallel Microsoft Access stores everything in one physical file. This limits the number of concurrent users and so it cannot be used for large enterprises The DBMS works with the computer’s Operating System (OS) to efficiently manage the file storage The user of the database does not need to know how the DBMS does this.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 13 Database File Database File Database File Database File Database File Conceptual Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 14 Logical Layer The logical layer provides a structure for the data which is known as the conceptual schema This structure needs to meet the requirements of the users. This is what we will work on when we design databases. It makes the data available to any application (or several at once) without the designer needing to know the exact location of the data – the data is therefore independent of the applications. For example a customer database record could be used in many different applications - for billing invoices, posting out publicity flyers about new products, sending on-line questionnaires etc.,etc..

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 15 Database File Database File Database File Database File Database File Conceptual Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 16 External Layer This is the layer where users interact with the database and issue queries The DBMS selects items from the logical layer to form a user view Different user views can be set up to meet different people’s needs These user views can be stored for future use, or may be used only temporarily and then discarded – an ad hoc query.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 17 We need to look at each user’s requirements These give us the external views required You will learn to create the conceptual schema so that these external views can be produced from it. One method we will use is Entity Relationship Modelling We will leave the DBMS to take care of the physical layer. The 3 layers and database design

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 18 Database File Database File Database File Database File Database File Conceptual Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 19 Data Independence - the big advantage of databases Physical data independence means you can change the way the data is stored without having to change all the programs that use the data. This saves time and money.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 20 Database File Database File Database File Database File Database File Conceptual Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 21 Logical Data Independence The ability to make changes to the logical layer without disrupting existing users and processes This means we can: –Add a new database object eg a table –Add data items to an existing object.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 22 Design components: Entity To create a useful database we must study the business’s activities and identify the data that needs to be stored We look for entities Just about anything that can be named can be an entity …but we only consider things of interest to the users of our database.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 23 A very common entity that is found in many business oriented databases is the This represents all the customers in the database ……… an individual customer is known as an occurrence of the entity. CUSTOMER

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 24 Attributes “An attribute is a unit fact that characterises or describes an entity in some way” (Oppel, 2004) Attributes are the smallest units of information that are stored in a database Examples could be the customer’s last name, post code, telephone number.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 25 Unique identifiers An entity will be described using the attributes. For example a student could have last name, first name and several address attributes The problem is we need to distinguish one student from another Most students can be identified by their name but sometimes two students have the same name How do I make sure I don’t award marks to the wrong student?

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 26 I do this by using an attribute known as the primary key This is a unique identifier so each student will have a different value for this attribute What is your unique identifier? Remember these unique identifiers are often invented so are not always known to the person concerned.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 27 Examples of unique identifiers ^ National insurance number Passport number Membership number Order number Vehicle registration number Bank account number.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 28 Tables Main method of storage in the relational model is the table A two dimensional structure composed of rows and columns Each row represents one occurrence (instance) of the entity (or record) Each column represents one attribute of that entity.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 29 Table Types We show a table’s structure by showing its table type Eg Student (studentno, name, address, courseno ) Each Student record will have the same structure but different values. Table NamePrimary KeyAttributes Foreign Key

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 30 Foreign Key The foreign key is the primary key of another table It creates a link between the two tables courseno in our example will be the key field of a course table Course (courseno, title) This allows us to look up the title of the course each student is taking.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 31 Summary You should be able to explain: –Database Management System –Physical, logical and external layers (and draw a diagram of them) –Physical and logical data independence –Entity (more on this next week) –Attribute –Primary key/unique identifier –Table type –Foreign key.

HNDComputing – DeMontfort University  DeMontfort University 2011 Database Fundamentals wk2 Database Design ConceptsDatabase Design Concepts 32 References Databases Demystified by Andy Oppel (Published by McGraw-Hill, ISBN ) Data Analysis for Database Design by David Howe (Published by Arnold. Second edition.)