SlideShare uma empresa Scribd logo
1 de 35
ADVANCED DATABASES
      REVISION 1
REVISION TACTICS

• Watch the videos from emails and moodle
  • Take notes
• Follow these slides
  • Visit the web resources
  • Learn the keywords and concepts
• Learn SQL
• Use Cmap tools to link concepts /t erms
• Revisit your patchwork
THE BUILDING BLOCKS
       TERMS AND CONCEPTS YOU SHOULD KNOW BY NOW…


•   XML                        • NoSQL
•   Graph                      • ODBC
•   Relational Database        • MySQL
•   SQL
•   Linked Data
•   RDF
•   Trigger
•   Database Index
REVISION TOOL: CMAP TOOLS

• http://cmap.ihmc.us/download/
• Tool for creating concept maps
TOPICS

• Relational Databases (MySQL)
 • SQL
 • Triggers
 • Transactions


• Webservices
 • XML


• NoSQL / Alternative Database systems
RELATIONAL DATABASES
        MYSQL
RELATIONAL DATABASES
    ‘FORMALLY DESCRIBED TABLES’
• This module focused on MySQL: an Open source
  implementation of a relational database
 • Oracle, PostgreSQL, SQLite


• Most patchworks should be done in MySQL
  (Triggers, indexs)

• ODBC Component

• Looked at alternatives: NoSQL (Not Only
  SQL), Graph Database, triplestore
RELATIONAL DATABASES: SQL
                     (STRUCTURED QUERY LANGUAGE)



• Language to manage data in relational
  management systems
• Should be examples in your patchwork

CREATE TABLE example_autoincrement (
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, data VARCHAR(100)
);
RELATIONAL DATABASES
      TRANSACTIONS
TRANSACTIONS
    ‘UNIT OF WORK PERFORMED WITHIN A DATABASE
               MANAGEMENT SYSTEM’

• A transaction is a unit of work
• Treated independently of each other
TRANSACTIONS
       ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’



• In a relational database each transaction must have
  ACID properties
• Proposed in 1970s
• Key idea in relational databases

•   Atomicity
•   Consistency
•   Isolation
•   Durability

• A transaction need to reach these 4 goals to be reliable
TRANSACTIONS
‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’



• Atomicity
  • All or Nothing
  • both pay for and reserve a seat; OR neither pay for nor
    reserve a seat.
• Consistency
  • Only ever writes valid data
• Isolation
  • Transactions will not interfere with each other
• Durability
  • Once a transaction is complete it will always remain. Even
    in the event of a powerloss
TRANSACTIONS
    ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’




• Sometimes we can’t use ACID
• CAP THEORY
• A theory by Eric Brewer in 2000

It is only possible to have 2 of the following in a
distributed computer system

• Consistency
• Availability
• Partition Tolerance
TRANSACTIONS
‘UNIT OF WORK PERFORMED WITHIN A DATABASE
           MANAGEMENT SYSTEM’

• Consistency
All the nodes in the distributed system have the same
system
• Availability
A guarantee that every requests get a response
(even if it fails)
• Partition tolerance
If a node fails then the whole system will continue to
operate
TRANSACTIONS
 ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT
                         SYSTEM’

 • So what do large companies/distributed computer
   systems do?
 • Use alternatives to ACID
 • Most popular alternative to ACID is BASE

 • Basic Availability
 • Soft State
 • Eventual Consistency

 For when it’s OK to use stale data, and it’s OK to give
 approximate answers.
http://www.cs.berkeley.edu/~brewer/cs262b-2004/PODC-keynote.pdf
TRANSACTIONS
‘UNIT OF WORK PERFORMED WITHIN A DATABASE
           MANAGEMENT SYSTEM’

• Basically Available
  • Availability is achieved through multiple data stores rather
    than one fault tolerant system
• Soft state
  • Consistency is abandoned, or at least is the problem of the
    application and not the database
• Eventual Consistency
  • At some point in the future data will converge so that data
    on nodes is in a consistent state
RELATIONAL
DATABASES: ODBC
OPEN DATABASE CONNECTIVITY
RELATIONAL DATABASES: ODBC
             OPEN DATABASE CONNECTIVITY
    • Standard database access method
    • SQL Access group
    • Independent of database system




http://shivasoft.in/blog/microsoft/csharp/what-is-odbc-and-oledb-interview-
question/
RELATIONAL DATABASES:
                TRIGGERS
• SQL statement or SET of statements fired when an event
  occurs. (for example INSERT, UPDATE and DELETE)

CREATE
  TRIGGER `event_name` BEFORE/AFTER
INSERT/UPDATE/DELETE
  ON `database`.`table`
  FOR EACH ROW BEGIN
           -- trigger body
           -- this code is applied to every
           -- inserted/updated/deleted row
  END;

http://www.sitepoint.com/how-to-create-mysql-triggers/
DATABASE INDEX

     •   improves the speed of data retrieval operations
     •   Stops searching through each row one by one
     •   Created on columns
     •   Most Common
         • B-tree (MySQL default?)
         • Hash




Really good -> http://20bits.com/article/interview-questions-database-indexes

         http://dev.mysql.com/doc/refman/5.5/en/index-btree-hash.html
B TREE INDEXING

• B-Tree
• Stores data in logical way
• We want people younger than 13.. Look left
INDEXS

 • Hash Tables
 • Speeds up = or <=>
 • Not > or <




B-tree vs Hash Tables
http://dev.mysql.com/doc/refman/5.5/en/index-btree-hash.html
WEBSERVICE
WEBSERVICE

• A way to communicate between systems (machine
  to machine interaction)
• Service Provider
• Service Requester
WEB SERVICES

•   3 types of nodes
•   Registries (Service Broker)
•   Providers
•   Requesters
XML

   • XML:
   • EXtensible Markup Language
   • Designed to store and transport data
      • (whereas html was designed to display data)




http://www.w3schools.com/xml/xml_whatis.asp
WEB SERVICES
                  ADVANTAGES
• Advantages
 • Work outside of private networks
 • Interoperability
 • Could be the content processing/logic module in Three-tier
   architecture?
WEB SERVICES
               DISADVANTAGES
• Availability?
• Based in a stateless (unreliable?) protocol :http
• Security?
NOSQL
NOSQL

• Not Only SQL
• Databases that are not like relational database
  management systems
• Not built around the idea of tables
• Not likely to use SQL
• Usually built around BASE style principles (not ACID)
• Examples : Graph Databases
GRAPH DATABASE

• Every Element has a pointer to another element
TRIPLE STORE

• Similar to Graph Data
• Built to store and retrieve triples (David eats
  chocolate bars, Mars is a chocolate bar, etc etc)
• Data is stored in a standardized way (such as
  RDF/XML)
• Has a querying service (sparql)
LINKED DATA

• Method of publishing structured data
• Different datasets can be interlinked
• Built on the following technologies
  • URI’s
  • HTTP
  • Structured formats RDF/XML

• Sometimes this data is stored in triplestores
• Served by website (content negotiation)
  • Like prod.cetis.ac.uk
  • Could have a relational database behind it

• Example: dbpedia
LINKED DATA

•   Linked Data is made up of triples!
•   Subject, predicate object
•   David -> eats -> cake
•   David (Subject) Eats (Predicate) Cake
DATA JOURNALISM

• Explosion of visual analytic tools
  • Gephi
  • Visualise a network/graph
• Visually Identify complex patterns / markets

Mais conteúdo relacionado

Mais procurados

No sql or Not only SQL
No sql or Not only SQLNo sql or Not only SQL
No sql or Not only SQLAjay Jha
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
Mongo db groundup-0-nosql-intro-syedawasekhirni
Mongo db groundup-0-nosql-intro-syedawasekhirniMongo db groundup-0-nosql-intro-syedawasekhirni
Mongo db groundup-0-nosql-intro-syedawasekhirniDr. Awase Khirni Syed
 
SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2Davide Mauri
 
Mongo db model relationships with documents
Mongo db model relationships with documentsMongo db model relationships with documents
Mongo db model relationships with documentsDr. Awase Khirni Syed
 
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...MediaMongrels Ltd
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server DatabasesColdFusionConference
 
A lap around microsofts business intelligence platform
A lap around microsofts business intelligence platformA lap around microsofts business intelligence platform
A lap around microsofts business intelligence platformIke Ellis
 
SilverStripe From a Developer's Perspective
SilverStripe From a Developer's PerspectiveSilverStripe From a Developer's Perspective
SilverStripe From a Developer's Perspectiveajshort
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsPushkar Chivate
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityIvan Zoratti
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDBIke Ellis
 
Data Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDCData Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDCAbhijit Kumar
 

Mais procurados (20)

No sql or Not only SQL
No sql or Not only SQLNo sql or Not only SQL
No sql or Not only SQL
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Mongo db groundup-0-nosql-intro-syedawasekhirni
Mongo db groundup-0-nosql-intro-syedawasekhirniMongo db groundup-0-nosql-intro-syedawasekhirni
Mongo db groundup-0-nosql-intro-syedawasekhirni
 
Inventor Content Center: Adding Information
Inventor Content Center:   Adding InformationInventor Content Center:   Adding Information
Inventor Content Center: Adding Information
 
Drop acid
Drop acidDrop acid
Drop acid
 
No sql databases
No sql databasesNo sql databases
No sql databases
 
Hpts 2011 flexible_oltp
Hpts 2011 flexible_oltpHpts 2011 flexible_oltp
Hpts 2011 flexible_oltp
 
SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2
 
Mongo db model relationships with documents
Mongo db model relationships with documentsMongo db model relationships with documents
Mongo db model relationships with documents
 
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
Efficient working with Databases in LabVIEW - Sam Sharp (MediaMongrels Ltd) -...
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
Sql implementations
Sql implementationsSql implementations
Sql implementations
 
A lap around microsofts business intelligence platform
A lap around microsofts business intelligence platformA lap around microsofts business intelligence platform
A lap around microsofts business intelligence platform
 
SilverStripe From a Developer's Perspective
SilverStripe From a Developer's PerspectiveSilverStripe From a Developer's Perspective
SilverStripe From a Developer's Perspective
 
In Memory Cahce Structure
In Memory Cahce StructureIn Memory Cahce Structure
In Memory Cahce Structure
 
SPA vs. MPA
SPA vs. MPASPA vs. MPA
SPA vs. MPA
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
 
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More FlexibilityNOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Data Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDCData Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDC
 

Semelhante a Revision

UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxRahul Borate
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxRahul Borate
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLRichard Schneeman
 
Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Gavin Heavyside
 
Oracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureOracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureArthur Gimpel
 
Database and Java Database Connectivity
Database and Java Database ConnectivityDatabase and Java Database Connectivity
Database and Java Database ConnectivityGary Yeh
 
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
SQL, NoSQL, Distributed SQL: Choose your DataStore carefullySQL, NoSQL, Distributed SQL: Choose your DataStore carefully
SQL, NoSQL, Distributed SQL: Choose your DataStore carefullyMd Kamaruzzaman
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Managementsameerfaizan
 
high performance databases
high performance databaseshigh performance databases
high performance databasesmahdi_92
 
Colorado Springs Open Source Hadoop/MySQL
Colorado Springs Open Source Hadoop/MySQL Colorado Springs Open Source Hadoop/MySQL
Colorado Springs Open Source Hadoop/MySQL David Smelker
 
Cassandra an overview
Cassandra an overviewCassandra an overview
Cassandra an overviewPritamKathar
 
History of database processing module 1 (2)
History of database processing module 1 (2)History of database processing module 1 (2)
History of database processing module 1 (2)chottu89
 

Semelhante a Revision (20)

UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
 
Database Technologies
Database TechnologiesDatabase Technologies
Database Technologies
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011
 
Oracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureOracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data Architecture
 
NoSql
NoSqlNoSql
NoSql
 
Nosql data models
Nosql data modelsNosql data models
Nosql data models
 
Database and Java Database Connectivity
Database and Java Database ConnectivityDatabase and Java Database Connectivity
Database and Java Database Connectivity
 
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
SQL, NoSQL, Distributed SQL: Choose your DataStore carefullySQL, NoSQL, Distributed SQL: Choose your DataStore carefully
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
high performance databases
high performance databaseshigh performance databases
high performance databases
 
Colorado Springs Open Source Hadoop/MySQL
Colorado Springs Open Source Hadoop/MySQL Colorado Springs Open Source Hadoop/MySQL
Colorado Springs Open Source Hadoop/MySQL
 
NoSql Brownbag
NoSql BrownbagNoSql Brownbag
NoSql Brownbag
 
Cassandra an overview
Cassandra an overviewCassandra an overview
Cassandra an overview
 
No SQL
No SQLNo SQL
No SQL
 
BigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearchBigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearch
 
History of database processing module 1 (2)
History of database processing module 1 (2)History of database processing module 1 (2)
History of database processing module 1 (2)
 

Mais de David Sherlock

Mais de David Sherlock (6)

PhD Help Day
PhD Help DayPhD Help Day
PhD Help Day
 
Agent Based Models
Agent Based ModelsAgent Based Models
Agent Based Models
 
Exploring linked data in r
Exploring linked data in rExploring linked data in r
Exploring linked data in r
 
Flashtalk david
Flashtalk davidFlashtalk david
Flashtalk david
 
Week6
Week6Week6
Week6
 
Week3 adb
Week3 adbWeek3 adb
Week3 adb
 

Último

Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 

Último (20)

Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 

Revision

  • 1. ADVANCED DATABASES REVISION 1
  • 2. REVISION TACTICS • Watch the videos from emails and moodle • Take notes • Follow these slides • Visit the web resources • Learn the keywords and concepts • Learn SQL • Use Cmap tools to link concepts /t erms • Revisit your patchwork
  • 3. THE BUILDING BLOCKS TERMS AND CONCEPTS YOU SHOULD KNOW BY NOW… • XML • NoSQL • Graph • ODBC • Relational Database • MySQL • SQL • Linked Data • RDF • Trigger • Database Index
  • 4. REVISION TOOL: CMAP TOOLS • http://cmap.ihmc.us/download/ • Tool for creating concept maps
  • 5. TOPICS • Relational Databases (MySQL) • SQL • Triggers • Transactions • Webservices • XML • NoSQL / Alternative Database systems
  • 7. RELATIONAL DATABASES ‘FORMALLY DESCRIBED TABLES’ • This module focused on MySQL: an Open source implementation of a relational database • Oracle, PostgreSQL, SQLite • Most patchworks should be done in MySQL (Triggers, indexs) • ODBC Component • Looked at alternatives: NoSQL (Not Only SQL), Graph Database, triplestore
  • 8. RELATIONAL DATABASES: SQL (STRUCTURED QUERY LANGUAGE) • Language to manage data in relational management systems • Should be examples in your patchwork CREATE TABLE example_autoincrement ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, data VARCHAR(100) );
  • 9. RELATIONAL DATABASES TRANSACTIONS
  • 10. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • A transaction is a unit of work • Treated independently of each other
  • 11. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • In a relational database each transaction must have ACID properties • Proposed in 1970s • Key idea in relational databases • Atomicity • Consistency • Isolation • Durability • A transaction need to reach these 4 goals to be reliable
  • 12. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • Atomicity • All or Nothing • both pay for and reserve a seat; OR neither pay for nor reserve a seat. • Consistency • Only ever writes valid data • Isolation • Transactions will not interfere with each other • Durability • Once a transaction is complete it will always remain. Even in the event of a powerloss
  • 13. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • Sometimes we can’t use ACID • CAP THEORY • A theory by Eric Brewer in 2000 It is only possible to have 2 of the following in a distributed computer system • Consistency • Availability • Partition Tolerance
  • 14. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • Consistency All the nodes in the distributed system have the same system • Availability A guarantee that every requests get a response (even if it fails) • Partition tolerance If a node fails then the whole system will continue to operate
  • 15. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • So what do large companies/distributed computer systems do? • Use alternatives to ACID • Most popular alternative to ACID is BASE • Basic Availability • Soft State • Eventual Consistency For when it’s OK to use stale data, and it’s OK to give approximate answers. http://www.cs.berkeley.edu/~brewer/cs262b-2004/PODC-keynote.pdf
  • 16. TRANSACTIONS ‘UNIT OF WORK PERFORMED WITHIN A DATABASE MANAGEMENT SYSTEM’ • Basically Available • Availability is achieved through multiple data stores rather than one fault tolerant system • Soft state • Consistency is abandoned, or at least is the problem of the application and not the database • Eventual Consistency • At some point in the future data will converge so that data on nodes is in a consistent state
  • 18. RELATIONAL DATABASES: ODBC OPEN DATABASE CONNECTIVITY • Standard database access method • SQL Access group • Independent of database system http://shivasoft.in/blog/microsoft/csharp/what-is-odbc-and-oledb-interview- question/
  • 19. RELATIONAL DATABASES: TRIGGERS • SQL statement or SET of statements fired when an event occurs. (for example INSERT, UPDATE and DELETE) CREATE TRIGGER `event_name` BEFORE/AFTER INSERT/UPDATE/DELETE ON `database`.`table` FOR EACH ROW BEGIN -- trigger body -- this code is applied to every -- inserted/updated/deleted row END; http://www.sitepoint.com/how-to-create-mysql-triggers/
  • 20. DATABASE INDEX • improves the speed of data retrieval operations • Stops searching through each row one by one • Created on columns • Most Common • B-tree (MySQL default?) • Hash Really good -> http://20bits.com/article/interview-questions-database-indexes http://dev.mysql.com/doc/refman/5.5/en/index-btree-hash.html
  • 21. B TREE INDEXING • B-Tree • Stores data in logical way • We want people younger than 13.. Look left
  • 22. INDEXS • Hash Tables • Speeds up = or <=> • Not > or < B-tree vs Hash Tables http://dev.mysql.com/doc/refman/5.5/en/index-btree-hash.html
  • 24. WEBSERVICE • A way to communicate between systems (machine to machine interaction) • Service Provider • Service Requester
  • 25. WEB SERVICES • 3 types of nodes • Registries (Service Broker) • Providers • Requesters
  • 26. XML • XML: • EXtensible Markup Language • Designed to store and transport data • (whereas html was designed to display data) http://www.w3schools.com/xml/xml_whatis.asp
  • 27. WEB SERVICES ADVANTAGES • Advantages • Work outside of private networks • Interoperability • Could be the content processing/logic module in Three-tier architecture?
  • 28. WEB SERVICES DISADVANTAGES • Availability? • Based in a stateless (unreliable?) protocol :http • Security?
  • 29. NOSQL
  • 30. NOSQL • Not Only SQL • Databases that are not like relational database management systems • Not built around the idea of tables • Not likely to use SQL • Usually built around BASE style principles (not ACID) • Examples : Graph Databases
  • 31. GRAPH DATABASE • Every Element has a pointer to another element
  • 32. TRIPLE STORE • Similar to Graph Data • Built to store and retrieve triples (David eats chocolate bars, Mars is a chocolate bar, etc etc) • Data is stored in a standardized way (such as RDF/XML) • Has a querying service (sparql)
  • 33. LINKED DATA • Method of publishing structured data • Different datasets can be interlinked • Built on the following technologies • URI’s • HTTP • Structured formats RDF/XML • Sometimes this data is stored in triplestores • Served by website (content negotiation) • Like prod.cetis.ac.uk • Could have a relational database behind it • Example: dbpedia
  • 34. LINKED DATA • Linked Data is made up of triples! • Subject, predicate object • David -> eats -> cake • David (Subject) Eats (Predicate) Cake
  • 35. DATA JOURNALISM • Explosion of visual analytic tools • Gephi • Visualise a network/graph • Visually Identify complex patterns / markets