SlideShare a Scribd company logo
Introduction to Database Concepts
Campaigns Need Data Campaigning depends on lists. Supporters Volunteers Donors Voters Legislators Can you think of others?
The (Internet) Life of Data
Important Data Terms Database  In practice, a set of tables.  Relational databases (like the ones that underlie websites) have tables that are related to each other by common fields.  (clarity over accuracy)   Table   A table is a collection of data organized into columns (fields) and rows (records) and related to other tables by common fields.  Field   A column. A field contains all the same type of data; each cell refers to a different unit.  Record   A row. A record contains all the different types of data about a unit of analysis (e.g. user, order, letter).
Tables Relate to Each Other “Keys” to success Fields that relate tables to each other are called “ keys ”. “ Primary key ” is the field (column) containing a unique id for each record.  Keys  prevent duplication  of info in database. donations volunteers campaigns users
Exercise Which campaign did Mr. Greenburg volunteer for? How much money did Sarah raise? Who recruited her? How much money did the phone bank raise? users volunteers donations campaigns
Tables Relate to Each Other “Keys” to success Fields that relate tables to each other are called “ keys ”. “ Primary key ” is the field (column) containing a unique id for each record.  Keys  prevent duplication  of info in database. donations volunteers campaigns users
Structured Query Language SQL  A standard language for querying and modifying relational databases.  Query   Using SQL to ask the database a question.  mySQL  An Open Source Software relational database management system that uses SQL.  mySQL Query Browser  One of many available programs that allows you to connect to a database and run queries on it.
Structured Query Language Use SQL  SELECT, UPDATE, INSERT,  or DELETE data. SELECT statements ask the database to display data. SQL is the standard language used to speak to databases Use a SQL client to connect to the database and execute SELECT, UPDATE, INSERT, or DELETE statements.
mySQL Query Browser The database has a message for you…
Anatomy a SELECT statement SELECT [fields] FROM [tables] JOIN [tables] WHERE [criteria] ORDER BY [sort] GROUP BY [field] LIMIT [# of results] We’ll focus on  SELECT  statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
Anatomy a SELECT statement The most basic: SELECT * FROM users; We’ll focus on  SELECT  statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
Anatomy a SELECT statement The second most basic: SELECT user_id FROM users; We’ll focus on  SELECT  statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
Anatomy a SELECT statement SELECT [fields] FROM [tables] JOIN [tables] WHERE [criteria] ORDER BY [sort] GROUP BY [field] LIMIT [# of results] We’ll focus on  SELECT  statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
Anatomy a SELECT statement SELECT * FROM users WHERE  city = ‘Austin’; We’ll focus on  SELECT  statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
Exercise Show all members’ first names Show how much Dave Young donated Show when Sarah Jones signed up to volunteer Show the contact info for everyone from Massachusetts List the user_id of everyone who donated to the general fund users volunteers donations campaigns
Try this at home. Install Query Browser: http://dev.mysql.com/downloads/query-browser/index.html Connect to the test database: host: 66.226.14.211 username/pw/schema: noi (all 3 the same) mySQL Docs: http://dev.mysql.com/doc/refman/5.1/en/index.html SQL Tutorial: http://www.w3schools.com/sql/sql_intro.asp

More Related Content

PPTX
Introduction to databases
PPTX
Database Concepts and Terminologies
PPTX
Database Concepts and Components
PPT
Week 4 The Relational Data Model & The Entity Relationship Data Model
PPT
Data Dictionary
PPT
Week 1 Before the Advent of Database Systems & Fundamental Concepts
PPT
overview of database concept
PPTX
Relational Database Design
Introduction to databases
Database Concepts and Terminologies
Database Concepts and Components
Week 4 The Relational Data Model & The Entity Relationship Data Model
Data Dictionary
Week 1 Before the Advent of Database Systems & Fundamental Concepts
overview of database concept
Relational Database Design

What's hot (20)

PPTX
Database basics
PPTX
Database and types of database
PPT
Database Concept by Luke Lonergan
PPSX
DISE - Database Concepts
PPTX
Database Basics
PPTX
Introduction to database & sql
PPTX
Database Design
PPTX
L4 working with tables and data
DOCX
Database
PPTX
Relational database revised
PPTX
Database Basics
PPT
Rdbms
PPTX
Database Basics Theory
PPTX
Databases and its representation
PDF
Introduction to Database
PPT
PPTX
PPTX
Database fundamentals
PDF
Chapter 6 Database SC025 2017/2018
PPTX
Dbms classification according to data models
Database basics
Database and types of database
Database Concept by Luke Lonergan
DISE - Database Concepts
Database Basics
Introduction to database & sql
Database Design
L4 working with tables and data
Database
Relational database revised
Database Basics
Rdbms
Database Basics Theory
Databases and its representation
Introduction to Database
Database fundamentals
Chapter 6 Database SC025 2017/2018
Dbms classification according to data models
Ad

Viewers also liked (20)

PPTX
Introduction to database
PPT
Database system concepts
PPTX
Types of databases
PPT
Lecture 01 introduction to database
PPT
Basic DBMS ppt
PPT
Fundamentals of Database ppt ch01
PPT
Genome annotation 2013
PPT
Types dbms
PPT
Data Base Management System
PPTX
Dbms slides
PPTX
Introduction to Database
PPT
Ao6 Database
PPT
PPT
Databaseconcepts
PDF
9 relational database concepts
PPTX
Datamodels & architecture
PDF
Database System Concepts and Architecture
PPTX
Basic Concept of Database
PPTX
Sequence Analysis
PDF
Bioalgo 2012-02-rna
Introduction to database
Database system concepts
Types of databases
Lecture 01 introduction to database
Basic DBMS ppt
Fundamentals of Database ppt ch01
Genome annotation 2013
Types dbms
Data Base Management System
Dbms slides
Introduction to Database
Ao6 Database
Databaseconcepts
9 relational database concepts
Datamodels & architecture
Database System Concepts and Architecture
Basic Concept of Database
Sequence Analysis
Bioalgo 2012-02-rna
Ad

Similar to Introduction to Database Concepts (20)

PPT
mySQL and Relational Databases
PPT
Intro databases (Table, Record, Field)
PPTX
Introduction to SQL
PPTX
Y13-Chapter-3-Lesson-2-Database-Users-and-Concepts.pptx
PPT
PDF
PDF
Sql a practical introduction
PDF
Sql a practical introduction
PPTX
IP-Lesson_Planning(Unit4 - Database concepts and SQL).pptx
PPTX
Database.pptx
PPTX
Getting Started with MySQL I
PDF
Database-SQL -in computer appliacation of pharmcay
PPTX
shs tvl ict_Programming Introduction to SQl.pptx
DOC
Database queries
PPT
Fg d
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Introduction to Database Management Systems: Structure, Applications, and Key...
PDF
sql_data.pdf
PPTX
CVJ531: Intro to MySQL
mySQL and Relational Databases
Intro databases (Table, Record, Field)
Introduction to SQL
Y13-Chapter-3-Lesson-2-Database-Users-and-Concepts.pptx
Sql a practical introduction
Sql a practical introduction
IP-Lesson_Planning(Unit4 - Database concepts and SQL).pptx
Database.pptx
Getting Started with MySQL I
Database-SQL -in computer appliacation of pharmcay
shs tvl ict_Programming Introduction to SQl.pptx
Database queries
Fg d
MYSQL Presentation for SQL database connectivity
Introduction to Database Management Systems: Structure, Applications, and Key...
sql_data.pdf
CVJ531: Intro to MySQL

More from Rosalyn Lemieux (8)

PDF
Using Attentive.ly Social Automations for Radically Improved Engagement
PPTX
Webinar: engaging donors and activists on social media with Attentive.ly
PPT
Attentive.ly how-to series
PPTX
Kidscount: Data Visualization
PPTX
How to make kiln fired glass
PPT
Building an Activist List
PPTX
Social Media For Grassroots Engagement
PPTX
Intro To Twitter
Using Attentive.ly Social Automations for Radically Improved Engagement
Webinar: engaging donors and activists on social media with Attentive.ly
Attentive.ly how-to series
Kidscount: Data Visualization
How to make kiln fired glass
Building an Activist List
Social Media For Grassroots Engagement
Intro To Twitter

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative study of natural language inference in Swahili using monolingua...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
TLE Review Electricity (Electricity).pptx
A Presentation on Artificial Intelligence
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
OMC Textile Division Presentation 2021.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Advanced methodologies resolving dimensionality complications for autism neur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Introduction to Database Concepts

  • 2. Campaigns Need Data Campaigning depends on lists. Supporters Volunteers Donors Voters Legislators Can you think of others?
  • 4. Important Data Terms Database In practice, a set of tables. Relational databases (like the ones that underlie websites) have tables that are related to each other by common fields. (clarity over accuracy) Table A table is a collection of data organized into columns (fields) and rows (records) and related to other tables by common fields. Field A column. A field contains all the same type of data; each cell refers to a different unit. Record A row. A record contains all the different types of data about a unit of analysis (e.g. user, order, letter).
  • 5. Tables Relate to Each Other “Keys” to success Fields that relate tables to each other are called “ keys ”. “ Primary key ” is the field (column) containing a unique id for each record. Keys prevent duplication of info in database. donations volunteers campaigns users
  • 6. Exercise Which campaign did Mr. Greenburg volunteer for? How much money did Sarah raise? Who recruited her? How much money did the phone bank raise? users volunteers donations campaigns
  • 7. Tables Relate to Each Other “Keys” to success Fields that relate tables to each other are called “ keys ”. “ Primary key ” is the field (column) containing a unique id for each record. Keys prevent duplication of info in database. donations volunteers campaigns users
  • 8. Structured Query Language SQL A standard language for querying and modifying relational databases. Query Using SQL to ask the database a question. mySQL An Open Source Software relational database management system that uses SQL. mySQL Query Browser One of many available programs that allows you to connect to a database and run queries on it.
  • 9. Structured Query Language Use SQL SELECT, UPDATE, INSERT, or DELETE data. SELECT statements ask the database to display data. SQL is the standard language used to speak to databases Use a SQL client to connect to the database and execute SELECT, UPDATE, INSERT, or DELETE statements.
  • 10. mySQL Query Browser The database has a message for you…
  • 11. Anatomy a SELECT statement SELECT [fields] FROM [tables] JOIN [tables] WHERE [criteria] ORDER BY [sort] GROUP BY [field] LIMIT [# of results] We’ll focus on SELECT statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
  • 12. Anatomy a SELECT statement The most basic: SELECT * FROM users; We’ll focus on SELECT statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
  • 13. Anatomy a SELECT statement The second most basic: SELECT user_id FROM users; We’ll focus on SELECT statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
  • 14. Anatomy a SELECT statement SELECT [fields] FROM [tables] JOIN [tables] WHERE [criteria] ORDER BY [sort] GROUP BY [field] LIMIT [# of results] We’ll focus on SELECT statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
  • 15. Anatomy a SELECT statement SELECT * FROM users WHERE city = ‘Austin’; We’ll focus on SELECT statements today, because they’re the most basic, and what you’ll need most in your work. Leave the UPDATE, DELETE, INSERT to the tech team, if there is one.
  • 16. Exercise Show all members’ first names Show how much Dave Young donated Show when Sarah Jones signed up to volunteer Show the contact info for everyone from Massachusetts List the user_id of everyone who donated to the general fund users volunteers donations campaigns
  • 17. Try this at home. Install Query Browser: http://dev.mysql.com/downloads/query-browser/index.html Connect to the test database: host: 66.226.14.211 username/pw/schema: noi (all 3 the same) mySQL Docs: http://dev.mysql.com/doc/refman/5.1/en/index.html SQL Tutorial: http://www.w3schools.com/sql/sql_intro.asp

Editor's Notes

  • #2: {5 min} Welcome & next slide intro
  • #3: [3]{35} Q: Why should I stay awake for this? A: Campaigning is all about lists. Tables contain lists. Databases are sets of tables. Supporters Volunteers Donors Voters Legislators Others?
  • #4: {10 min} Get the Picture: How it all fits together (TAKE A LONG TIME ON THIS SLIDE, bringing in pieces one at a time.) Server Houses Database Website / Web server Share data back and forth via a Server-side application – e.g. ASP, PHP, CF; Can folks think of others? At MoveOn, we use a scripting language called Mason, which is basically Perl inside packets that let web pages process it. All good fun, but the point is to share data with Personal computers – single; collective is the WWW So you collect data from them using Secure data transfer via forms – e.g. donation form, petition form; What are some other examples? Great, but what do you do with that data? You can publish it back to the public via the website (over the Internet ) – e.g. donation thermometer, blog comments; Other? Or use a database client – e.g. mySQL QB – to really get your hands on the data. Use SQL to ask the database questions, like: Have we raised enough $ today to buy pizza for the volunteers? How many volunteers do we have in that precinct? Or, what’s the ratio of volunteers to residents in that precinct? Are there enough supporters in that DMA to have a successful media event next week?
  • #5: {5 min} Definitions (clarity over accuracy) Database In practice, a set of tables. Relational databases (like the ones that run websites) have tables that are related to each other by common fields. Table A table is a collection of data organized into columns (fields) and rows (records) and related to other tables by common fields. Field A column. A field contains all the same type of data; each cell refers to a different unit. Record A row. A record contains all the different types of data about a unit of analysis (e.g. user, order, letter).
  • #6: {10 min} TELL THEM THIS IS THE MOST IMPORTANT SLIDE TO UNDERSTAND TAKE SOME TIME ON IT {Don’t click yet} In a world without relational database management systems, we might have a person in charge of fundraising with a list of donors. Back 5 years (or today on smaller campaigns) this might be kept in Excel. Back 15, this might have been a little box of index cards. Before that, stone tablets. The volunteer coordinator might have another list, and never the twain shall meet. Today, we keep all our data (I hope) in RDBMS that neatly link together data that all arms of the campaign collect: who gave online, who signed a petition on the street, what fundraising campaigns are we running, and who gave to each of those campaigns, or volunteered for them; which precincts are we canvassing, with which volunteers, etc. The idea of a relational database is that there’s no (or little) duplication of data. Once we collect contact info for a person, we don’t reenter it somewhere else in the database each time she takes an action, we record the action she took and relate it back to her contact info. All this data is related in the database through unique record identifiers called keys . {Click to bring in arrow that shows how users is related to donations}  This “users” table contains supporters’ contact info. User_id is the primary key. Each primary key is unique in this table. That way, if two people named “Jim Smith” sign up, we won’t get them confused. One is user_id = 1 and the other is user_id = 5. Everything Sarah Jones does is linked back to her contact info using her user_id, 2.  If Sarah donates, she shows up in the “volunteers” table, but not as “Sarah Jones” as user_id #2. {Click to bring up Volunteers and Campaigns tables}  If Sarah volunteers, she shows up in the “volunteers” table, but not as “Sarah Jones” as user_id #2.  What other kind of info might we want to record?
  • #7: {5 min} Answer these questions using the tables provided. Go around and make sure people get the right answers. Note and help them if not.
  • #8: {5 min} Review answers in group BE SURE TO DO Q&A BEFORE MOVING ON
  • #9: {5 min for this and next 2 slides – Defining SQL} SQL A standard language for querying and modifying relational databases. Query Using SQL to as the database a question. mySQL MySQL is an Open Source Software relational database management system that uses SQL. mySQL Query Browser One of many available programs that allows you to connect to a database and run queries on it.
  • #10: If you are not the DBA, and you probably won’t be, then you don’t have direct access to the database. Since you don’t have access to the server where the database lives, it is as if it’s in another dimension, “the other side”. You can’t communicate with it directly. You need a medium: an SQL client, like mySQL QB. Use QB to connect to the database and communicate with it, by executing SQL statements.
  • #11: This is mySQL Query Browser, which is a medium for communicating with the database. There are lots of SQL clients – this is just an example. You can see here, you put in info about the server, a username and password (just like FTP, for those familiar with that). The QB brings up a map of the tables, and you can write SQL statements to query the data in those tables. We’re not going to use mySQL QB today, we’re just going to talk about how to create a simple SQL query.
  • #12: {10 min for this + next 4 slides} The most important type of SQL statement is SELECT. In a SELECT statement, you are required to give 2 pieces of info: which fields and which tables… Next screen to show basic query.
  • #13: * = all fields Result would be the entire table.
  • #14: * = all fields Result would be one column, user_id, that contained a row for every record.
  • #15: The next most useful clause is the WHERE clause. Not required, but this is where you limit the results by defining criteria. Go to next slide for example.
  • #17: {8 min} Write SQL queries for as many of these as you can in the next 8 minutes. Turn in to Justin via email by end of session.
  • #18: {2 min}