Big Data Yuan Xue CS 292 Special topics on.

Slides:



Advertisements
Similar presentations
Relational Databases Chapter 4.
Advertisements

©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
1 Chapter 2 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data u User’s view immune to changes.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1.
Data Base Management System
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter One Overview of Database Objectives: -Introduction -DBMS architecture -Definitions -Data models -DB lifecycle.
IST Databases and DBMSs Todd S. Bacastow January 2005.
Introduction to DBMS Purpose of Database Systems View of Data
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
CSC2012 Database Technology & CSC2513 Database Systems.
1 Introduction to databases concepts CCIS – IS department Level 4.
Introduction to Databases
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2012 (September 5, 2012)
The Relational Model. Review Why use a DBMS? OS provides RAM and disk.
1 CSE 480: Database Systems Lecture 1: Introduction Reference: Read Chapters 1 & 2 of the textbook.
Course Introduction Introduction to Databases Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
Chapter 2 CIS Sungchul Hong
CSC271 Database Systems Lecture # 4.
Database Technical Session By: Prof. Adarsh Patel.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
 DATABASE DATABASE  DATABASE ENVIRONMENT DATABASE ENVIRONMENT  WHY STUDY DATABASE WHY STUDY DATABASE  DBMS & ITS FUNCTIONS DBMS & ITS FUNCTIONS 
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Database Management Systems
I Information Systems Technology Ross Malaga 4 "Part I Understanding Information Systems Technology" Copyright © 2005 Prentice Hall, Inc. 4-1 DATABASE.
Chapter 1 : Introduction §Purpose of Database Systems §View of Data §Data Models §Data Definition Language §Data Manipulation Language §Transaction Management.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Chapter(1) Introduction and conceptual modeling. Basic definitions Data : know facts that can be recorded and have an implicit. Database: a collection.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Lecture 1: Overview of CSCI 485 Notes: I presented parts of this lecture as a keynote at Educator’s Symposium of OOPSLA Shahram Ghandeharizadeh Associate.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
Databases Shortfalls of file management systems Structure of a database Database administration Database Management system Hierarchical Databases Network.
Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
1 Database Management Systems (DBMS). 2 Database Management Systems (DBMS) n Overview of: ä Database Management Components ä Database Systems Architecture.
Database Environment Session 2 Course Name: Database System Year : 2013.
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
CIS/SUSL1 Fundamentals of DBMS S.V. Priyan Head/Department of Computing & Information Systems.
Object storage and object interoperability
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
1 Chapter 2 Database Environment Pearson Education © 2009.
Jennifer Widom Relational Databases The Relational Model.
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Lecture 1: Overview of CSCI 485 Shahram Ghandeharizadeh Associate Professor Computer Science Department University of Southern California Presented by:
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Big Data Yuan Xue CS 292 Special topics on.
Databases and DBMSs Todd S. Bacastow January
Introduction to DBMS Purpose of Database Systems View of Data
Introduction to Databases
Unit 1: INTRODUCTION Database system, Characteristics Database Users
Chapter 4 Relational Databases
Relational Databases The Relational Model.
Relational Databases The Relational Model.
Data Model.
Introduction to DBMS Purpose of Database Systems View of Data
Database and Database Management System (DBMS)
Lecture 1: Overview of CSCI 485 Notes: I presented parts of this lecture as a keynote at Educator’s Symposium of OOPSLA Shahram Ghandeharizadeh Director.
Lecture 1: Overview of CSCI 485 Notes: I presented parts of this lecture as a keynote at Educator’s Symposium of OOPSLA Shahram Ghandeharizadeh Associate.
Presentation transcript:

Big Data Yuan Xue CS 292 Special topics on

Part I Relational Database Yuan Xue

Discussion  Did you ever encounter a data management problem?  Experimental data from a homework?  Personal data?  Other data?  How did you manage your data?

Database  Database: An integrated collection of related data  Usually stored on secondary storage (as files)  Also in-memory database  Examples of databases  Vanderbilt student database, course registration and grading database (backend of YES);  Amazon’s products and customer database; Ebay’s products and transaction database;  Facebook’s user and message database;  And more… Database Data

Database Management System (DBMS)  DBMS: A collection of software/programs  Designed to assist in creating, and managing database  Support defining, constructing, manipulating, sharing databases  Examples of DBMSs  Relational DBMSs: Commercial: Oracle, IBM (DB2, Informix), Microsoft (SQL Server, Access); Open source: MySQL, PostgreSQL  NoSQL and newSQL: BigTable/Hbase, Cassandra, Redis, Riak, MongoDB, Dynamo, DynamoDB, Spanner  Other: object-oriented database, etc

Database System Environment Database DBMS Users Data Application Data Without DBMS With DBMS

Benefit of DBMS  Development convenience  Reduce application development time  Data independence:  Application programs not dependent on data representation and storage details  Data integrity and consistency:  Enforce consistency constraints on data  Data sharing and Concurrency control  Data is better utilized (discovered and reused), redundancy of data is minimized  Avoid undesirable race conditions that arise with simultaneous access/updates to data  Centralized control  DBA tunes the database to balance user's needs  Security  Prevent unauthorized access.  Crash recovery  Ensure the integrity of data in the presence of failures

Example Application – MiniTwitter  What data do we need?  What capabilities on the data do we need?

Example Application – MiniTwitter  What data do we need?  User profile info: ID, password, , display name, picture, people I follow, people who follow me.  Tweets: author, time, content (topic), replies (author, time, content), favorite (author, time),  What capabilities on the data do we need?  Register a new user  Follow/unfollow a user (approve following request)  post/delete a tweet  Read/update in real-time all the tweets from the people I follow  Show the number of tweets I posted, #people following me, #people I follow  Trend information Information required to record System State Operations that update and retrieve System State

Three-Level Architecture  Key question: how to describe data? Conceptual Data Model Logic Data Model Physical Data Model Entities, attributes, relationships (entity-relationship model) Coming next Storage, data structure

Database Model  Logic Data Model: logical structure of data organization  Types of data model  Relational model:  table  Semistructured data model (XML/JSON)  tree  Various data models in NoSQL systems  key-value pair  column-family  graph  Object-oriented model  object, class, inheritance  a layer over relational model

Schema = structural description of relations in database Instance = actual contents at given point in time Schema – structural description of relations in database Instance – data in the database at a given point in time Relational Data Model IDName Password

Schema = structural description of relations in database Instance = actual contents at given point in time Database = set of named relations (or tables) Each relation has a set of named attributes (or columns) Each tuple (or row) has a value for each attribute Each attribute has a type (or domain) Relational Data Model IDName Password

Discussion  How to design relations (tables) for MiniTwitter  What are the aspects we need to consider?

Design – Version 0.1 IDName Password Aadf1234 com qwer6789 IDTimestampAuthorContent Alice00Hello Bob2013Nice weather Not sure.. User Tweet FolloweeFollowerTimestamp Alice00Bob Bob2013Cathy Alice00Cathy Cathy123Alice Bob2013Alice Follow Pretending to be md5 hashcode ;)

Key – attribute whose value is unique in each tuple Or set of attributes whose combined values are unique Relational Data Model IDName Password ail.com Aadf1234 l.com qwer6789 IDtimestampAuthorContent Alice00Hello Bob2013Nice weather Not sure.. User Tweet IDFollowertimestamp Alice00Bob Bob2013Cathy Alice00Cathy Cathy123Alice Bob2013Alice Follow

Key – attribute whose value is unique in each tuple Or set of attributes whose combined values are unique Relational Data Model IDName Password ail.com Aadf1234 l.com qwer6789 IDtimestampAuthorContent Alice00Hello Bob2013Nice weather Not sure.. User Tweet IDFollowertimestamp Alice00Bob Bob2013Cathy Alice00Cathy Cathy123Alice Bob2013Alice Follow

Foreign Key – attribute or set of attributes in one table that point to the primary key of another Relational Data Model IDName Password ail.com Aadf1234 l.com qwer6789 IDtimestampAuthorContent Alice00Hello Bob2013Nice weather Not sure.. User Tweet IDFollowertimestamp Alice00Bob Bob2013Cathy Alice00Cathy Cathy123Alice Bob2013Alice Follow

Foreign Key – attribute or set of attributes in one table that point to the primary key of another Relational Data Model IDName Password ail.com Aadf1234 l.com qwer6789 IDtimestampAuthorContent Alice00Hello Bob2013Nice weather Not sure.. User Tweet IDFollowertimestamp Alice00Bob Bob2013Cathy Alice00Cathy Cathy123Alice Bob2013Alice Follow

More on Relational Data Model  NULL – special value for “unknown” or “undefined”  Relational Model Constraint Summary  Domain constraints  Key constraints  Integrity contraints

Relational Data Model and Database  Relation Model  Simple representation  Efficient implementation  Driven by relational algebra and relational calculus  Up-front definition of schemas and types that the data will thereafter adhere to  High-level simple yet expressive query language  Relational databases  Proven success for both open source and proprietary systems  Provide full ACID guarantees.  SQL as widely used and standard way of database interaction

Creating and Using a Relational Database  Steps in creating and using a (relational) database 1. Design schema (using DDL – data definition language) 2. Initialization: “Bulk load” initial data 3. Operation: execute queries and modifications Data Meta-data: database definition