CTFS Asia Region Workshop 2014

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

The Relational Database Model:
3-1 Chapter 3 Data and Knowledge Management
Designing a Database Unleashing the Power of Relational Database Design.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
The Relational Database Model
Database Design Concepts
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
CTFS Workshop Shameema Esufali Suzanne Lao Data coordinators and technical resources for the network
GUS: 0262 Fundamentals of GIS Lecture Presentation 3: Relational Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
What's a Database A Database Primer Let’s discuss databases n Why they are hard n Why we need them.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Version: 2.0. Forenam e of parent Surname of parent Address 1 Address 2 Name of child Age of child School database example. Try adding a few rows for.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Relational Theory and Design
GIS Data Models GEOG 370 Christine Erlien, Instructor.
Lesson 2: Designing a Database and Creating Tables.
CTFS Workshop Shameema Esufali Asian data coordinator and technical resource for the network
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
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.
1 Management Information Systems M Agung Ali Fikri, SE. MM.
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.
1 SQL SERVER 2005 Express CE-105 SPRING 2007 Engr. Faisal ur Rehman.
Databases and DBMSs Todd S. Bacastow January
Understanding Data Storage
Tables & Relationships
Revised: 2 April 2004 Fred Swartz
Relational Model.
The Relational Database Model
Databases Chapter 16.
DESIGNING DATABASE APPLICATIONS
Database Normalization
Database Keys and Constraints
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.
CIS 155 Table Relationship
Database Management Systems (DBMS)
CIS 207 The Relational Database Model
CSCI-100 Introduction to Computing
DATABASE CONCEPTS.  It does not have to be computerized  However, due to the high power and relatively low price of current technology, as well.
Databases and Information Management
Chapter 9 Designing Databases
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Relational Model and ER Model: in a Nutshell
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Normalization Referential Integrity
Database.
Entity relationship diagrams
Teaching slides Chapter 8.
Physical Database Design
PHP and MySQL.
Normalization Normalization theory is based on the observation that relations with certain properties are more effective in inserting, updating and deleting.
Databases and Information Management
The Relational Database Model
Getting to First Base: Introduction to Database Concepts
Chengyu Sun California State University, Los Angeles
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Relational Database Design
logical design for relational database
Getting to First Base: Introduction to Database Concepts
Getting to First Base: Introduction to Database Concepts
Topic 12 Lesson 2 – Retrieving Data with Queries
Databases 1.
Shelly Cashman: Microsoft Access 2016
Information system analysis and design
Presentation transcript:

CTFS Asia Region Workshop 2014 Shameema Esufali Suzanne Lao Data coordinators and technical resources for the network shameemaesufali@gmail.com laoz@si.edu

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

From an input sheet to a database What is a database? Why do we need to convert our input sheet/ excel spreadsheet to a database? What are the advantages and disadvantages? How does a data entry program help?

Input form / Excel sheet How best to store data for Accuracy Easy retrieval

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 Wrong! Tag Species Code 1234 SHORME A, BA Right Tag Species Code 1234 SHORME A BA

Each column depends on the entire primary key. Second Normal Form Each column depends on the entire primary key. Wrong Tag Census Species Seedsize X Y DBH 1234 1 SHORTR Medium 11.3 15.4 12 Tag Species Seedsize X Y 1234 SHORTR Medium 11.3 15.4 Right

Third Normal Form Each column depends ONLY on the primary key. i.e. there are no transitive dependencies Wrong Tag Species Seedsize X Y 1234 SHORTR Medium 11.3 15.4 Right Tag Species X Y 1234 SHORTR 11.3 15.4

The table must contain no more than one multi-valued dependency Fourth Normal Form The table must contain no more than one multi-valued dependency Tag DBH Code 1234 10 A 11 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 Primary Key in Parent 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. 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.