1 Relational Database Development Alison Taylder Consultant ITC-ILO, Turin 25 th November 2004.

Slides:



Advertisements
Similar presentations
Support.ebsco.com Business Searching Interface Tutorial.
Advertisements

Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
WHAT D IS RAW, UNPROCESSED FACTS AND FIGURES COLLECTED, STORED AND PROCESSED BY COMPUTERS.
INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 15 – RELATIONAL DATABASES SEAN J. TAYLOR.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Concepts of Database Management Sixth Edition
Access Tutorial 1 Creating a Database
1004INT Information Systems Week 10 Databases as Business Tools.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
Using ER/Studio.
Trisha Cummings.  Most people involved in application development follow some kind of methodology.  A methodology is a prescribed set of processes through.
Tutorial 1 Creating a Database. Objectives Learn basic database concepts and terms Learn basic database concepts and terms Explore the Microsoft Access.
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
Entity Relationship Modelling. What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions.
Your Tour Guide is Jim Provensal. What We Will Cover s Introduction to MicroSoft Access u What is a database u What is a “Relational” Database s The Major.
COMM 226 Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
® Microsoft Access 2010 Tutorial 1 Creating a Database.
Database Application Design n Characteristics of Database Applications n Form Design n Report Design n Application Program Design.
XP New Perspectives on Microsoft Access 2002 Tutorial 21 Microsoft Access Tutorial 2 – Creating And Maintaining A Database.
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
Information Systems & Databases 2.2) Organisation methods.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
® Microsoft Office 2013 Access Creating a Database.
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.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Database Design – Lecture 4 Conceptual Data Modeling.
Lesson 2: Designing a Database and Creating Tables.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Chapter 1 Introduction to Database. Database Concept Field: a basic data element or attribute of an object Record: a set of fields Table: a set of records.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
COMPREHENSIVE Access Tutorial 1 Creating a Database.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
Visual Database Creation with MySQL Workbench 도시정보시스템 설계
Course Contents Overview: Database basics Lesson 1: Benefits of using a database Lesson 2: Table that data Lesson 3: Analyzing, viewing, and reporting.
1 Access Lesson 1 Understanding Access Fundamentals Microsoft Office 2010 Fundamentals Story / Walls.
Notes: **A Row is considered one Record. **A Column is a Field. A Database is…  an organized set of stored information usually on one topic  a collection.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
Microsoft Access 2013 ®® Case Study Creating a Database.
Database Design Chapters 17 and 18.
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
Business Searching Interface
Access Tutorial 1 Creating a Database
Databases Chapter 16.
Access Creating a Database
Access Creating a Database
Examples of Poor Primary Keys
Access Lesson 1 Understanding Access Fundamentals
Databases and Information Management
Access Tutorial 1 Creating a Database
Case Study Creating a Database
Business Searching Interface
Database Design Chapters 17 and 18.
Databases and Information Management
Access Tutorial 1 Creating a Database
Access Tutorial 1 Creating a Database
E.R. Examples.
Presentation transcript:

1 Relational Database Development Alison Taylder Consultant ITC-ILO, Turin 25 th November 2004

2 What is a Database ? A database is a structured collection of data. Data refers to the characteristics of people, things, and events. In a database each data item is stored in its own field.  For example, a person's first name, date of birth, and their postal code are each stored in separate fields. The name of a field usually reflects its contents. A postal code field might be named POSTAL-CODE or PSTL_CD.

3 What is a Database ? (cont.) The fields relating to a particular person, thing or event are bundled together to form a record or row.  Each row is made up of a number of fields. No two fields in a row can have the same field name. Rows describing people, things or events are bundled together to form a table.

4 What is a Database ? (cont.) Example:  Employee Table Emp_IdFirst_NameLast_NameDeptPositionSalary 1JohnSmith10Manager20 2BillGates20Labourer5

5 What is a Relational Database ? A relational database is one in which relationships between tables are stored in data fields. Emp_IdFirst_NameLast_NameDept_Id 1JohnSmith10 2BillGates20 Dept_IdDept_Name 10 Accounting 20 Sales

6 How do we create a Relational Database ? 1. Perform Analysis of data 2. Design Database 3. Re-Analyse data 4. Redesign Database. Iterate above steps until the design is satisfactory

7 Analysing Data Gather the evidence  Interview people using the data  Ask them to define the data they are working with eg. What is a claim ? How do you define a rejected claim ?  Find out where the data comes from ? Eg. Paper forms, external database  Find out how the data is used. Eg. Reporting and what is the life- cycle of the data, how it is processed

8 Designing a Relational Database With the help of a data model the users’ data model is transformed into a database design. The standard data model used to create a Relational Database design is called the Entity-Relationship Model.

9 Creating an Entity-Relationship Model Determine Potential Entities  Entities are the principal data object about which information is to be collected. Some specific examples of entities are EMPLOYEES, PROJECTS, INVOICES. An entity is analogous to a table in the relational model. Determine Relationships between Entities  A Relationship represents an association between two or more entities. An example of a relationship would be: employees are assigned to projects projects have subtasks departments manage one or more projects

10 First Draft Entity Relationship Diagram Draw a rough ERD on paper with Entities represented thus:  Entity names should be singular nouns. Relationships are represented as a line between the concerned entities with a short phrase describing the relationship

11 Exercise1. Create a rough ERD For the following example create a first cut ERD on paper:  In a hospital system, each ward has many patients who are cared for by nurses assigned to the ward.

12 Answer 1. WARD NURSEPATIENT accommodates has assigned

13 Examine Relationships Determine what type of relationships we have from the 3 below options:  i) 1:1 relationship  ii) 1:N relationship  iii) N:M relationship ABAB AB

14 Hospital ERD v 0.1 WARD NURSEPATIENT accommodates has assigned cares for

15 Enter ERD into DBDesigner Open DBDesigner  Make sure that the interface is in Design Mode (check by clicking on the menu item Display)  From the left hand side tool click on the table icon it becomes “sticky”, then stick it onto the the white space. It will be called Table_01.  To modify this entity, right click on it and select the option Edit Object. Now you can change the name.  Add all the tables from the rough ERD diagram but NOT the relationships yet.  Add some attributes to each entity. Make the first field of each entity a unique identifier (UID) eg Patient_Id, this is the primary key.

16 Entities with Attributes in DBDesigner

17 Add Relationships I Add the Ward -> Patient Relationship  Click on the button 1:n Relation Tool (Non-Identifying Relation) from the Toolbar so that it becomes sticky. Then clicking on the entity representing the “1” part of the relationship first eg. Ward then on the “N” entity eg Nurse a relationship will be created.  DBDesigner creates a foreign key column identified by (FK) in the “N” entity. What is a foreign key ?  A foreign key is an attribute that completes a relationship by identifying the parent entity.  Every relationship in the model must be supported by a foreign key.

18 Add Relationships II Add the Nurse -> Patient Relationship  Click on the button n:m Relation from the Toolbar so that it becomes sticky. Then clicking on one entity and then the next a relationship will be created.  DBDesigner creates a new entity to represent the N:M relationship made up entirely of the the 2 primary keys of the related entities.

19 Entities with Relationships

20 Create this database in MySQL Click on menu option Database -> Connect. Connect to database Select Database Synchronisation DBDesigner will create the tables, primary keys and foreign keys in MySQL

21 Advanced Exercise A company has several departments. Each department has a supervisor and at least one employee. Employees must be assigned to at least one, but possibly more departments. At least one employee is assigned to a project, but an employee may be on vacation and not assigned to any projects. The important data fields are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee number and a unique project number. Create an ERD using DBDesigner from the above case study