CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network

Slides:



Advertisements
Similar presentations
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
Advertisements

Normalisation Ensuring data integrity in database design 1.
Athabasca University Under Development for COMP 200 Gary Novokowsky
ACCESS PART 2. Objectives Database Tables Table Parts Key Field Query and Reports Import from Excel Link to Excel.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
The Relational Database Model:
Designing a Database Unleashing the Power of Relational Database Design.
LIS 557 Database Design and Management William Voon Michael Cole Spring '04.
The Relational Database Model. 2 Objectives How relational database model takes a logical view of data Understand how the relational model’s basic components.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
The Relational Database Model
Database Design Concepts
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
RAJIKA TANDON DATABASES CSE 781 – Database Management Systems Instructor: Dr. A. Goel.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
CTFS Workshop Shameema Esufali Suzanne Lao Data coordinators and technical resources for the network
Normalization (Codd, 1972) Practical Information For Real World Database Design.
GUS: 0262 Fundamentals of GIS Lecture Presentation 3: Relational Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
CORE 2: Information systems and Databases NORMALISING DATABASES.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
The Relational Database Model
What's a Database A Database Primer Let’s discuss databases n Why they are hard n Why we need them.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Btec National - Advanced Databases 1 Advanced Databases Entity Relationship Diagrams.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Relational Theory and Design
SQL LANGUAGE and Relational Data Model TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
Chapter 2 Introduction to Relational Model. Example of a Relation attributes (or columns) tuples (or rows) Introduction to Relational Model 2.
Chapter 2: Intro to Relational Model. 2.2 Example of a Relation attributes (or columns) tuples (or rows)
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
A337 - Reed Smith1 Structure What is a database? –Table of information Rows are referred to as records Columns are referred to as fields Record identifier.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Lesson 2: Designing a Database and Creating Tables.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
NORMALIZATION. What is Normalization  The process of effectively organizing data in a database  Two goals  To eliminate redundant data  Ensure data.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Microsoft Access 2010 Chapter 11 Database Design.
SHAKEELA Databases = Fun..Fun..Fun. Databases are……UBIQUITOUS EVERYWHERE...Ever Present…used all over the world  Online Movie Store  Airlines  Grades.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
Huffman Trucking Fleet Vehicle Maintenance Database DBM380 June 13, 2012 Learning Team B.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Revised: 2 April 2004 Fred Swartz
SEEM3430: Information Systems Analysis and Design
Relational Databases.
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
CSCI-100 Introduction to Computing
Databases and Information Management
CTFS Asia Region Workshop 2014
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Relational Model and ER Model: in a Nutshell
Normalization Referential Integrity
Database.
Entity relationship diagrams
Databases and Information Management
Chengyu Sun California State University, Los Angeles
logical design for relational database
Presentation transcript:

CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network

CTFS Workshop Relational database basics Why relational databases? Why MySQL? What about R?

Relational Theory In order to work with MySQL it is necessary to understand the basics of relational theory. i.e how and why data is stored and managed in a relational database. The guiding principle behind a relational database is to store data once and only once.

What is a Relation? A table. Columns are fields (attributes) of data related to other fields on the same row (tuple).

Primary Key Identifies the row of a table without duplicates. Tells you what the row contains Eg. If treeid is the primary key then the row has information about that tree

Candidate Primary Key Any attribute(s) which together would serve as the primary key. Must uniquely identify a row of data. Each part of the key must be essential to unique identification. No redundancy.

Foreign Key A foreign key is a column in a table that matches the primary key column of another table. Its function is to link the basic data of two entities on demand, i.e. when two tables are joined using the common key.

First Normal Form One piece of information per column. No repeated rows. Eliminate fused data eg Code1,Code2 TagSpeciesCode 1234SHORMEA 1234SHORMEBA TagSpeciesCode 1234SHORMEA, BA Wrong! Right

Second Normal Form Each column depends on the entire primary key. TagCensusSpeciesSeedsizeXYDBH 12341SHORTRMedium TagSpeciesSeedsizeXY 1234SHORTRMedium Wrong Right

Third Normal Form Each column depends ONLY on the primary key. i.e. there are no transitive dependencies TagSpeciesSeedsizeXY 1234SHORTRMedium TagSpeciesXY 1234SHORTR Wrong Right

Fourth Normal Form The table must contain no more than one multi-valued dependency TagDBHCod e A A BA

Entity Relationship diagram (ERD) Shows in a diagram how entities (tables) are related to one another.  One to One  One to many  Many to many

One to one Extension of number of attributes in a single table Rarely required

One to Many Most common Requires two tables. Linked by Foreign Key

Many to many Need to break down to one to many Requires three tables Associative table provides common key

Reassembling data Data was broken down into tables to preserve integrity How can we put it together to derive information? Use Structured Query Language (SQL) to JOIN tables using a common attribute

Joins Two tables may be joined when they share at least one common attribute The Primary key of the Parent table is stored in the Child table as a cross reference. This is called a Foreign Key. Primary Key in Parent Foreign Key in Child

Table joined on Foreign Key GenusID The Genus ID in the Species table is used to pick up information for the corresponding Genus. It looks for a row with the matching Primary Key

Extend to join many tables With SQL you can join as many tables as you need to in order to get the set of information you need. Thus the previous example can be extended to include Family which is a parent table of Genus and/or extended in the another direction to include Tree which is a child of Species as long as there is a linking attribute. This attribute is called a Foreign Key.