SlideShare uma empresa Scribd logo
1 de 20
Árvore B+
Equipe
João Gabriel
Pericles Narbal
Suzane Souto
Rodrigo Cândido
O que é?
● Consiste numa variante da árvore B
que,como sugere o nome, apresenta
vantagens em relação à estrutura original.
Árvore
● Registro ou Chave.
● A organização das páginas internas ou no
inglês index set é semelhante a de uma árvore
B(chaves, ponteiros e um contador de chaves),
este, por sua vez, armazena cópias de chaves
para referênciar as buscas, mas não contém
as chaves em si.
● No sequence set estão as páginas folha que
contém as chaves inseridas na árvore e
funciona como uma lista encadeada
permitindo o acesso sequencial ordenado às
chaves independente do index set.
Definição
Página Interna
ou
Index Set
● Funcionam como um índice que apenas
apontam para a localização exata de uma
chave e sua construção é semelhante ao de
uma árvore B com número mínimo de chaves
igual a ⌈n/2⌉-1 e máximo de n-1 por página.
● Estão abrigadas todas as chaves inseridas e
durante o processo de inserção e remoção de
chaves, estas podem sofrer overflows ou
underflows conforme estas violem o número
máximo igual a n-1 ou mínimo igual a ⌈n/2⌉-1
permitido de chaves.
Página Folha
ou
Sequence Set
Estrutura
● Todas as folhas aparecem no mesmo
nível.
● Uma página não folha com K filhos
contem K-1 chaves.
Árvore B+ de ordem 3
● Nas árvores B+ os registros completos
são armazenados exclusivamente nas
folhas.
● Os nós não terminais atuam como índices
de acesso aos dados contidos nos nós
terminais.
Características
Resumo
● Uma árvore B+ é uma árvore B em que
os registros de dados são mantidos nos
nós folhas e os nós não terminais
constituem somente chaves que servem
como índices de acesso aos dados.
● Mantém a eficiência da busca e da
inserção da árvore B.
● Aumenta a eficiência da localização do
próximo registro na árvore de O(log2n)
para O(1).
● Não é preciso manter nenhum ponteiro de
registro em nós não-folha.
● As árvores B+ apresentam menor
profundidade que as árvores B com
mesmos dados, pois nas B+ há aumento
do número de entradas mantidas por nó.
Vantagens
Utilização
● Muitos bancos de dados são construídos
usando o mecanismo de árvore B+: SQL
Server e Oracle
● Sistemas de arquivos como o NTFS
para o Microsoft Windows, o sistema de
ficheiros ReiserFS para Unix, o XFS
para IRIX e Linux, e o JFS2 para AIX,
OS/2 e Linux, usam este tipo de árvore.
Busca
● Linear ou Binária
● Pela raiz ou “sequence set”
Inserção
A operação de inserção consiste em 4
passos:
1. Localizar a folha dentro da qual a chave
deve ser inserida;
1. Localizar a posição de inserção dentro
da folha;
1. Inserir a chave;
1. E se, após a inserção, a folha estiver
completa, realizar a cisão (divisão) da
página.
Exclusão
A operação de exclusão consiste em:
1. Localizar a folha onde a chave deverá
ser deletada;
1. Localizar a posição da chave dentro da
folha;
1. Deletar chave;
1. Concatenar ou redistribuir as chaves na
folha; (se a chave aparecer também nos
índices)
Exclusão
Caso 1:
A chave aparece em apenas um nó.
A chave é simplesmente excluída e a folha é
reorganizada.
No caso do nó ficar com menos chaves do
que o permitido, haverá uma concatenação
índice atual com o índice imediatamente
anterior e o reagrupamento dos valores.
Exclusão
Caso 2:
A chave também aparece nos índices.
A chave é excluída e o índice de igual valor
é substituído pela chave de maior valor da
folha, se o número de chaves restantes no
nó respeitar o limite mínimo.
No caso do nó ficar com menos chaves do
que o permitido, haverá uma concatenação
índice atual com o índice imediatamente
anterior e o reagrupamento dos valores.
Exclusão
Exclusão
Exclusão

Mais conteúdo relacionado

Destaque

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Destaque (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

árvore b+

  • 3. O que é? ● Consiste numa variante da árvore B que,como sugere o nome, apresenta vantagens em relação à estrutura original.
  • 5. ● A organização das páginas internas ou no inglês index set é semelhante a de uma árvore B(chaves, ponteiros e um contador de chaves), este, por sua vez, armazena cópias de chaves para referênciar as buscas, mas não contém as chaves em si. ● No sequence set estão as páginas folha que contém as chaves inseridas na árvore e funciona como uma lista encadeada permitindo o acesso sequencial ordenado às chaves independente do index set. Definição
  • 6. Página Interna ou Index Set ● Funcionam como um índice que apenas apontam para a localização exata de uma chave e sua construção é semelhante ao de uma árvore B com número mínimo de chaves igual a ⌈n/2⌉-1 e máximo de n-1 por página.
  • 7. ● Estão abrigadas todas as chaves inseridas e durante o processo de inserção e remoção de chaves, estas podem sofrer overflows ou underflows conforme estas violem o número máximo igual a n-1 ou mínimo igual a ⌈n/2⌉-1 permitido de chaves. Página Folha ou Sequence Set
  • 8. Estrutura ● Todas as folhas aparecem no mesmo nível. ● Uma página não folha com K filhos contem K-1 chaves. Árvore B+ de ordem 3
  • 9. ● Nas árvores B+ os registros completos são armazenados exclusivamente nas folhas. ● Os nós não terminais atuam como índices de acesso aos dados contidos nos nós terminais. Características
  • 10. Resumo ● Uma árvore B+ é uma árvore B em que os registros de dados são mantidos nos nós folhas e os nós não terminais constituem somente chaves que servem como índices de acesso aos dados.
  • 11. ● Mantém a eficiência da busca e da inserção da árvore B. ● Aumenta a eficiência da localização do próximo registro na árvore de O(log2n) para O(1). ● Não é preciso manter nenhum ponteiro de registro em nós não-folha. ● As árvores B+ apresentam menor profundidade que as árvores B com mesmos dados, pois nas B+ há aumento do número de entradas mantidas por nó. Vantagens
  • 12. Utilização ● Muitos bancos de dados são construídos usando o mecanismo de árvore B+: SQL Server e Oracle ● Sistemas de arquivos como o NTFS para o Microsoft Windows, o sistema de ficheiros ReiserFS para Unix, o XFS para IRIX e Linux, e o JFS2 para AIX, OS/2 e Linux, usam este tipo de árvore.
  • 13. Busca ● Linear ou Binária ● Pela raiz ou “sequence set”
  • 14. Inserção A operação de inserção consiste em 4 passos: 1. Localizar a folha dentro da qual a chave deve ser inserida; 1. Localizar a posição de inserção dentro da folha; 1. Inserir a chave; 1. E se, após a inserção, a folha estiver completa, realizar a cisão (divisão) da página.
  • 15. Exclusão A operação de exclusão consiste em: 1. Localizar a folha onde a chave deverá ser deletada; 1. Localizar a posição da chave dentro da folha; 1. Deletar chave; 1. Concatenar ou redistribuir as chaves na folha; (se a chave aparecer também nos índices)
  • 16. Exclusão Caso 1: A chave aparece em apenas um nó. A chave é simplesmente excluída e a folha é reorganizada. No caso do nó ficar com menos chaves do que o permitido, haverá uma concatenação índice atual com o índice imediatamente anterior e o reagrupamento dos valores.
  • 17. Exclusão Caso 2: A chave também aparece nos índices. A chave é excluída e o índice de igual valor é substituído pela chave de maior valor da folha, se o número de chaves restantes no nó respeitar o limite mínimo. No caso do nó ficar com menos chaves do que o permitido, haverá uma concatenação índice atual com o índice imediatamente anterior e o reagrupamento dos valores.