Database Management Systems

Slides:



Advertisements
Similar presentations
Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
Advertisements

3/5/2009Computer systems1 Analyzing System Using Data Dictionaries Computer System: 1. Data Dictionary 2. Data Dictionary Categories 3. Creating Data Dictionary.
Information Systems Chapter 2 Organizing Data and Information.
Normalisation Ensuring data integrity in database design 1.
ETEC 100 Information Technology
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Access A Relational Database Management System. Prof. Leighton2 Database ► A database is a collection of data that’s related to a particular topic ► A.
Entity Relationship Diagrams
Introduction to Database ISYS 363. File Concepts File consists of a group of records. Each record contains a group of fields. Example: Student file –SIDSnameMajorSexGPA.
Entity-Relationship Model and Diagrams (continued)
The Relational Database Model:
WELL-DESIGNED DATABASES Process faster Easy to develop and maintain Easy to read and write code.
Database Design Concepts Info1408
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Database Software Application
Entity-Relationship Design
Database terms Mr. Brunton.
2.3 Organising Data for Effective Retrieval
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 /
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
CREATE THE DIFFERENCE Normalisation (special thanks to Janet Francis for this presentation)
CSE 441: Systems Analysis & Design
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Concepts and Terminology Introduction to Database.
2005 SPRING CSMUIntroduction to Information Management1 Organizing Data John Sum Institute of Technology Management National Chung Hsing University.
G057 - Lecture 02 Introduction To Database System Concepts Mr C Johnston ICT Teacher
CSC 240 (Blum)1 Introduction to Database. CSC 240 (Blum)2 Data versus Information When people distinguish between data and information, –Data is simply.
CORE 2: Information systems and Databases NORMALISING DATABASES.
G045 Lecture 09 ERD Diagrams (Entity Relationship Diagrams) Mr C Johnston ICT Teacher
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
1 n 1 n 1 1 n n Schema for part of a business application relational database.
Information Systems & Databases 2.2) Organisation methods.
What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
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.
Database Design 2: Creating an ER Model
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
Normalization Exercise. First Normal Form Second Normal Form.
+ Information Systems and Databases 2.2 Organisation.
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Database Basics BCIS 3680 Enterprise Programming.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
Mr C Johnston ICT Teacher
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Sample Table Standard Notation Entity name in uppercase
Part 1.  To answer the question “what is a database?”  To understand the basic components of a database and start to plan/create our own.
Howard Paul. Sequential Access Index Files and Data File Random Access.
Introduction to Database SEM I, AY Department of Information Technology Salalah College of Technology Chapter No.1.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
CSCI-235 Micro-Computers in Science Databases. Database Concepts Data is any unorganized text, graphics, sounds, or videos A database is a collection.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
G057 - Lecture 05 From Scenario To Design Mr C Johnston ICT Teacher
Starter Draw a mind map for topic 6 Databases. Objectives Revise topic CG3.6 Databases using various activities and ensure that topics covered are understood.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
NORMALISATION OF DATABASES. WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient.
Databases Chapter 9 Asfia Rahman.
Database Management Systems II
Databases Chapter 16.
Entity-Relationship Model and Diagrams (continued)
Databases.
Presentation transcript:

Database Management Systems Session 5

Objectives Understand the structure of a data table Understand data normalisation Understand and use the terms: - entity - attribute - field - record - primary key Understand the principle of linking tables in a relational database

Topics Database Tables Normalisation Linking Tables Database Schema

Address Book Name Address Tel FAX Mobile Email Gertrude Jones 34 Great West Road London W23 8RT 020 8564 1234 07814 100200 gertie@somecompany.co.uk 020 8564 1235 Record Field Data

Contacts Table Field Record Name Address Phone FAX Mobile Email Darren Adamson 6 Spring Gardens 020 7885 1236   08562 100099 dadam@ahomesp.co.uk Gertie Jones 34 Great West Road, London W23 8RT 020 8354 1234 07954 100200 gertie@somecompany.co.uk Cedric Jones 07951 111233 cedric@someorg.org Jessie Wallace 18 Loch Arber Crescent, Edinburgh EH8 9OP 0123 266 5889 0123 889 7756 08962 333568 wallacej@serviceprov.net Field Record

Entities and Attributes “I want to record the names and addresses of my contacts along with their phone numbers, FAX numbers, mobile numbers and their email addresses” Entity: Contact Attributes of Contact: - Name - Address - Phone - FAX - Mobile - Email

Ordered Collection of Data Characteristics: - each Record is unique - repetition of data is avoided Database Tables follow certain rules called: - First Normal Form - Second Normal Form - Third Normal Form

Primary Key A Field (or fields) which has a unique value for each record Eg. - National Insurance number - Car registration number - Passport number

First Normal Form Data is atomic, self-contained and independent No field in a table contains any repeating groups No record in a table contains repeating groups

Second Normal Form All the non-key columns must be dependent on the entire primary key

Third Normal Form All the non-key columns of the table must be only dependent on the primary key and not on each other

Identifying Entities and Relationships Read the scenario and pick out the nouns Pick out which nouns are giving information about another noun eg Name is telling you additional information about Contact In this case Contact is the Entity and Name is an Attribute of that Entity

Exercise: Entities and Attributes Pick out the database entities and suggest useful attributes: A library has about 300 borrowers who complete a registration form when they join. There are about 25,000 books available for loan. A loan is for 2 weeks and may be renewed over the phone. Overdue books are charged at 10p per day. If a book is out on loan, another borrower may request it.

Text Data For example the Name field The size of the field is determined by the maximum number of characters you want to store The size of the field is the same for each record so empty spaces waste storage space

Number Data For Example in the Salary field The size of the field is determined by the maximum precision of the numbers you want to store Integer Long Integer Single Double

Date Data Stored on the computer as a number Different Formats eg: Short date – 01/02/06

Logical Data Otherwise known as ‘Yes/No’ Takes up minimal storage space

Sorting on Text Data Yellow 22 3 Apple A plum 22 3 A plum Apple Yellow Sort Ascending

Points to Consider What type of data is a telephone number? How can you name files on a Windows system with digits so that they sort correctly?

Linking on the Primary Key Customer Customer ID Name Address Phone Credit Limit Purchase Purchase ID Date Item Amount PK

Linked Fields Linked Fields One to Many Relationship Purchases Purchase ID Customer ID Item 1789 3 Fig Rolls 1790 2 Arabiata Sauce 1791 Black Olives 1792 Porcini Mushrooms 1793 5 Smoked Salmon 1794 4 Cod Roe 1795 1 Cured Ham 1796 Sugar Snap Peas 1797 Ginger Beer 1798 Ground Cumin Customers Customer ID Name 1 Felipe Martins 2 Tom Smith 3 Kimberley Brown 4 Steve Hammer 5 Alfred Futterkist One to Many Relationship

Most Common Types of Relationship Staff Purchase Customer Employee Contractor One to Many Where one record in one table links with many in the other table One to One Where one record in one table links with one in the other table

Many to Many Relationship Borrower Book Many to Many Link A borrower can borrow many books and a book may be borrowed by many borrowers – over a period of time

Resolving Many to Many Relationships Many to Many Links are impossible to programme into a database system. This type of relationship may be resolved into 2 many to one relationships. Book Borrower Loan

Scenario Draw an E-R diagram: Northwind is a wholesaler of delicatessen products. Customers are all over the world and each member of the sales team may deal with any customer. Products is kept in a central warehouse and items are ordered from Suppliers when numbers reach the re-order level. An Order may consist of several different products and may be delivered by any one of three Shippers.

Entity-Relationship Diagram