Login   Register  
PHP Classes
elePHPant
Icontem

Closure Table: Manage transitive closure tables stored in MySQL

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (34)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-08-02 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 759 This week: 3All time: 4,065 This week: 611Up
Version License PHP version Categories  
closuretable 0.1The PHP License5.0PHP 5, Databases, Data types
Description Author  

This package can be used to manage transitive closure tables (TCT) stored in a MySQL database.

It can create MySQL database tables that will store information about hierarchies of nodes stored in other database tables.

Different classes can organize nodes hierarchically by weight and depth. They can insert, delete, retrieve and sort nodes.

Innovation Award  
PHP Programming Innovation award nominee
July 2009
Number 8


Prize: One book of choice by Manning
Databases are often used to store records of information that are related in ways that form hierarchic trees and other types of graphs.

There are solutions to manipulate sets records that form these types of graph, like the Joe Celko's nested sets.

However, such solutions require that you have additional fields in the records to store information about the graph structures.

Using closure tables is a different approach that consists in using separate tables to store graph structural information.

This class implements an API that manages closure tables in PHP. It can be used to manage graphs of records of information created by existing PHP applications without changing the code that manages the application table records.

Manuel Lemos
Picture of Tom Schaefer
Name: Tom Schaefer is available for providing paid consulting. Contact Tom Schaefer .
Classes: 39 packages by
Country: Germany Germany
Age: ???
All time rank: 1109 in Germany Germany
Week rank: 100 Up4 in Germany Germany Up
Innovation award
Innovation award
Nominee: 9x

Winner: 1x

Screenshots  
  • sample.png
  Files folder image Files  
File Role Description
Files folder imageimg (11 files)
Files folder imageDb (10 files)
Files folder imageTool (1 file, 2 directories)
Files folder imagesamples (1 file, 1 directory)
Accessible without login Plain text file index.php Aux. load classes
Accessible without login Plain text file Readme.txt Doc. Readme
Accessible without login Plain text file sample.sql Data sample db layout

  Files folder image Files  /  img  
File Role Description
  Accessible without login Image file node_delete.png Icon delete
  Accessible without login Image file node_delete_tree.png Icon delete tree
  Accessible without login Image file node_delete_tree_gray.png Icon delete tree unselect
  Accessible without login Image file node_move_down.png Icon move down
  Accessible without login Image file node_move_down_gray.png Icon move down unselect
  Accessible without login Image file node_move_left.png Icon move left
  Accessible without login Image file node_move_left_gray.png Icon move left unselect
  Accessible without login Image file node_move_right.png Icon move right
  Accessible without login Image file node_move_right_unselect.png Icon move right unselect
  Accessible without login Image file node_move_up.png Icon move up
  Accessible without login Image file node_move_up_gray.png Icon move up unselect

  Files folder image Files  /  Db  
File Role Description
  Plain text file ClosureTable.php Class Closure Table Wrapper
  Plain text file ClosureTableBase.php Class Closure Table Base
  Plain text file ClosureTableCreate.php Class Create Table Class
  Plain text file ClosureTableDelete.php Class Closure Table Delete
  Plain text file ClosureTableInsert.php Class Closure Table Insert
  Plain text file ClosureTableInterface.php Class interface for db class
  Plain text file ClosureTableRetrieve.php Class Closure Retrieve Data
  Plain text file ClosureTableSort.php Class Various Tree Sort Operations
  Plain text file Db.php Class Sample Db Adapter - very basic
  Accessible without login Plain text file index.php Aux. autoloader

  Files folder image Files  /  Tool  
File Role Description
Files folder imageClosureTable (2 files)
Files folder imageView (3 files)
  Accessible without login Plain text file index.php Aux. autoloader

  Files folder image Files  /  Tool  /  ClosureTable  
File Role Description
  Accessible without login Plain text file index.php Aux. autoloader
  Plain text file TreeAdmin.php Class Demo Helper Tool for visualizing a ul-tree

  Files folder image Files  /  Tool  /  View  
File Role Description
  Plain text file Href.php Class View Link Href Builder
  Accessible without login Plain text file index.php Aux. autoloader
  Plain text file Link.php Class View Link Builder

  Files folder image Files  /  samples  
File Role Description
Files folder imageClosureTable (3 files)
  Accessible without login Plain text file config.inc.php Conf. main config

  Files folder image Files  /  samples  /  ClosureTable  
File Role Description
  Accessible without login Plain text file config.inc.php Conf. config sample
  Accessible without login Plain text file index.php Example sample
  Accessible without login Plain text file server.php Example sample

 Version Control Unique User Downloads Download Rankings  
 0%Total:759All time:4,065
 This week:3This week:611Up
 User Comments (1)  
 
class doesn't work.
3 years ago (Chris Novoa)
50%StarStarStar