Oliver Kennedy 2019-01-19 18:15:21 -05:00
commit 7b2599df3b
3930 changed files with 2442222 additions and 0 deletions

11
Documents/Makefile Normal file
View File

@ -0,0 +1,11 @@
all:
latex manual
bibtex manual
latex manual
latex manual
dvipdf manual
clean:
rm -f manual.ps manual.dvi manual.log manual.aux manual.blg
rm -f manual.bbl manual.out manual.pdf manual.toc

827
Documents/bibtex.bib Normal file
View File

@ -0,0 +1,827 @@
@inproceedings(GGH1998,
author = {Erich Gr\"adel and Yuri Gurevich and Colin Hirsch},
title = "{``The Complexity of Query Reliability''}",
booktitle = {Proc.\ PODS},
year = 1998,
pages = {227--234}
)
@inproceedings(SD2007,
author = {Prithviraj Sen and Amol Deshpande},
title = "{``Representing and Querying Correlated Tuples in
Probabilistic Databases''}",
booktitle = {Proc.\ ICDE},
year = 2007,
pages = {596--605}
)
@inproceedings(Koch2008,
author = {Christoph Koch},
title = "{``Approximating Predicates and
Expressive Queries on Probabilistic Databases''}",
booktitle = {Proc.\ PODS},
year = 2008
)
@incollection(KochBook2008,
author = {Christoph Koch},
title = "{``MayBMS: A System for Managing Large Uncertain and Probabilistic Databases''}",
chapter = 6,
editor = {Charu Aggarwal},
booktitle = {Managing and Mining Uncertain Data},
publisher = {Springer-Verlag},
year = 2008
)
@article(DP1960,
author = {Martin Davis and Hillary Putnam},
title = "{``A Computing Procedure for Quantification Theory''}",
journal = {Journal of ACM},
volume = {{\bf 7}},
number = 3,
pages = {201--215},
year = 1960
)
@article(Bat1979,
author = {Don S. Batory},
title = "{``On Searching Transposed Files''}",
journal = tods,
volume = {{\bf 4}},
number = 4,
pages = {531--544},
year = 1979
)
@inproceedings(SAB+2005,
author = {Michael Stonebraker and Daniel J. Abadi and Adam Batkin and
Xuedong Chen and Mitch Cherniack and Miguel Ferreira and
Edmond Lau and Amerson Lin and Samuel Madden and
Elizabeth J. O'Neil and Patrick E. O'Neil and Alex Rasin
and Nga Tran and Stanley B. Zdonik},
title = "{``C-Store: A Column-oriented DBMS''}",
booktitle = {Proc.\ VLDB},
year = 2005,
pages = {553--564}
)
@article(IL1984,
author = {T. Imielinski and W. Lipski},
title = "{``Incomplete information in relational databases''}",
journal = {Journal of ACM},
volume = {{\bf 31}},
number = 4,
year = 1984,
pages = {761--791}
)
@inproceedings(Wachter:Multistate:2007,
author = {Michael Wachter and Rolf Haenni},
title = "{``Multi-state Directed Acyclic Graphs''}",
booktitle = {Proc.\ Canadian {AI}},
OPTaddress = {Denver, Colorado},
year = 2007,
pages = {464--475}
)
@article(Birnbaum:DP:1999,
author = {Elazar Birnbaum and Eliezer Lozinskii},
title = "{``The Good Old Davis-Putnam Procedure Helps Counting Models''}",
journal = {Journal of AI Research},
volume = {{\bf 10}},
number = 6,
year = 1999,
pages = {457--477}
)
@inproceedings(INV1991,
author = {T. Imielinski and S. Naqvi and K. Vadaparty},
title = "{``Incomplete objects --- a data model for design and planning
applications''}",
booktitle = {Proc.\ SIGMOD},
OPTaddress = {Denver, Colorado},
year = 1991,
pages = {288--297}
)
@inproceedings(ASV2001,
author = "Serge Abiteboul and Luc Segoufin and Victor Vianu",
title = "{``Representing and Querying {XML} with
Incomplete Information''}",
booktitle = "Proc.\ PODS",
year = "2001"
)
@article(AKG1991,
author = {Serge Abiteboul and Paris Kanellakis and G\"osta Grahne},
title = "{``On the Representation and Querying of Sets of
Possible Worlds''}",
journal = {Theor.\ Comput.\ Sci.},
volume = {{\bf 78}},
number = 1,
pages = "158-187",
year = "1991"
)
@inproceedings(Gra1984,
author = {G\"osta Grahne},
title = "{``Dependency Satisfaction in Databases with
Incomplete Information''}",
booktitle = {Proc.\ VLDB},
year = 1984,
pages = {37--45}
)
@book(Gra1991,
author = {G\"osta Grahne},
title = "{The Problem of Incomplete Information in Relational Databases}",
publisher = {Springer-Verlag},
series = {LNCS},
number = 554,
year = 1991
)
@inproceedings(LW1993,
author = "Leonid Libkin and Limsoon Wong",
title = "{``Semantic Representations and Query Languages for {OR}-Sets''}",
booktitle = {Proc.\ PODS},
pages = "37--48",
year = "1993"
)
@book(AHV95,
author = {Serge Abiteboul and Richard Hull and Victor Vianu},
title = "{Foundations of Databases}",
year = 1995,
publisher = "Addison-Wesley"
)
% ancestor paper on the chase, see also MMS79
@article(ABU79,
author = {Alfred V. Aho and Catriel Beeri and Jeffrey D. Ullman},
title = "{``The Theory of Joins in Relational Databases''}",
journal = tods,
volume = {{\bf 4}},
number = 3,
pages = {297--314},
year = 1979
)
% original articulation of the chase (after ABU79)
@article(MMS79,
author = {David Maier and Alberto O. Mendelzon and Yehoshua Sagiv},
title = "{``Testing Implications of Data Dependencies''}",
journal = tods,
volume = {{\bf 4}},
number = 4,
pages = {455--469},
year = 1979
)
@article(RD2000,
author = {Erhard Rahm and Hong Hai Do},
title = "{``Erhard Data Cleaning: Problems and Current Approaches''}",
journal = {IEEE Data Engineering Bulletin},
year = 2000
)
@inproceedings(GFSS2000,
title = "{``AJAX: An Extensible Data Cleaning Tool''}",
author = {H. Galhardas and D. Florescu and D. Shasha and E Simon},
booktitle = {Proc.\ SIGMOD},
year = 2000
)
@inproceedings(RH2001,
title = "{``Potter's Wheel: An Interactive Data Cleaning System''}",
author = {V. Raman and J.M. Hellerstein},
booktitle = {Proc.\ VLDB},
year = 2001
)
@inproceedings(CGGM2003,
title = "{``Robust and Efficient Fuzzy Match for Online Data Cleaning''}",
author = {S. Chaudhuri and K. Ganjam and V. Ganti and R. Motwani},
booktitle = {Proc.\ SIGMOD},
year = 2003
)
@inproceedings(Koch2005a,
title = "{``On the Complexity of Nonrecursive XQuery and Functional Query Languages on Complex Values''}",
author = {Christoph Koch},
booktitle = {Proc.\ PODS},
year = 2005
)
@inproceedings(INFOMIX,
author = {Nicola Leone and Gianluigi Greco and Giovambattista Ianni and
Vincenzino Lio and Giorgio Terracina and Thomas Eiter and
Wolfgang Faber and Michael Fink and Georg Gottlob and
Riccardo Rosati and Domenico Lembo and Maurizio Lenzerini and
Marco Ruzzi and Edyta Kalka and Bartosz Nowicki and
Witold Staniszkis},
title = "{``The INFOMIX system for advanced integration of incomplete and inconsistent data''}",
booktitle = {Proc.\ SIGMOD},
year = 2005,
pages = {915--917}
)
@inproceedings(Koch2005b,
title = "{``On the Role of Composition in XQuery''}",
author = {Christoph Koch},
booktitle = {Proc.\ WebDB},
year = 2005
)
% introduction of the notions expression complexity and data complexity
@inproceedings(Var82,
author = {Moshe Y. Vardi},
title = "{``The Complexity of Relational Query Languages''}",
booktitle = {Proc.\ STOC},
pages = {137--146},
OPTaddress = {San Francisco, CA USA},
OPTmonth = may,
day = {5--7},
year = 1982
)
@inproceedings(ABC1999,
author = {Marcelo Arenas and Leopoldo E. Bertossi and Jan Chomicki},
title = "{``Consistent Query Answers in Inconsistent Databases''}",
booktitle = {Proc.\ PODS},
pages = {68--79},
year = 1999
)
@Misc{IPUMS,
author = {Steven Ruggles and Matthew Sobek and Trent Alexander and
Catherine A. Fitch and Ronald Goeken and
Patricia Kelly Hall and Miriam King and Chad Ronnander},
title = "{``Integrated Public Use Microdata Series: V3.0''}",
year = 2004,
OPTaddress = {Minneapolis MN USA},
OPTpublisher = {Minnesota Population Center},
OPTnote = {http://www.ipums.org}
}
@inproceedings(AD98,
author = {Serge Abiteboul and Oliver M. Duschka},
title = "{``Complexity of Answering Queries Using
Materialized Views''}",
booktitle = {Proc.\ PODS},
pages = {254--263},
year = 1998
)
@Article{PG1992,
author = {Jan Paredaens and Dirk Van Gucht},
title = "{``Converting nested algebra expressions into
flat algebra expressions''}",
pages = {65--93},
year = 1992,
journal = {{TODS}},
volume = {17},
number = {1}
}
@Article{RBG96,
author = {Sudhir Rao and Antonio Badia and Dirk Van Gucht},
title = "{``Providing better support for a class of decision support queries''}",
pages = {217--227},
year = 1996,
journal = {{SIGMOD} Record},
volume = {25},
number = {2}
}
@inproceedings{Rosa06c,
author = "Riccardo Rosati",
title = "{``On the decidability and finite controllability of query
processing in databases with incomplete information''}",
booktitle = { Proc.\ PODS},
year = 2006,
}
@inproceedings(CDLR2004,
author = {Diego Calvanese and Giuseppe De Giacomo and Maurizio Lenzerini
and Riccardo Rosati},
title = "{``Logical Foundations of Peer-To-Peer Data Integration''}",
booktitle = {PODS 2004},
pages = {241--251},
year = 2004
)
@inproceedings(BB2005,
author = {Leopoldo E. Bertossi and Loreto Bravo},
title = "{``Consistent Query Answers in
Virtual Data Integration Systems''}",
booktitle = {Inconsistency Tolerance},
year = 2005,
pages = {42--83}
)
@inproceedings(BBFL2005,
author = {Leopoldo E. Bertossi and Loreto Bravo and Enrico Franconi and
Andrei Lopatenko},
title = "{``Complexity and Approximation of Fixing Numerical Attributes
in Databases Under Integrity Constraints''}",
booktitle = {Proc.\ DBPL},
year = 2005,
pages = {262--278}
)
@article(ABC2003,
author = {Marcelo Arenas and Leopoldo E. Bertossi and Jan Chomicki},
title = "{``Answer sets for consistent query answering in
inconsistent databases''}",
journal = {TPLP},
volume = {{\bf 3}},
number = {4--5},
pages = {393--424},
year = 2003
)
@inproceedings(CMS2004,
author = {Jan Chomicki and Jerzy Marcinkowski and Slawomir Staworko},
title = "{``Computing consistent query answers using conflict
hypergraphs''}",
booktitle = {Proc.\ CIKM},
year = 2004,
pages = {417--426}
)
% axioms for inequalities: p.886
@book(Ull89,
author = {Jeffrey D. Ullman},
title = "{Principles of Database \& Knowledge-Base Systems Vol. 2:
The New Technologies}",
publisher = {Computer Science Press},
year = 1989
)
@inproceedings(BFFR2005,
author = {Philip Bohannon and Wenfei Fan and Michael Flaster and
Rajeev Rastogi},
title = "{``A Cost-Based Model and Effective Heuristic for
Repairing Constraints by Value Modification}",
booktitle = {Proc.\ SIGMOD},
month = jun,
year = 2005
)
@inproceedings(BFGJK2007,
author = {Philip Bohannon and Wenfei Fan and Floris Geerts and
Xibei Jia and Anastasios Kementsietsidis},
title = "{``Conditional Functional Dependencies for Data Cleaning''}",
booktitle = {Proc.\ ICDE},
year = 2007
)
@misc(medicinenet,
key = {MedicineNet},
title = {\textsf{http://www.medicinenet.com}}
)
@article(FKMP2005,
author = {Ronald Fagin and Phokion G. Kolaitis and Renee J. Miller and Lucian Popa},
title = "{``Data exchange: semantics and query answering''}",
journal = {Theoretical Computer Science},
volume = {{\bf 336}},
number = 1,
year = 2005,
pages = {89--124}
)
@inproceedings(GT2006,
author = {Todd J. Green and Val Tannen},
title = "{``Models for Incomplete and Probabilistic Information''}",
booktitle = {International Workshop on Incompleteness and
Inconsistency in Databases (IIDB)},
year = 2006
)
@article(BSHW2006,
author = {Omar Benjelloun and Anish Das Sarma and Chris Hayworth and Jennifer Widom},
title = "{``An Introduction to ULDBs and the Trio System''}",
journal = {{IEEE Data Engineering Bulletin}},
OPTvolume = {{\bf 336}},
OPTnumber = 1,
year = 2006,
OPTpages = {89--124}
)
@inproceedings(BDSHW2006,
author = {Omar Benjelloun and Anish Das Sarma and Alon Halevy and
Jennifer Widom},
title = "{``{ULDBs}: Databases with Uncertainty and Lineage''}",
booktitle = {Proc.\ VLDB},
year = 2006
)
@inproceedings(STW2008,
author = { Anish Das Sarma and Martin Theobald and Jennifer Widom},
title = "{``Exploiting Lineage for Confidence Computation in Uncertain and Probabilistic Databases''}",
booktitle = {Proc.\ ICDE},
year = 2008,
)
@MANUAL{triql2006,
organization = {{Stanford Trio Project}},
title = "{``TriQL -- The Trio Query Language''}",
year = {2006},
OPTedition = {Revision 2.6.0},
OPTnote = {http://infolab.stanford.edu/~widom/triql.html},
OPTannote = {}
}
@inproceedings(dalvi04efficient,
author = "Nilesh Dalvi and Dan Suciu",
title = "{``Efficient query evaluation on probabilistic databases''}",
booktitle = "Proc.\ VLDB",
pages = "864--875",
year = "2004"
)
@article(dalvi07efficient,
author = "Nilesh Dalvi and Dan Suciu",
title = "{``Efficient query evaluation on probabilistic databases''}",
journal = "VLDB Journal",
pages = "523--544",
volume = {{\bf 16}},
number = {4},
year = 2007
)
@inproceedings{RDS07,
author = {Christopher Re and
Nilesh Dalvi and
Dan Suciu},
title = {Efficient Top-k Query Evaluation on Probabilistic Data},
booktitle = "Proc.\ ICDE",
year = {2007},
pages = {886--895},
}
@inproceedings{suciu05mystiq,
author = {Jihad Boulos and
Nilesh Dalvi and
Bhushan Mandhani and
Shobhit Mathur and
Chris Re and
Dan Suciu},
title = {{MYSTIQ}: a system for finding more answers by using probabilities},
booktitle = {Proc.\ SIGMOD},
year = {2005},
pages = {891-893},
}
@inproceedings{miller06clean,
author = {Periklis Andritsos and Ariel Fuxman and Renee J. Miller},
title = "{``Clean Answers over Dirty Databases:
A Probabilistic Approach''}",
booktitle = {Proc.\ ICDE},
year = {2006},
OPTpages = {30},
}
@misc(GK2008,
author = {Michaela Goetz and Christoph Koch},
title = "{``A Compositional Framework
for Complex Queries over Uncertain Data''}",
note = {Under submission},
year = 2008
)
@techreport(Koch2008-SO,
author = {Christoph Koch},
title = "{``A Compositional Query Algebra for Second-Order Logic and
Uncertain Databases''}",
number = {arXiv:0807.4620},
year = 2008
)
@inproceedings(OHK2008,
author = {Dan Olteanu and Jiewen Huang and Christoph Koch},
title = "{``SPROUT: Lazy vs. Eager Query Plans for Tuple-Independent
Probabilistic Databases.''}",
booktitle = {Proc.\ ICDE},
year = 2009
)
@inproceedings(KO2008,
author = {Christoph Koch and Dan Olteanu},
title = "{``Conditioning Probabilistic Databases''}",
booktitle = {Proc.\ VLDB},
year = 2008
)
@article(OKA2008,
author = {Dan Olteanu and Christoph Koch and Lyublena Antova},
title = "{``World-set Decompositions: Expressiveness and
Efficient Algorithms''}",
journal = {Theoretical Computer Science},
volume = {{\bf 403}},
number = 23,
pages = {265--284},
year = 2008
)
@inproceedings(AK-MUD-2008,
author = {Lyublena Antova and Christoph Koch},
title = "{``On APIs for Probabilistic Databases''}",
booktitle = {Proc.\ 2nd International Workshop on Management of Uncertain Data},
address = {Auckland, New Zealand},
year = 2008
)
@inproceedings{AKO07WSD,
author = {Lyublena Antova and Christoph Koch and Dan Olteanu},
title = "{``$10^{10^6}$ Worlds and Beyond: Efficient Representation
and Processing of Incomplete Information''}",
booktitle = {Proc.\ ICDE},
year = {2007},
}
@inproceedings{AKO07WSDb,
author = {Lyublena Antova and Christoph Koch and Dan Olteanu},
title = "{``MayBMS: Managing Incomplete Information with
Probabilistic World-Set Decompositions''}",
booktitle = {Proc.\ ICDE},
year = {2007},
OPTnote = {Demonstration Paper}
}
@inproceedings{AKO07ISQL,
author = {Lyublena Antova and Christoph Koch and Dan Olteanu},
title = "{``From Complete to Incomplete Information and Back''}",
booktitle = {Proc.\ SIGMOD},
year = {2007}
}
@inproceedings(AKO-VLDBDEMO-2007,
author = {Lyublena Antova and Christoph Koch and Dan Olteanu},
title = "{``Query Language Support for
Incomplete Information in the MayBMS System''}",
booktitle = {Proc.\ VLDB},
year = 2007
)
@inproceedings{AJKO2008,
author = {Lyublena Antova and Thomas Jansen and
Christoph Koch and Dan Olteanu},
title = "{``Fast and Simple Relational Processing of Uncertain Data''}",
booktitle = {Proc.\ ICDE},
year = {2008},
}
@inproceedings{OH:SUM:2008,
author = {Dan Olteanu and Jiewen Huang},
title = "{``Conjunctive Queries with Inequalities on Probabilistic Databases''}",
booktitle = {Proc.\ SUM},
year = 2008
}
@article{Bryant86,
author = {Randal E. Bryant},
title = {Graph-Based Algorithms for Boolean Function Manipulation},
journal = {IEEE Trans. Computers},
volume = {35},
number = {8},
year = {1986},
pages = {677-691},
}
@Article{brayton87,
author = {R. K. Brayton},
title = "{``Factoring logic functions''}",
journal = {{IBM J. Res. Develop.}},
year = {1987},
OPTkey = {},
volume = {{\bf 31}}},
number = {2},
OPTpages = {},
OPTmonth = {},
OPTnote = {},
OPTannote = {}
}
@Article{darwicheJAIR02,
author = {Adnan Darwiche and Pierre Marquis},
title = "{``A knowlege compilation map''}",
journal = {{Journal of AI Research}},
volume = "17",
pages = "229--264",
year = "2002"
}
@Book{Meinel:OBDD:1998,
author = "Christoph Meinel and Thorsten Theobald",
title = "Algorithms and Data Structures in {VLSI} Design",
year = "1998",
publisher = "Springer-Verlag",
}
@Book{gj79,
author = "M. R. Garey and D. S. Johnson",
title = "Computers and intractability; a guide to the theory of
{\it NP}-completeness",
year = "1979",
publisher = "W.H. Freeman",
}
@TechReport{re06prob,
author = {Chris Re and Nilesh Dalvi and Dan Suciu},
title = "{``Probabilistic Databases: Where and How''}",
institution = {University of Washington},
OPTkey = {},
OPTmonth = {},
year = {2005},
OPTannote = {}
}
@Article{tpch2000,
author = {Mikel Poess and Chris Floyd},
title = "{``New TPC Benchmarks for Decision Support and
Web Commerce''}",
journal = {{SIGMOD Record}},
year = {2000},
OPTkey = {},
volume = {29},
number = {4},
OPTpages = {},
OPTmonth = {},
OPTnote = {},
OPTannote = {}
}
@MANUAL{tpch2006,
organization = {{Transaction Processing Performance Council}},
title = {{TPC Benchmark H (Decision Support)}},
year = {2006},
edition = {Revision 2.6.0},
note = {http://www.tpc.org/tpch/spec/tpch2.6.0.pdf},
OPTannote = {}
}
@inproceedings{division,
author = {Ralf Rantzau and Christoph Mangold},
title = "{``Laws for Rewriting Queries
Containing Division Operators''}",
booktitle = {Proc.\ ICDE},
year = {2006}
}
@inproceedings(BunemanICDT01,
author = {Peter Buneman and Sanjeev Khanna and Wang-Chiew Tan},
title = "{``Why and Where: A Characterization of Data Provenance''}",
booktitle = {Proc.\ ICDT},
year = 2001
)
@inproceedings(DS2007,
author = {Nilesh Dalvi and Dan Suciu},
title = "{``Management of Probabilistic Data: Foundations and
Challenges''}",
booktitle = {Proc.\ PODS},
year = 2007
)
@article(EIV2006,
author = {Ahmed K. Elmagarmid and Panagiotis G. Ipeirotis and
Vassilios K. Verykios},
title = "{``Duplicate Record Detection''}",
journal = {IEEE TKDE},
volume = {{\bf 19}},
number = 1,
year = 2006
)
@article(FR1997,
author = {Norbert Fuhr and Thomas R\"olleke},
title = "{``A Probabilistic Relational Algebra for the
Integration of Information Retrieval and Database Systems''}",
journal = {ACM Trans.\ Inf.\ Syst.},
volume = {{\bf 15}},
number = 1,
pages = {32--66},
year = 1997
)
@book(Vazirani2001,
author = {Vijay V. Vazirani},
title = "{Approximation Algorithms}",
publisher = {Springer},
year = 2001
)
@inproceedings(KL1983,
author = {Richard M. Karp and Michael Luby},
title = "{``Monte-Carlo Algorithms for Enumeration and
Reliability Problems''}",
booktitle = {Proc.\ FOCS},
year = 1983,
pages = {56--64}
)
@article(KLM1989,
author = {Richard M. Karp and Michael Luby and Neal Madras},
title = "{``Monte-Carlo Approximation Algorithms for
Enumeration Problems''}",
journal = {J.\ Algorithms},
volume = {{\bf 10}},
number = 3,
pages = {429--448},
year = 1989
)
@article(DKLR2000,
author = {Paul Dagum and Richard M. Karp and Michael Luby and
Sheldon M. Ross},
title = "{``An Optimal Algorithm for Monte Carlo Estimation''}",
journal = {SIAM J.\ Comput.},
volume = {{\bf 29}},
number = 5,
pages = {1484--1496},
year = 2000
)
@unpublished{OHK2010,
author = {Dan Olteanu and Jiewen Huang and Christoph Koch},
title = "{``Approximate Confidence Computation in Probabilistic Databases''}",
note = "Submitted to ICDE 2010"
}

BIN
Documents/census.eps Normal file

Binary file not shown.

106
Documents/codebase.tex Normal file
View File

@ -0,0 +1,106 @@
\chapter{The MayBMS Codebase}
\label{sect:codebase}
MayBMS is currently implemented in PostgreSQL 8.3.3. Integration into
an existing full-fledged DBMS brings two major advantages. First,
integration makes it possible to reuse the internal functions and
structures of the DBMS. Secondly, it often increases the efficiency of
query processing.
Figures~\ref{fig:modified-files1} and \ref{fig:modified-files2} give a
list of source files modified or added to the original PostgreSQL
8.3.3. All modifications are explicitly marked in the source files by
\begin{verbatim}
/* MAYBMS BEGIN */
... [some code goes here]
/* MAYBMS END */
\end{verbatim}
All files in directory \texttt{maybms} are newly created and the
others are existing files in PostgreSQL8.3.3. Header files (*.h) refer
to \texttt{src/include/directory/filename}. Source files (*.c and *.y)
refer to \texttt{src/backend/directory/filename}.
\begin{figure}[ht]
\begin{center}
\small
\begin{tabular}{|l|l|}
\hline
File & Description \\
\hline
parser/gram.y & Adds new constructs such as repair-key and possible. \\ \hline
parser/keyword.c & Adds necessary keywords. \\ \hline
nodes/parsenodes.h & Adds the relation type to structure CreatStmt. \\ \hline
catalog/pg\_class.h & Adds an extra column specifying the type of a relation \\
catalog/pg\_attribute.h & in the catalog. \\ \hline
nodes/copyfuncs.c & Copying the relation type. \\ \hline
catalog/heap.c & Execution of creating urelations. \\ \hline
catalog/heap.h & An argument tabletype is added to function \\
catalog/toasting.c & heap\_create\_with\_catalog in heap.h. \\
commands/tablecmds.c & All files accessing this function are modified.\\
commands/cluster.c & \\
bootstrap/bootparse.y & \\
executor/execMain.c & \\ \hline
\end{tabular}
\end{center}
\vspace*{-1em}
\caption{ Files related to U-relation creation.}
\label{fig:modified-files1}
\end{figure}
\begin{figure}[ht]
\begin{center}
\small
\begin{tabular}{|l|l|}
\hline
File & Description \\
\hline
catalog/pg\_proc.h & Registers conf, tconf, aconf, argmax, esum, ecount \\
& and the related functions. \\ \hline
catalog/pg\_aggregate.h & Specifies the relationships between conf, aconf and \\
& the related state, final functions. \\ \hline
nodes/execnodes.h & Adds confidence computation states to structure AggState. \\
executor/nodeAgg.c & \\ \hline
tcop/postgres.c & Access point to query rewriting. \\ \hline
maybms/conf\_comp.h & Prototypes for conf, tconf, aconf and their related functions. \\ \hline
maybms/SPROUT.c & Confidence computation of conf for hierarchical \\
& queries on tuple-independent U-relations using SPROUT. \\ \hline
maybms/tupleconf.c & Confidence computation for tconf. \\ \hline
maybms/ws-tree.c & Confidence computation of conf for arbitrary \\
& U-relations using ws-tree-based algorithm. \\ \hline
maybms/bitset.h & Auxiliary files for ws-tree-based algorithm. \\
maybms/bitset.c & \\ \hline
maybms/aconf.c & Implementation of approximate confidence computation. \\ \hline
maybms/signature.h & Derives signatures for hierarchical queries. \\
maybms/signature.c & \\ \hline
maybms/repair\_key.c & Implementation of repair-key construct by pure rewriting. \\ \hline
maybms/pick\_tuples.c & Implementation of pick-tuples construct by pure rewriting. \\ \hline
maybms/localcond.h & Storing the condition columns for confidence computation. \\
maybms/localcond.c & \\ \hline
maybms/argmax.c & Implementation of aggregate function argmax. \\ \hline
maybms/rewrite.c & Rewriting of select and create commands involving uncertainty. \\
maybms/rewrite\_utils.c & \\ \hline
maybms/rewrite\_updates.c & Rewriting of update commands (insert, delete, update). \\ \hline
maybms/supported.c & Checking whether a query is supported and should be rewritten. \\ \hline
maybms/utils.h & Utility functions. \\
maybms/utils.c & \\ \hline
\end{tabular}
\end{center}
\vspace*{-1em}
\caption{ Files related to confidence computation and query rewriting. }
\label{fig:modified-files2}
\end{figure}
\vspace*{-10em}

292
Documents/experiments.tex Normal file
View File

@ -0,0 +1,292 @@
\chapter{Experiments}
This section reports on experiments performed with the first MayBMS release
(beta) and a benchmark consisting of two parts,
which are described in more detail in the remainder of this chapter:
%
\begin{enumerate}
\item
Computing the probability of triangles in random graphs.
\item
A modified subset of the TPC-H queries on uncertain TPC-H datasets.
\end{enumerate}
By this benchmark, we do not attempt to simulate a representative set of
use cases: the jury is still out on what such a set of use cases might be.
Instead, we focus on a benchmark that allows us to see how the performance
of MayBMS develops across releases on the two core technical problems solved
by MayBMS: polynomial-time query evaluation for the polynomial-time fragment
of our query language and the efficient approximation of query results for
queries that do not belong to the polynomial-time fragment. (Finding triangles
in random graphs is a near-canonical example of such queries.)
We will keep monitoring the development of the state of the art and will
continue to survey applications and collect use cases; we will extend or
replace this benchmark as consensus develops regarding the most important
applications of probabilistic databases.
\medskip
Experimental setup.
All the experiments reported on in this chapter were conducted on an Athlon-X2(4600+)64bit / 1.8GB / Linux2.6.20 / gcc4.1.2 machine.
\section{Random Graphs}
\subsection{Experiments with Varying Levels of Precision}
In this experiment, we create undirected random graphs in which
the presence of each edge is independent of that of the other edges. The probability that an edge is in the graph is 0.5 and
this applies to each edge. Then we compute the probability that there exists a triangle in the graphs using approximation.
The queries can be found in Appendix~\ref{app:randgraph}.
We report wall-clock execution times
of queries run in the PostgreSQL8.3.3 psql shell with a warm
cache obtained by running a query once and then reporting
the average execution time over three subsequent, identical executions.
Figure \ref{fig:randgraph} shows the execution time of approximation with different precision parameters for random graphs composed of 5 to 33 nodes. An ($\epsilon, \delta$) approximation has the following property: let $p$ be the exact probability and $\hat{p}$ be the approximate probability, then
$\Pr\big[ |p - \hat{p}| \ge \epsilon \cdot p \big] \le \delta$.
\begin{figure}[htp]
\begin{center}
\begin{tabular}{ | c | c | c | c | c | c | }
\hline
\multirow{2}{*}{\#nodes} & \multirow{2}{*}{\#clauses} & \multicolumn{4}{|c|}{Execution Time(Seconds)} \\ \cline{3-6}
& & (.05,.05) & (.01,.01) & (.005,.005) & (.001,.001) \\ \hline
5 & 10 & 0.01 & 0.03 & 0.11 & 2.08 \\ \hline
6 & 20 & 0.01 & 0.08 & 0.26 & 5.27 \\ \hline
7 & 35 & 0.02 & 0.14 & 0.46 & 9.15 \\ \hline
8 & 56 & 0.03 & 0.22 & 0.7 & 12.49 \\ \hline
9 & 84 & 0.04 & 0.28 & 0.85 & 14.95 \\ \hline
10 & 120 & 0.08 & 0.44 & 1.13 & 16.19 \\ \hline
11 & 165 & 0.15 & 0.60 & 1.60 & 17.98 \\ \hline
12 & 220 & 0.29 & 1.24 & 2.48 & 24.31 \\ \hline
13 & 286 & 0.55 & 2.38 & 4.74 & 35.29 \\ \hline
14 & 364 & 0.98 & 4.26 & 8.38 & 51.51 \\ \hline
15 & 455 & 1.56 & 6.74 & 13.29 & 73.00 \\ \hline
16 & 560 & 2.37 & 10.26 & 19.21 & 102.97 \\ \hline
17 & 680 & 3.46 & 14.6 & 28.76 & 144.02 \\ \hline
18 & 816 & 4.92 & 20.49 & 41.1 & 206.18 \\ \hline
19 & 969 & 7.03 & 28.52 & 56.43 & 291.21 \\ \hline
20 & 1140 & 9.97 & 39.72 & 81.01 & 395.18 \\ \hline
21 & 1330 & 14.74 & 57.13 & 123.79 & 597.86 \\ \hline
22 & 1540 & 23.94 & 119.81 & 218.62 & 600+ \\ \hline
23 & 1771 & 46.21 & 204.83 & 416.42 & 600+ \\ \hline
24 & 2024 & 79.03 & 411.67 & 600+ & 600+ \\ \hline
25 & 2300 & 115.64 & 515.65 & 600+ & 600+ \\ \hline
26 & 2600 & 159.66 & 600+ & 600+ & 600+ \\ \hline
27 & 2925 & 202.98 & 600+ & 600+ & 600+ \\ \hline
28 & 3276 & 251.82 & 600+ & 600+ & 600+ \\ \hline
29 & 3654 & 312.89 & 600+ & 600+ & 600+ \\ \hline
30 & 4060 & 387.72 & 600+ & 600+ & 600+ \\ \hline
31 & 4495 & 475.78 & 600+ & 600+ & 600+ \\ \hline
32 & 4960 & 582.4 & 600+ & 600+ & 600+ \\ \hline
33 & 5456 & 600+ & 600+ & 600+ & 600+ \\ \hline
\end{tabular}
\end{center}
\caption{Comparison between execution time of approximation with different precision}
\label{fig:randgraph}
\end{figure}
\subsection{Experiments with Different Edge Probabilities}
In the previous experiments, each edge had probability 0.5. We use other values as the edge probability(all edges still have the same probability) and run the experiment again with (0.05,0.05) approximation. The SQL statements in Appendix~\ref{app:randgraph} should be modified accordingly. Let $p$ be the probability, change the following statements
\begin{verbatim}
insert into inout values (1, 0.5);
insert into inout values (0, 0.5);
\end{verbatim}
to
\begin{verbatim}
insert into inout values (1, p);
insert into inout values (0, 1 - p);
\end{verbatim}
Figure \ref{fig:edge-prob} shows the execution time for queries of random graphs composed of 25 to 101 nodes with different fixed edge probabilities.
\begin{figure}[htp]
\begin{center}
\begin{tabular}{ | c | c | c | c | c | }
\hline
\multirow{2}{*}{\#nodes} & \multirow{2}{*}{\#clauses} & \multicolumn{3}{|c|}{Execution Time(Seconds)} \\ \cline{3-5}
& & p=0.5 & p=0.1 & p=0.05 \\ \hline
25 & 2300 & 115.64 & 1.77 & 0.55 \\ \hline
%26 & 2600 & 159.66 & 2.28 & 0.72 \\ \hline
%27 & 2925 & 202.98 & 2.52 & 0.83 \\ \hline
%28 & 3276 & 251.82 & 3.19 & 1.02 \\ \hline
%29 & 3654 & 312.89 & 3.73 & 1.19 \\ \hline
30 & 4060 & 387.72 & 4.13 & 1.35 \\ \hline
31 & 4495 & 475.78 & 4.94 & 1.54 \\ \hline
32 & 4960 & 582.40 & 5.72 & 1.82 \\ \hline
33 & 5456 & 600+ & 6.87 & 2.12 \\ \hline
%34 & 5984 & 600+ & 7.48 & 2.60 \\ \hline
35 & 6545 & 600+ & 8.74 & 2.74 \\ \hline
%36 & 7140 & 600+ & 9.59 & 3.12 \\ \hline
%37 & 7770 & 600+ & 11.53 & 3.63 \\ \hline
%38 & 8436 & 600+ & 13.38 & 3.92 \\ \hline
%39 & 9139 & 600+ & 15.32 & 4.6 \\ \hline
40 & 9880 & 600+ & 18.32 & 5.06 \\ \hline
%41 & 10660 & 600+ & 20.65 & 5.76 \\ \hline
%42 & 11480 & 600+ & 23.91 & 6.51 \\ \hline
%43 & 12341 & 600+ & 28.44 & 7.7 \\ \hline
%44 & 13244 & 600+ & 32.38 & 8.48 \\ \hline
45 & 14190 & 600+ & 36.77 & 8.96 \\ \hline
%46 & 15180 & 600+ & 41.09 & 9.99 \\ \hline
%47 & 16215 & 600+ & 48.68 & 11.45 \\ \hline
%48 & 17296 & 600+ & 54.66 & 12.62 \\ \hline
%49 & 18424 & 600+ & 61.05 & 13.39 \\ \hline
50 & 19600 & 600+ & 70.79 & 15.79 \\ \hline
%51 & 20825 & 600+ & 80.19 & 16.09 \\ \hline
%52 & 22100 & 600+ & 88.32 & 17.16 \\ \hline
%53 & 23426 & 600+ & 97.99 & 19.49 \\ \hline
%54 & 24804 & 600+ & 112.07 & 21.58 \\ \hline
55 & 26235 & 600+ & 123.69 & 21.97 \\ \hline
%56 & 27720 & 600+ & 138.92 & 25.73 \\ \hline
%57 & 29260 & 600+ & 155.86 & 27.52 \\ \hline
%58 & 30856 & 600+ & 172.39 & 29.37 \\ \hline
%59 & 32509 & 600+ & 190.98 & 32.06 \\ \hline
60 & 34220 & 600+ & 214.06 & 33.94 \\ \hline
%61 & 35990 & 600+ & & 36.97 \\ \hline
%62 & 37820 & 600+ & & 38.40 \\ \hline
%63 & 39711 & 600+ & & 42.80 \\ \hline
%64 & 41664 & 600+ & & 43.89 \\ \hline
65 & 43680 & 600+ & 343.66 & 47.09 \\ \hline
%66 & 45760 & 600+ & & 51.56 \\ \hline
%67 & 47905 & 600+ & & 54.87 \\ \hline
68 & 50116 & 600+ & 451.06 & 59.87 \\ \hline
69 & 52934 & 600+ & 490.64 & 64.69 \\ \hline
70 & 54740 & 600+ & 542.61 & 68.98 \\ \hline
71 & 57155 & 600+ & 595.03 & 72.88 \\ \hline
72 & 59640 & 600+ & 600+ & 82.30 \\ \hline
75 & 67525 & 600+ & 600+ & 106.49 \\ \hline
80 & 82160 & 600+ & 600+ & 154.92 \\ \hline
85 & 98770 & 600+ & 600+ & 224.3 \\ \hline
90 & 117480 & 600+ & 600+ & 316.28 \\ \hline
95 & 138415 & 600+ & 600+ & 437.39 \\ \hline
97 & 147440 & 600+ & 600+ & 510.39 \\ \hline
98 & 152096 & 600+ & 600+ & 543.87 \\ \hline
99 & 156849 & 600+ & 600+ & 558.44 \\ \hline
100 & 161700 & 600+ & 600+ & 593.84 \\ \hline
101 & 166650 & 600+ & 600+ & 600+ \\ \hline
\end{tabular}
\end{center}
\caption{Comparison between execution time of queries of random graphs with different fixed edge probabilities}
\label{fig:edge-prob}
\end{figure}
\subsection{Experiments with General Random Graphs}
The previous experiments were conducted on undirected graphs in which every pair of nodes had a possibly present edge. However, this may not be the case in general. In many scenarios, each pair of nodes may have a certainly present, certainly absent or possibly present edge. In our following experiments, we construct such general probabilistic random graphs from data representing directed links between webpage within nd.edu domain\footnote{http://www.nd.edu/~networks/resources/www/www.dat.gz}. If a link between two pages is absent from the data, then it is also absent from our graphs. If a link is present in the data, then it is a certainly or possibly present edge in our graphs. We run again the queries computing the probabilities of existence of triangles in such graphs with (0.05,0.05) approximation. The probabilities that possibly present edges are in the graphs are randomly distributed in (0,0.1). The queries of the graph constructions and confidence computation can be found in Appendix~\ref{app:general-randgraph}. Figure \ref{fig:general-randgraph} shows the execution time for queries of such random graphs composed of 1000 to 30000 nodes.
\begin{figure}[htp]
\begin{center}
\begin{tabular}{ | c | c | c | c | }
\hline
\#nodes & \#possible edges & \#clauses & Execution Time(Seconds) \\ \hline
1000 & 3271 & 6367 & 4.04 \\ \hline
2000 & 6446 & 12598 & 11.84 \\ \hline
3000 & 9056 & 19836 & 21.88 \\ \hline
4000 & 11366 & 22455 & 28.57 \\ \hline
5000 & 13497 & 24574 & 31.38 \\ \hline
6000 & 16095 & 25731 & 35.36 \\ \hline
7000 & 17958 & 26070 & 35.82 \\ \hline
8000 & 23113 & 39481 & 80.14 \\ \hline
9000 & 26114 & 43369 & 115.45 \\ \hline
10000 & 32975 & 51586 & 140.00 \\ \hline
11000 & 35507 & 55562 & 157.34 \\ \hline
12000 & 37623 & 57260 & 170.05 \\ \hline
13000 & 40246 & 61060 & 197.67 \\ \hline
14000 & 44045 & 66530 & 225.88 \\ \hline
15000 & 45434 & 66966 & 230.51 \\ \hline
16000 & 47814 & 69787 & 260.70 \\ \hline
17000 & 50456 & 72710 & 278.48 \\ \hline
18000 & 52145 & 73043 & 280.76 \\ \hline
19000 & 53849 & 73437 & 288.01 \\ \hline
20000 & 55584 & 73953 & 289.30 \\ \hline
21000 & 57654 & 74688 & 290.37 \\ \hline
22000 & 59274 & 74991 & 295.66 \\ \hline
23000 & 61308 & 75954 & 296.13 \\ \hline
24000 & 63000 & 76288 & 313.13 \\ \hline
25000 & 65538 & 79404 & 354.95 \\ \hline
26000 & 69741 & 89888 & 439.01 \\ \hline
27000 & 72741 & 93016 & 479.78 \\ \hline
28000 & 76148 & 98065 & 553.75 \\ \hline
29000 & 79414 & 104328 & 573.24 \\ \hline
30000 & 82714 & 107633 & 601.33 \\ \hline
\end{tabular}
\end{center}
\caption{Execution time of confidence computation for existence of triangles in general random graphs}
\label{fig:general-randgraph}
\end{figure}
\section{Probabilistic TPC-H}
SPROUT\footnote{http://web.comlab.ox.ac.uk/projects/SPROUT/index.html} is a part
of the query engine of MayBMS and provides state-of-the-art techniques for efficient
exact confidence computation. In this section, we show how TPC-H queries can
benefit from these techniques. For each TPC-H query, we consider its largest subquery
without aggregations and inequality joins but with
conf() for specifying exact probability computation
for distinct tuples in query answers. We consider two
flavours of each of these queries: A version with original
selection attributes (again, without aggregations), and a version
where we drop keys from the selection attributes. Queries are included in the
experiments if SPROUT's techniques can be applied to them. Our data set consists
of tuple-independent probabilistic databases obtained from deterministic
databases produced by TPC-H 2.7.0 by associating each
tuple with a Boolean random variable and by choosing at random
a probability distribution over these variables. We perform experiments with TPC-H
scale factor 1 (1GB database size) and evaluate the
TPC-H-like queries mentioned above. The queries can
be found in Appendix~\ref{app:tpch}. In addition, we compare our results
with the reported time from \cite{OHK2008} in which SPROUT was only partially
integrated into PostgreSQL and storing temporary relations to the disk was
sometimes necessary. The average time shown below is obtained from ten subsequent,
identical executions with a warm cache by running the query once.
\begin{figure}[htp]
\begin{center}
\begin{tabular}{ | c | c | c | }
\hline
Query & \multicolumn{2}{|c|}{Average Time(Seconds)} \\ \cline{2-3}
& Current running time & Time reported in \cite{OHK2008} \\ \hline
1 & 8.21 & 120.13 \\ \hline
4 & 40.57 & 39.52 \\ \hline
12 & 17.1 & 21.94 \\ \hline
15 & 5.5 & 3.2 \\ \hline
B1 & 5.37 & 14.92 \\ \hline
B4 & 31.88 & 33.02 \\ \hline
B6 & 3.82 & 6.37 \\ \hline
B12 & 15.91 & 18.56 \\ \hline
B14 & 4.17 & 4.86 \\ \hline
B15 & 4.81 & 5.24 \\ \hline
B16 & 0.87 & 3.16 \\ \hline
B17 & 3.25 & 2.43 \\ \hline
\end{tabular}
\end{center}
\caption{Current running times vs.\ running times reported in \cite{OHK2008}.
Boolean queries are prefixed by B. }
\end{figure}

1361
Documents/foundations.tex Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
\chapter{Queries in General Random Graph Experiments}
\label{app:general-randgraph}
\begin{verbatim}
drop table data0;
drop table data;
create table data0(u int, v int);
create table data(u int, v int);
/* Copy the data to a relation. */
copy data0
from 'path_of_the_data_file/www.dat' with delimiter as ' ';
/* Since the data represents a directed graph, we need to
insert all tuples again with u and v swapped.
*/
insert into data0
select v, u from data0;
/* This fetches the distinct pairs of (u,v), which represents
all edges of an undirected graph.
*/
insert into data
select distinct u, v from data0;
drop table edges;
drop table edge0;
create table edges (u integer, v integer, p float4);
/* This fetches all the edges related to the nodes we intend to
keep in the graph.
'1000' in 'u < 1000 and v < 1000' is the number of nodes
which will appear in the graph.
'0.01' in 'random() < 0.01' is the proportion of certainly
present edges in all edges.
'0.1' is the upper bound of the probability that a possibly
present edge is in the graph.
You may change the above-mentioned three parameters in the
experiments.
*/
insert into edges
select u, v,
CASE WHEN random() < 0.01 THEN 1.0
ELSE random() * 0.1
END
from data
where u < 1000 and v < 1000 and u < v;
/* The number of edges in the graph */
select count(*) as edge_count from edges;
/* The number of clauses in the confidence computation */
select count(*) as clause_count from
edges e1, edges e2, edges e3
where e1.v = e2.u and e2.v = e3.v and e1.u = e3.u
and e1.u < e2.u and e2.u < e3.v;
/* Creation of an uncertain relations representing the graph */
create table edge0 as
(pick tuples from edges independently with probability p);
/* Confidence computation of existence of at least
a triangle in the graph
*/
select aconf(.05,.05) as triangle_prob
from edge0 e1, edge0 e2, edge0 e3
where e1.v = e2.u and e2.v = e3.v and e1.u = e3.u
and e1.u < e2.u and e2.u < e3.v;
\end{verbatim}
\newpage

436
Documents/language.tex Normal file
View File

@ -0,0 +1,436 @@
\chapter{The MayBMS Query and Update Language}
\section{Language Overview}
\label{sect:ql}
This section describes the query and update language of MayBMS, which is based on SQL.
In fact, our language is a generalization of SQL on classical relational databases.
To simplify the presentation, a fragment of the full language supported in MayBMS is presented here.
The representation system used in MayBMS, U-relations, has as a special case classical relational tables, that is, tables with no condition columns. We will call these tables {\em typed-certain (t-certain) tables}\/ in this section. Tables that are not t-certain are called uncertain.
Note that this notion of certainty is
purely syntactic, and
\[
\mbox{cert}(R) = \pi_{sch(R)}(\sigma_{P=1}(\mbox{conf}(R)))
\]
may well be equal to the projection of a U-relation $U_R$ to its attribute (non-condition) columns despite $R$ not being t-certain according to this definition.
\paragraph{Aggregates}
In MayBMS, full SQL is supported on t-certain tables.
Beyond t-certain tables, some restrictions are in place to assure that query evaluation is feasible. In particular, we do not support the standard SQL aggregates such as {\tt sum} or {\tt count} on uncertain relations. This can be easily justified: In general, these aggregates will produce exponentially many different numerical results in the various possible worlds, and there is no way of representing these results efficiently. However, MayBMS supports a different set of aggregate operations on uncertain relations. These include the computations of {\em expected}\/ sums and counts (using aggregates {\tt esum} and {\tt ecount}).
Moreover, the confidence computation operation is an aggregate in the MayBMS query language.
This is a deviation from the language flavor of our algebra, but there is a justification for
this. The algebra presented earlier assumed a set-based semantics for relations, where operations
such as projections automatically remove duplicates. In the MayBMS query language, just like in SQL, duplicates have to be eliminated explicitly, and confidence is naturally an aggregate that computes a single confidence value for each group of tuples that agree on (a subset of) the non-condition columns.
By using aggregation syntax for {\tt conf} and not supporting {\tt select distinct} on uncertain relations, we avoid a need for conditions beyond the special conjunctions that can be stored with each tuple in
U-relations.
All supported aggregates on uncertain tables produce t-certain tables.
\paragraph{Duplicate tuples}
SQL databases in general support multiset tables, i.e., tables in which there may be duplicate tuples. There is no conceptual difficulty at all in supporting multiset U-relations. In fact, since U-relations are just relations in which some columns are interpreted to have a special meaning (conditions), just storing them in a standard relational database management system which supports duplicates in tables yields support for multiset U-relations.
\paragraph{Syntax}
The MayBMS query language is compositional and built from uncertain and t-certain queries.
The uncertain queries are those that produce a possibly uncertain relation (represented by a U-relation with more than zero $V$ and $D$ columns). Uncertain queries can be constructed, inductively, from t-certain queries, {\tt select-from-where} queries over uncertain tables, the multiset union of uncertain queries (using the SQL {\tt union} construct), and the {\tt repair-key} and {\tt pick-tuples} statements that can be specified as follows
\begin{verbatim}
repair key <attributes> in
(<t-certain-query> | <t-certain-relation>)
[weight by <expression>];
pick tuples from
<t-certain-query> | <t-certain-relation>
[independently]
[with probability <expression>];
\end{verbatim}
Note that {\tt repair-key} is a query, rather than an update statement.
Details on these constructs can be found in Section~\ref{sec:langref}, Language reference.
The {\tt select-from-where} queries may use any t-certain subqueries in the conditions, plus uncertain subqueries in atomic conditions of the form
\begin{verbatim}
<tuple> in <uncertain-query>
\end{verbatim}
that occur positively in the condition. (That is, if the condition is turned into DNF, these literals are not negated.)
\nop{
Uncertain queries also support a construct {\tt tconf()} that can be used in the select list and outputs, for each tuple selected, its confidence. Applied to a multiset U-relation, this operation does not eliminate duplicates and compute aggregate confidence values as {\tt conf} does, but outputs the probability of the (conjunctive) condition for each of the tuples in the multiset.
} % end nop
The t-certain queries (i.e., queries that produce a t-certain table) are given by
\begin{itemize}
\item
all constructs of SQL on t-certain tables and t-certain subqueries, extended by a new aggregate
\begin{verbatim}
argmax(<argument-attribute>, <value-attribute>)
\end{verbatim}
which outputs one of the {\tt argument-attribute} values in the current group (determined by the group-by clause) whose tuples have a maximum {\tt value-attribute} value within the group. Thus, this is the typical argmax construct from mathematics added as an SQL extension.
\item
{\tt select-from-where-group-by} on uncertain queries using the {\tt possible} construct for computing possible tuples, or the aggregates {\tt conf}, {\tt esum}, and {\tt ecount}, but none of the standard SQL aggregates. There is an exact and an approximate version of the {\tt conf} aggregate. The
latter takes two parameters $\epsilon$ and $\delta$ (see the earlier discussion of the Karp-Luby FPRAS).
\end{itemize}
The aggregates {\tt esum} and {\tt ecount} compute expected sums and counts across groups of tuples.
While it may seem that these aggregates are at least as hard as confidence computation (which is \#P-hard), this is in fact not so.
These aggregates can be efficiently computed exploiting linearity of expectation.
A query
\begin{verbatim}
select A, esum(B) from R group by A;
\end{verbatim}
is equivalent to a query
\begin{verbatim}
select A, sum(B * P) from R' group by A;
\end{verbatim}
where {\tt R'} is obtained from the U-relation of {\tt R} by
replacing each local condition $V_1, D_1$, $\dots$, $V_k$, $D_k$ by the probability
$\Pr[V_1=D_1 \land \dots \land V_k=D_k]$, not eliminating duplicates.
That is, expected sums can be computed efficiently tuple by tuple, and only require to determine the probability of a conjunction, which is easy, rather than a DNF of variable assignments
as in the case of the {\tt conf} aggregate.
The {\tt ecount} aggregate is a special case of {\tt esum} applied to a column of ones.
\begin{example}\em
\label{ex:coins_sql}
The query of Example~\ref{ex:twotosses} can be expressed in the query language of MayBMS as follows.
Let {\tt R} be {\tt repair key in Coins weight by Count} and let {\tt S} be
\begin{verbatim}
select R.Type, Toss, Face
from (repair key Type, Toss in (select * from Faces, Tosses)
weight by FProb) S0, R
where R.Type = S0.Type;
\end{verbatim}
It is not hard to verify that $\pi_{\mathrm{Toss}, \mathrm{Face}}(S) \neq Ev$
exactly if there exist tuples $\vec{s} \in S, \vec{t} \in Ev$ such that
$\vec{s}.\mathrm{Toss}=\vec{t}.\mathrm{Toss}$ and
$\vec{s}.\mathrm{Face} \neq \vec{t}.\mathrm{Face}$.
Let {\tt C} be
\begin{verbatim}
select S.Type from S, Ev
where S.Toss = Ev.Toss and S.Face <> Ev.Face;
\end{verbatim}
Then we can compute {\tt Q} using the trick of Example~\ref{ex:trick} as
% BUG-FIX BEGIN
\begin{verbatim}
select Type, (P1-P2)/(1-P3) as P
from (select Type, conf() as P1 from S group by Type) Q1,
((select Type, conf() as P2 from C group by Type)
union
(
(select Type, 0 as P2 from Coins)
except
(select Type, 0 as P2 from
(select Type, conf() from C group by Type) Dummy)
)) Q2,
(select conf() as P3 from C) Q3
where Q1.Type = Q2.Type;
\end{verbatim}
% BUG-FIX END
The argmax aggregate can be used to compute maximum-a-posteriori (MAP) and maximum-likelihood estimates.
For example,
the MAP coin type
\[
\mbox{argmax}_{\mathrm{Type}} \; \Pr[\mbox{evidence is twice heads} \land \mbox{coin type is Type}]
\]
can be computed as
{\tt select argmax(Type, P) from Q}
because the normalizing factor {\tt (1-P3)} has no impact on argmax. Thus, the answer in this example
is the double-headed coin. (See table $Q$ of Figure~\ref{fig:twotosses_tables}: The fair coin has $P=1/3$, while the double-headed coin has $P=2/3$.)
The maximum likelihood estimate
\[
\mbox{argmax}_{\mathrm{Type}} \; \Pr[\mbox{evidence is twice heads} \mid \mbox{coin type is Type}]
\]
can be computed as
\begin{verbatim}
select argmax(Q.Type, Q.P/R'.P)
from Q, (select Type, conf() as P from R) R'
where Q.Type = R'.Type;
\end{verbatim}
Here, again, the result is 2headed, but this time with likelihood
1. (The fair coin has likelihood 1/4).
%
\punto
\end{example}
\paragraph{Supported Queries}
\index{Supported Queries}
MayBMS supports full SQL on t-certain tables. In addition it supports a large subset of SQL on t-uncertain tables, with even more features supported when fragments of the uncertain query involve t-certain subqueries. The following restrictions apply:
\begin{itemize}
\item
Exact aggregates and duplicate elimination using {\tt distinct} in a select statement are supported as long as the from clause subqueries and the subqueries in the where condition are t-certain.
\item
If a t-certain subquery Q in the where condition of a select statement contains references to t-uncertain tables, then the containing query is supported if Q is not correlated with it.
\item
The set operations {\tt except} and {\tt union} with duplicate elimination are supported when both the left and the right argument are t-certain queries.
\item
{\tt repair-key} and {\tt pick-tuples} are supported on t-certain queries.
\end{itemize}
Restrictions on the update statements are discussed below.
\paragraph{Updates}
\index{Updates}
%
MayBMS supports the usual schema modification and update statements of SQL. In fact, our use of U-relations makes this quite easy.
An insertion of the form
\begin{verbatim}
insert into <uncertain-table> (<uncertain-query>);
\end{verbatim}
is just the standard SQL insertion for tables we interpret as U-relations. Thus, the table inserted into must have the right number (that is, a sufficient number) of condition columns.
Schema-modifying operations such as
\begin{verbatim}
create table <uncertain-table> as (<uncertain-query>);
\end{verbatim}
are similarly straightforward.
A deletion
\begin{verbatim}
delete from <uncertain-table>
where <condition>;
\end{verbatim}
admits conditions that refer to the attributes of the current tuple and may use t-certain subqueries.
One can also update an uncertain table with an update statement
\begin{verbatim}
update <uncertain-table>
set <attribute> = <expr> [,...]
where <condition>;
\end{verbatim}
where the set list does not modify the condition columns and the where condition satisfies the same conditions as that of the delete statement. MayBMS allows users to insert a constant tuple by specifying values for the data columns in an insert statement:
\begin{verbatim}
insert into <uncertain-table> [<attribute_list>] <tuple>;
\end{verbatim}
\section{Language Reference}
\label{sec:langref}
We next discuss the extensions to SQL by MayBMS.
For a description of the standard SQL constructs please see the Postgres SQL language reference available at
\url{http://www.postgresql.org/docs/8.3/interactive/sql-commands.html}
\subsection{repair-key}
\textbf{Syntax:}
\begin{verbatim}
repair key <attributes> in
(<t-certain-query> | <t-certain-relation>)
[ weight by <expression> ]
\end{verbatim}
\noindent \textbf{Description:}
The {\tt repair-key} operation turns a {\em t-certain-query}\/
(or, as a special case, a {\em t-certain-relation}\/) into the set of worlds consisting of all possible
{\em maximal repairs}\/ of key $attributes$. A repair of key $\vec{A}$ in
relation $R$ is a subset of $R$ for which $\vec{A}$ is a key.
We say that relation $R'$ is a {\em maximal repair}\/ of a functional dependency
for relation $R$ if $R'$ is a maximal subset of $R$ which satisfies that
functional dependency. The numerically-valued $expression$ is used for
weighting the newly created alternative repairs.
If the {\tt weight by} clause is omitted, a uniform probability distribution is assumed among all tuples with
the same key. Suppose there are $n$ tuples sharing the same key, each of them is
associated with a probability of $1/n$. If the weight is specified by $expression$,
the value of $expression$ will be the probability of the tuple before normalization.
Suppose there are $n$ tuples sharing the same key, tuple $t_i$ is associated
with probability $expression_i$ / $\sum_{k=1}^n expression_k$. In either case,
the sum of the probabilities among all tuples with the same key is 1.
There will be an error message if the value of $expression$ in any tuple is
negative. The tuples for which probability is 0 are ignored and not included in any resulting possible world.
{\tt repair-key} can be placed wherever a select statement is allowed in SQL.
See Section~\ref{sect:pwsa} for more details on {\tt repair-key}.
\noindent \textbf{Example:}
Suppose $Customer$ is a certain
relation with columns $ID$ and $name$, the following query performs a {\tt repair-key} operation on column $ID$ in $Customer$:
\begin{verbatim}
repair key ID in Customer;
\end{verbatim}
Suppose $Accounts$ is a certain relation with columns $ID$ and $account$, the following is an example of {\tt repair-key} operation on column $ID$ in the output of a certain query:
\begin{verbatim}
repair key ID in
(select * from Customer natural join Accounts);
\end{verbatim}
\subsection{pick-tuples}
\textbf{Syntax:}
\begin{verbatim}
pick tuples from
<t-certain-query> | <t-certain-relation>
[independently]
[with probability <expression>];
\end{verbatim}
\noindent \textbf{Description:}
%
The {\tt pick-tuples} operation generates the set of worlds which can be obtained from a {\it t-certain-query} or a {\it t-certain-relation} by selecting a subset of the tuples of that query or relation. In the current version of MayBMS, the presence of {\tt independently} does not affect query evaluation. It is the default; in the future, MayBMS may be extended by other options.
By default, every tuple in a possible world is associated with probability 0.5. If {\tt with probability} $expression$ is specified, the numerical value of $expression$ is the probability of the tuple. Note that only values in (0,1] are valid. There will be an error message if the value of $expression$ is negative or larger than 1. Tuples for which $expression$ are 0 are ignored.
{\tt pick-tuples} can be placed wherever a select statement is allowed in SQL.
\subsection{possible}
\noindent \textbf{Syntax:}
\begin{verbatim}
select possible <attributes> from <query> | <relation>;
\end{verbatim}
\noindent \textbf{Description:}
The operation {\tt possible} selects the set of tuples appearing in at least one possible world. This construct is a shortcut for the query which selects all distinct tuples with confidence greater than zero:
\begin{verbatim}
select distinct <attributes> from
(select <attributes>, tconf() as conf from <query> | <relation>
where conf > 0) Q;
\end{verbatim}
\noindent \textbf{Example:}
Suppose R and S are uncertain relations, the following query displays distinct pairs (A,B) with positive probabilities.
\begin{verbatim}
select possible A, B from R, S;
\end{verbatim}
\subsection{Confidence computation and approximate aggregates}
{\tt argmax}, {\tt conf}, {\tt aconf}, {\tt tconf}, {\tt esum} and {\tt ecount} are functions introduced by MayBMS. Following is the summary of the functions. \\
\begin{small}
\begin{tabular}{|l|l|}
\hline
Name & Brief Description \\
\hline
argmax(argument, value) & Returns the argument with the maximum value. \\ \hline
conf() & Returns the exact confidence of distinct tuples. \\ \hline
conf(approach, $\epsilon$) & Returns the approximate confidence of distinct tuples. \\ \hline
aconf($\epsilon$, $\delta$) & Returns the approximate confidence of distinct tuples. \\ \hline
tconf() & Returns the exact confidence of tuples. \\ \hline
esum(attribute) & Returns the expected sum over distinct tuples. \\ \hline
ecount(attribute) & Returns the expected count over distinct tuples. \\ \hline
\end{tabular}
\end{small}
\setcounter{secnumdepth}{3}
\subsubsection{argmax(argument-attribute, value-attribute)}
Outputs an {\tt argument-attribute} value in the current group (determined by the group-by clause) whose tuples have a maximum {\tt value-attribute} value within the group. If there are several tuples sharing the same maximum {\tt value-attribute} value with different {\tt argument-attribute} values, an arbitrary value among them is returned. For example,
\begin{verbatim}
select location, argmax(date, temperature)
from weather_reports
group by location;
\end{verbatim}
retrieves one of the dates with the highest temperature for each location.
{\tt argmax} can be used on all relations and queries.
\subsubsection{conf()}
\noindent \textbf{Syntax:}
\begin{verbatim}
select <attribute | conf()> [, ...]
from <query> | <relation>
group by <attributes>;
\end{verbatim}
\noindent \textbf{Description:}
Computes for each possible {\em distinct}\/ tuple of attribute values of the target list that occurs in an uncertain relation in at least one possible world, the sum of the probabilities of the worlds in which it occurs. {\tt conf} can only be used on a t-uncertain query or a t-uncertain relation and the output of the query is a t-certain relation.
\noindent \textbf{Example:}
Suppose weather\_forecast is an uncertain relation storing information regarding weather prediction, the following query computes the probability of each weather condition for each location:
\begin{verbatim}
select location, weather, conf()
from weather_forecast
group by location, weather;
\end{verbatim}
\subsubsection{tconf()}
\noindent \textbf{Syntax:}
\begin{verbatim}
select <attribute | tconf()> [, ...]
from <query> | <relation>;
\end{verbatim}
\noindent \textbf{Description:}
Computes for each possible tuple the sum of the probabilities of the worlds where it appears. ${\tt tconf()}$ is different from ${\tt conf()}$ in that it does not eliminate duplicates. {\tt tconf} can only be used on a t-uncertain query or a t-uncertain relation and the output of the query is a t-certain relation.
\subsubsection{conf(approach, $\epsilon$)}
\noindent \textbf{Syntax:}
\begin{verbatim}
select <attribute | conf(<approach>, <epsilon>)> [, ...]
from <query> | <relation>
group by <attributes>;
\end{verbatim}
\noindent \textbf{Description:}
Computes for each possible {\em distinct}\/ tuple of the target list that occurs in at least one possible world, the $approximate$ sum of the probabilities of the worlds in which it occurs. {\tt approach} specifies the approximation approach, namely, `R' and `A' are relative and absolute approximation, respectively. Let $p$ be the exact sum (computed by {\tt conf()}) and $\hat{p}$ be the approximate sum (computed by {\tt conf(approach, $\epsilon$)}), the approximation has the following property:
\begin{itemize}
\item Relative approximation: $|p - \hat{p}| \le \epsilon \cdot p$
\item Absolute approximation: $|p - \hat{p}| \le \epsilon$
\end{itemize}
{\tt conf(approach, $\epsilon$)} can only be used on a t-uncertain query or a t-uncertain relation and the output of the query is a t-certain relation.
\subsubsection{aconf($\epsilon$, $\delta$)}
\noindent \textbf{Syntax:}
\begin{verbatim}
select <attribute | aconf(<epsilon>, <delta>)> [, ...]
from <query> | <relation>
group by <attributes>;
\end{verbatim}
\noindent \textbf{Description:}
Computes for each possible {\em distinct}\/ tuple of the target list that occurs in at least one possible world, the $approximate$ sum of the probabilities of the worlds in which it occurs. Let $p$ be the exact sum (computed by {\tt conf}) and $\hat{p}$ be the approximate sum (computed by {\tt aconf}), the approximation has the following property: $\Pr\big[ |p - \hat{p}| \ge \epsilon \cdot p \big] \le \delta$.
See the earlier discussion of the Karp-Luby FPRAS for more details. {\tt aconf} can only be used on a t-uncertain query or a t-uncertain relation and the output of the query is a t-certain relation. \\
\noindent \textbf{Remark:}
Although both {\tt conf(approach, $\epsilon$)} and {\tt aconf} output approximate confidence for distinct tuples, there are three major differences between them:
\begin{itemize}
\item The underlying techniques for {\tt conf(approach, $\epsilon$)} and
{\tt aconf} are d-tree approximation algorithm~\cite{OHK2010} and Karp-Luby FPRAS, respectively.
The former is a deterministic algorithm and outputs the same probability if the
databases and queries are identical while the latter is randomized and likely to output
different probabilities even if the databases and queries are identical.
\item {\tt conf(approach, $\epsilon$)} provides both absolute and relative approximation while {\tt aconf} only allows the latter.
\item {\tt conf(approach, $\epsilon$)} outputs an $\epsilon$-approximation certainly while {\tt aconf} guarantees it with probability $1-\delta$.
\end{itemize}
\subsubsection{esum and ecount}
\noindent \textbf{Syntax:}
\begin{verbatim}
select <attribute | esum(<attribute>) | ecount()> [, ...]
from <query> | <relation>
group by <attributes>;
\end{verbatim}
\noindent \textbf{Description:}
{\tt esum} and {\tt ecount} compute expected sum and count, respectively. {\tt ecount} can take zero or one argument, and the number of arguments does not affect the results. {\tt esum} and {\tt ecount} can only be used on a t-uncertain query or a t-uncertain relation and the output of the query is a t-certain relation.
\noindent \textbf{Example:}
The following query computes the expected total rainfall of seven days for each location:
\begin{verbatim}
select location, esum(rainfall)
from rainfall_forecast
where date >= '2010-10-01' and date <= '2010-10-07'
group by location;
\end{verbatim}

246
Documents/manual.tex Normal file
View File

@ -0,0 +1,246 @@
\documentclass[12pt]{book}
\usepackage[bookmarks]{hyperref}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{pst-tree}
\usepackage{multirow}
\usepackage{array}
%\addtolength{\textwidth}{1in}
%\addtolength{\oddsidemargin}{-0.5in}
%\addtolength{\evensidemargin}{-0.5in}
%\addtolength{\textheight}{1.5in}
%%\addtolength{\topmargin}{-1in}
%\addtolength{\topmargin}{-.2in}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{metatheorem}{Metatheorem}[section]
\newtheorem{example}[theorem]{Example}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{property}[theorem]{Property}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{proviso}[theorem]{Proviso}
\newtheorem{todo}[theorem]{ToDo}
\newcommand{\cby}[1]{#1}
\newcommand{\bluebox}[1]{#1}
\newcommand{\tuple}[1]{\langle #1 \rangle}
\newcommand{\nop}[1]{}
\newcommand{\difc}[1]{$#1$}
\def\lBrack{\lbrack\!\lbrack}
\def\rBrack{\rbrack\!\rbrack}
\newcommand{\Bracks}[1]{\lBrack#1\rBrack}
\def\punto{$\hspace*{\fill}\Box$}
\def\ph{\hat{p}}
\def\Pr{\mbox{Pr}}
\def\expec{\mathbf{E}}
\def\conf{\mathrm{conf}}
\def\rk{\mbox{repair-key}}
\title{MayBMS: A Probabilistic Database System \\[3ex]
User Manual
\\[6ex]
{\small Copyright (c) 2005-2009 \\
The MayBMS Development Group
\\[6ex]
Christoph Koch$^*$, Dan Olteanu$^{**}$, Lyublena Antova$^{*}$, and
Jiewen Huang$^{*,**}$ \\[4ex]
$^*$ Department of Computer Science,
Cornell University, Ithaca, NY \\[1ex]
$^{**}$ Oxford University Computing Laboratory, Oxford, UK}}
\author{}
\date{}
\renewcommand{\baselinestretch}{1.1}
\begin{document}
\maketitle
\tableofcontents
\chapter{Introduction}
\section{What is MayBMS?}
The {\em MayBMS}\/ system (note: MayBMS is read as ``maybe-MS'', like DBMS)
is a complete
probabilistic database management system that leverages robust
relational database technology:
MayBMS is an extension of the Postgres server backend.
MayBMS is open source and the source code
is available under the BSD license at
%
\begin{center}
http://maybms.sourceforge.net
\end{center}
The MayBMS system has been under development since 2005.
While the development has been carried out in an academic environment,
care has been taken to build a robust, scalable system that can be
reliably used in real applications.
%
The academic homepage of the MayBMS project is at
\begin{center}
http://www.cs.cornell.edu/database/maybms/
\end{center}
MayBMS stands alone as a complete probabilistic database management system
that supports a powerful, compositional query language for which nevertheless worst-case efficiency and result quality guarantees can be made.
We are aware of several research prototype probabilistic database management systems that are built as front-end applications of Postgres, but of no other fully integrated and available system. The MayBMS backend is accessible through several APIs, with efficient internal operators for computing and managing probabilistic data.
In summary, MayBMS has the following features:
\begin{itemize}
\item
Full support of all features of PostgreSQL 8.3.3, including unrestricted
query functionality, query optimization, APIs, updates, concurrency control and
recovery, etc.
\item
Essentially no performance loss on PostgreSQL 8.3.3 functionality:
After parsing a query or DML statement,
a fast syntactic check is made to decide
whether the statement uses the extended functionality of MayBMS. If it does
not, the subsequently executed code is exactly that of PostgreSQL 8.3.3.
\item
Support for efficiently creating and updating probabilistic databases,
i.e., uncertain databases in which degrees of belief can be associated
with uncertain data.
\item
A powerful query and update language for processing uncertain data
that gracefully extends SQL with a small number of well-designed
language constructs.
\item
State-of-the-art efficient techniques
for exact and approximate probabilistic inference.
\end{itemize}
\section{Applications}
Database systems for uncertain and probabilistic data promise to have
many applications. Query processing on uncertain data occurs in the
contexts of data warehousing, data integration, and of processing data
extracted from the Web. Data cleaning can be fruitfully approached as
a problem of reducing uncertainty in data and requires the management
and processing of large amounts of uncertain data. Decision support
and diagnosis systems employ hypothetical (what-if) queries.
Scientific databases, which store outcomes of scientific experiments,
frequently contain uncertain data such as incomplete observations or
imprecise measurements. Sensor and RFID data is inherently
uncertain. Applications in the contexts of fighting crime or
terrorism, tracking moving objects, surveillance, and plagiarism
detection essentially rely on techniques for processing and managing
large uncertain datasets. Beyond that, many further potential
applications of probabilistic databases exist and will manifest
themselves once such systems become available.
The MayBMS distribution comes with a number of examples that illustrate
its use in
these application domains. Some of these examples are described in the
tutorial chapter of this manual.
The experiments section at the end of
this manual reports on some performance experiments with MayBMS. Unfortunately,
at the time of writing this, no benchmark for probabilistic database
systems exists, so these experiments are necessarily somewhat ad-hoc.
\section{Acknowledgments}
%MayBMS is an extension of PostgreSQL.
Michaela Goetz, Thomas Jansen and Ali Baran Sari are alumni of the MayBMS team.
%
The MayBMS project was previously supported by
German Science Foundation (DFG) grant KO 3491/1-1 and by funding provided by
the Center for Bioinformatics (ZBI) at Saarland University, Saarbruecken,
Germany. It is currently supported by grant IIS-0812272 of the
US National Science Foundation.
\input{tutorial}
\input{foundations}
\input{language}
\input{system}
\input{codebase}
\input{experiments}
\nop{
\chapter{Planned Extensions}
Planned features for future releases of MayBMS are
\begin{itemize}
\item
The relaxation of some current minor restrictions in the query language.
\item
More efficient confidence computation.
\item
A knowledge compilation operation for conditioning a probabilistic database,
i.e., removing possible worlds that do not satisfy a given constraint.
\item
Continuous probability distributions.
\item
Support for importing graphical models such as Bayesian Networks.
\end{itemize}
} % end nop
\newpage
\appendix
\input{randgraph-queries}
\input{general-randgraph}
\input{tpch-queries}
\bibliographystyle{abbrv}
\bibliography{bibtex}
\end{document}

View File

@ -0,0 +1,51 @@
\chapter{Queries in Random Graph Experiments}
\label{app:randgraph}
\begin{verbatim}
create table node (n integer);
insert into node values (1);
insert into node values (2);
insert into node values (3);
insert into node values (4);
......
insert into node values (n-1);
insert into node values (n); /* n is the number of nodes in the graph */
/* Here we specify the probability that an edge is in the graph. */
create table inout (bit integer, p float);
insert into inout values (1, 0.5); /* probability that edge is in the graph */
insert into inout values (0, 0.5); /* probability that edge is missing */
create table total_order as
(
select n1.n as u, n2.n as v
from node n1, node n2
where n1.n < n2.n
);
/* This table represents all subsets of the total order over
node as possible worlds. We use the same probability -- from
inout -- for each edge, but in principle we could just as
well have a different (independent) probability for each edge.
*/
create table to_subset as
(
repair key u,v
in (select * from total_order, inout)
weight by p
);
create table edge0 as (select u,v from to_subset where bit=1);
select conf() as triangle_prob
from edge0 e1, edge0 e2, edge0 e3
where e1.v = e2.u and e2.v = e3.v and e1.u = e3.u
and e1.u < e2.u and e2.u < e3.v;
select aconf(0.05,0.05) as triangle_prob
from edge0 e1, edge0 e2, edge0 e3
where e1.v = e2.u and e2.v = e3.v and e1.u = e3.u
and e1.u < e2.u and e2.u < e3.v;
\end{verbatim}
\newpage

184
Documents/system.tex Normal file
View File

@ -0,0 +1,184 @@
%\chapter{Design and Implementation of the MayBMS System}
\chapter{MayBMS Internals}
\label{sect:system}
\paragraph{Representations, relational encoding, and query optimization}
%
Our representation system, U-relations, is basically implemented as described earlier, with one small exception. With each pair of columns $V_i$, $D_i$ in the condition, we also store a column $P_i$ for the probability weight of alternative $D_i$ for variable $V_i$, straight from the $W$ relation. While the operations of relational algebra, as observed earlier, do not use probability values, confidence computation does. This denormalization (the extension by $P_i$ columns) removes the need to look up any probabilities in the $W$ table in our exact confidence computation algorithms.
Our experiments show that the relational encoding of positive relational algebra which is possible for U-relations is so simple -- it is a parsimonious transformation, i.e., the number of relational algebra operations is not increased -- that the standard Postgres query optimizer actually does well at finding good query plans (see \cite{AJKO2008}).
\paragraph{Approximate confidence computation}
%
MayBMS implements both an approximation algorithm and several exact algorithms for confidence computation. The approximation algorithm is a combination of the Karp-Luby unbiased estimator for DNF counting \cite{KL1983,KLM1989} in a modified version adapted for confidence computation in probabilistic databases (cf.\ e.g.\ \cite{Koch2008}) and the Dagum-Karp-Luby-Ross optimal algorithm for Monte Carlo estimation \cite{DKLR2000}. The latter is based on sequential analysis and determines the number of invocations of the Karp-Luby estimator needed to achieve the required bound by running the estimator a small number of times to estimate its mean and variance. We actually use the probabilistic variant of a version of the Karp-Luby estimator described in the book \cite{Vazirani2001} which computes fractional estimates that have smaller variance than the zero-one estimates of the classical Karp-Luby estimator.
\paragraph{Exact confidence computation}
\index{Confidence computation, exact}
%
Our exact algorithm for confidence computation is described in \cite{KO2008}. It is based on an extended version of the Davis-Putnam procedure \cite{DP1960} that is the basis of the best exact Satisfiability solvers in AI. Given a DNF (of which each clause is a conjunctive local condition), the algorithm employs a combination of variable elimination (as in Davis-Putnam) and decomposition of the DNF into independent subsets of clauses (i.e., subsets that do not share variables), with cost-estimation heuristics for choosing whether to use the former (and for which variable) or the latter.
%\newcommand{\mystackrel}[2]{\stackrel{#1}{#2}}
%\newcommand{\mystackrel}[2]{\begin{tabular}{c} $#1$ \\ $#2$ \end{tabular}}
\begin{figure}[!]
\[
\begin{tabular}{c}
\begin{tabular}{@{~}l@{~}|@{~}c@{~~}c@{~~}c@{~~}c@{~}}
\hline
$U$ & $V_1$ & $D_1$ & $V_2$ & $D_2$ \\
\hline
& $x$ & 1 & $x$ & 1 \\
& $x$ & 2 & $y$ & 1 \\
& $x$ & 2 & $z$ & 1 \\
& $u$ & 1 & $v$ & 1 \\
& $u$ & 2 & $u$ & 2 \\
\end{tabular}
\\
{~}~{~}
\\
\begin{tabular}{l|ccc}
\hline
$W$ & V & D & P \\
\hline
& $x$ & 1 & .1 \\
& $x$ & 2 & .4 \\
& $x$ & 3 & .5 \\
& $y$ & 1 & .2 \\
& $y$ & 2 & .8 \\
& $z$ & 1 & .4 \\
& $z$ & 2 & .6 \\
& $u$ & 1 & .7 \\
& $u$ & 2 & .3 \\
& $v$ & 1 & .5 \\
& $v$ & 2 & .5 \\
\end{tabular}
\end{tabular}%
\hspace{-2mm}%
\relax\parbox{0.8\textwidth}{\relax%
\[
\pstree[nodesep=1pt,levelsep=10ex,treesep=3.5em]{\TR{\framebox{$\stackrel{0.7578}{\otimes}$}}}
{
\pstree{\TR{\framebox{$\stackrel{0.308}{\oplus}$}}^{\{x,y,z\}}}
{
\TR{\framebox{$\stackrel{1.0}{\emptyset}$}}^{x \stackrel{.1}{\mapsto} 1}
\pstree{\TR{\framebox{$\stackrel{0.52}{\otimes}$}}_{x \stackrel{.4}{\mapsto} 2}}
{
\pstree{\TR{\framebox{$\stackrel{0.2}{\oplus}$}}^{\{y\}}}
{
\TR{\framebox{$\stackrel{1.0}{\emptyset}$}}^{y \stackrel{.2}{\mapsto} 1}
}
\pstree{\TR{\framebox{$\stackrel{0.4}{\oplus}$}}_{\{z\}}}
{
\TR{\framebox{$\stackrel{1.0}{\emptyset}$}}_{z \stackrel{.4}{\mapsto} 1}
}
}
}
\pstree{\TR{\framebox{$\stackrel{0.65}{\oplus}$}}_{\{u,v\}}}
{
\pstree{\TR{\framebox{$\stackrel{0.5}{\oplus}$}}^{\ u \stackrel{.7}{\mapsto} 1}}
{
\TR{\framebox{$\stackrel{1.0}{\emptyset}$}}_{v \stackrel{.5}{\mapsto} 1}
}
\TR{\framebox{$\stackrel{1.0}{\emptyset}$}}_{u \stackrel{.3}{\mapsto} 2}
}
}
\]}
\]
\caption{Exact confidence computation.}
\label{fig:exact-conf}
\end{figure}
\begin{example}\em
Consider the U-relation $U$ representing a nullary table and
the $W$ table of Figure~\ref{fig:exact-conf}.
The local conditions of $U$ are
\[
\Phi = \{ \{x\mapsto 1\}, \{x\mapsto 2, y\mapsto 1\}, \{x\mapsto 2, z\mapsto 1\},
\{u\mapsto 1, v\mapsto 1\}, \{u\mapsto 2\} \}.
\]
The algorithm proceeds recursively. We first choose to exploit the fact that the $\Phi$ can be split into two independent sets, the first using only the variables $\{x, y, z\}$ and the second only using $\{u,v\}$.
We recurse into the first set and eliminate the variable $x$. This requires us to consider two cases, the alternative values 1 and 2 for $x$ (alternative 3 does not have to be considered because in each of the clauses to be considered, $x$ is mapped to either 1 or 2. In the case that $x$ maps to 2, we eliminate $x$ from the set of clauses that are compatible with the variable assignment $x \mapsto 2$, i.e., the set
$\{\{y\mapsto 1\}, \{z\mapsto 1\} \}$, and
can decompose exploiting the independence of the two clauses. Once $y$ and $z$ are eliminated, respectively, the conditions have been reduced to ``true''. The alternative paths of the computation tree, shown in Figure~\ref{fig:exact-conf}, are processed analogously.
On returning from the recursion, we compute the probabilities of the subtrees in the obvious way. For two independent sets $S_1, S_2$ of clauses with probabilities $p_1$ and $p_2$, the probability of $S_1 \cup S_2$ is
\[
1 - (1-p_1)\cdot(1-p_2).
\]
For variable elimination branches,
the probability is the sum of the products of the probabilities of the subtrees and the probabilities of the variable assignments used for elimination.
It is not hard to verify that the probability of $\Phi$, i.e., the confidence in tuple $\tuple{}$,
is $0.7578$.
\punto
\end{example}
Our exact algorithm solves a \#P-hard problem and exhibits exponential running time in the worst case. However, like some other algorithms for combinatorial problems, this algorithm shows a clear easy-hard-easy pattern. Outside a narrow range of variable-to-clause count ratios, it very pronouncedly outperforms the (polynomial-time) approximation techniques \cite{KO2008}.
It is straightforward to extend this algorithm to condition a probabilistic database (i.e., to compute ``assert'') \cite{KO2008}.
\paragraph{Hierarchical queries}
\index{Hierarchical queries}
The tuple-independent databases are those probabilistic databases in
which, for each tuple, a probability can be given such that the tuple
occurs in the database with that probability and the tuples are
uncorrelated. It is known since the work of Dalvi and Suciu
\cite{dalvi07efficient} that there is a class of conjunctive queries,
the hierarchical queries $Q$, for which computing conf($Q$) exactly on
tuple-independent probabilistic databases is feasible in polynomial
time.
In fact, these queries can essentially be computed using SQL queries
that involve several nested aggregate-group-by queries. On the other
hand, it was also shown in \cite{dalvi07efficient} that for any
conjunctive query $Q$ that is not hierarchical, computing conf($Q$) is
\#P-hard with respect to data complexity. Dalvi and Suciu introduce
the notion of {\em safe plans}\/\index{Safe plans} that are at once
certificates that a query is hierarchical and query plans with
aggregation operators that can be used for evaluating the queries.
To deal with hierarchical queries, MayBMS runs SPROUT as part of its
query engine~\cite{OHK2008}. SPROUT extends the early work by Suciu in
three ways. First, the observation is used that in the case that a
query has a safe plan~\cite{dalvi07efficient}, it is not necessary to
use that safe plan for query evaluation. Instead, one can choose any
unrestricted query plan, not only restricted safe plans, for the
computation of the answer tuples; confidence computation is performed
as an aggregation which can be pushed down or pull up past joins in
relational query plans. Second, the aggregation function for
confidence computation is implemented as a special low-level operator
in the query engine. Finally, the fact is exploited that the
\#P-hardness result for any single nonhierarchical query of \cite{dalvi07efficient}
only applies as long as the problem is that of evaluating the query on
an arbitrary probabilistic database of suitable schema. If further
information about permissible databases is available in the form of
functional dependencies that the databases must satisfy, then a larger
class of queries can be processed by our approach~\cite{OHK2008}.
\paragraph{Updates, concurrency control and recovery}
%
As a consequence of our choice of a purely relational representation
system, these issues cause surprisingly little difficulty.
U-relations are just relational tables and updates are just
modifications of these tables that can be expressed using the standard
SQL update operations. While the structure of the rewritings could allow for optimizations in the concurrency and recovery managers, those are currently left to the underlying DBMS.

214
Documents/tpch-queries.tex Normal file
View File

@ -0,0 +1,214 @@
\chapter{Probabilistic TPC-H Queries}
\label{app:tpch}
\textbf{\large{Query 1:}}
\begin{verbatim}
select
l_returnflag,
l_linestatus,
conf()
from
lineitem
where
l_shipdate <= date '1998-09-01'
group by
l_returnflag,
l_linestatus;
\end{verbatim}
\noindent
\textbf{\large{Query 4:}}
\begin{verbatim}
select
o_orderpriority,
conf()
from
orders,
lineitem
where
o_orderdate >= date '1993-07-01'
and o_orderdate < date '1993-10-01'
and l_orderkey = o_orderkey
and l_commitdate < l_receiptdate
group by
o_orderpriority;
\end{verbatim}
\noindent
\textbf{\large{Query 12:}}
\begin{verbatim}
select
l_shipmode,
conf()
from
orders,
lineitem
where
orders.o_orderkey = lineitem.l_orderkey
and (l_shipmode = 'MAIL'
or l_shipmode = 'SHIP')
and l_commitdate < l_receiptdate
and l_shipdate < l_commitdate
and l_receiptdate >= '1992-01-01'
and l_receiptdate < '1999-01-01'
group by
l_shipmode;
\end{verbatim}
\noindent
\textbf{\large{Query 15:}}
\begin{verbatim}
select
s_suppkey,
s_name,
s_address,
s_phone,
conf()
from
supplier,
lineitem
where
s_suppkey = l_suppkey
and l_shipdate >= date '1991-10-10'
and l_shipdate < date '1992-01-10'
group by
s_suppkey,
s_name,
s_address,
s_phone;
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 1:}}
\begin{verbatim}
select
conf()
from
lineitem
where
l_shipdate <= date '1998-09-01';
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 4:}}
\begin{verbatim}
select
conf()
from
orders,
lineitem
where
o_orderdate >= date '1993-07-01'
and o_orderdate < date '1993-10-01'
and l_orderkey = o_orderkey
and l_commitdate < l_receiptdate
group by
o_orderpriority;
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 6:}}
\begin{verbatim}
select
conf()
from
lineitem
where
l_shipdate >= '1994-01-01'
and l_shipdate < '1995-01-01'
and l_discount >= 0.05
and l_discount <= 0.07
and l_quantity < 24;
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 12:}}
\begin{verbatim}
select
conf()
from
orders,
lineitem
where
orders.o_orderkey = lineitem.l_orderkey
and (l_shipmode = 'MAIL'
or l_shipmode = 'SHIP')
and l_commitdate < l_receiptdate
and l_shipdate < l_commitdate
and l_receiptdate >= '1992-01-01'
and l_receiptdate < '1999-01-01'
group by
l_shipmode;
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 14:}}
\begin{verbatim}
select
conf()
from
lineitem,
part
where
l_partkey = p_partkey
and l_shipdate >= date '1995-09-01'
and l_shipdate < date '1995-10-01';
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 15:}}
\begin{verbatim}
select
conf()
from
supplier,
lineitem
where
s_suppkey = l_suppkey
and l_shipdate >= date '1991-10-10'
and l_shipdate < date '1992-01-10';
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 16:}}
\begin{verbatim}
select
conf()
from
partsupp,
part
where
p_partkey = ps_partkey
and p_brand <> 'Brand#45'
and p_type like 'MEDIUM POLISHED%';
\end{verbatim}
\noindent
\textbf{\large{Boolean Version of Query 17:}}
\begin{verbatim}
select
conf()
from
lineitem,
part
where
p_partkey = l_partkey
and p_brand = 'Brand#23'
and p_container = 'MED BOX';
\end{verbatim}
\newpage

905
Documents/tutorial.tex Normal file
View File

@ -0,0 +1,905 @@
\chapter{First Steps}
\section{Installing MayBMS}
\subsubsection{Using the installers}
Installers for MayBMS are available for both Windows and Linux operating systems and can be downloaded at
\url{https://sourceforge.net/projects/maybms/}
After you have obtained a copy of the installer, start it and follow the instructions.
\subsubsection{Compiling from scratch}
If the prepackaged installers do not work for you you can download the MayBMS's source code and compile it.
A copy is available for download at
\url{https://sourceforge.net/projects/maybms/}
Alternatively, you can obtain the latest snapshot from the repository by issuing the following command:
\begin{verbatim}
cvs -z3 -d:pserver:anonymous@maybms.cvs.sourceforge.net:/cvsroot/maybms
co -P maybms
\end{verbatim}
(on a single line).
This creates a directory maybms/ with a subdirectory postgresql-8.3.3/
that contains the source code of the system.
To compile and install MayBMS, just follow the instructions for installing
PostgreSQL 8.3.3. The latter is documented at
\medskip
\url{http://www.postgresql.org/docs/8.3/interactive/installation.html}.
%\medskip
%
%\noindent
%See
%
%\medskip
%
%\url{http://www.postgresql.org/docs/8.3/interactive/install-short.html}
%
%\medskip
%
%\noindent
%for a short version of the installation instructions.
\section{Running MayBMS}
After you have installed MayBMS (in either of the described ways), you can
set up a database and start using it.
Creating and accessing databases is the same as in PostgreSQL 8.3.3. Follow the links
\medskip
\url{http://www.postgresql.org/docs/8.3/interactive/tutorial-createdb.html}
\medskip
\noindent
and
\medskip
\url{http://www.postgresql.org/docs/8.3/interactive/tutorial-accessdb.html}.
See next section for short instructions on how to run MayBMS.
\section{Short Instructions}
Alternatively, you can follow the following set of instructions.\footnote{If
you do know how to compile and install Postgres, or have followed the
installation instructions above, you can ignore this.}
On most UNIX machines, Postgres
is by default installed in the directory /usr/local/pgsql/
and run under user ``postgres''.
MayBMS uses the same defaults.
If you prefer to install MayBMS
in your home directory and run it with your user privileges, you do not
need root privileges to install it. Proceed as follows:
Change the path ac\_default\_prefix in line 279 of the file
maybms/postgresql-8.3.3/configure to a path into your home directory
(e.g. /home/myname/pgsql/ if your home directory is /home/myname/).
To compile, install, and start the Postgres server, execute the
following statements:
\begin{verbatim}
cd maybms/postgresql-8.3.3/
./configure
make
make install
cd
pgsql/bin/initdb -D mydbname
pgsql/bin/pg_cql start -D mydbname
\end{verbatim}
Note: In these minimal instructions, we did not create a special database
using createdb (so the default, template1, has to be used), and error
messages are written to the console.
Now MayBMS is available for connections from applications.
For example, the Postgres command line interface psql
in which you can issue MayBMS queries
and data manipulation language statements is started with
\begin{verbatim}
psql template1
\end{verbatim}
Now you can enter the examples from, e.g., the following tutorial.
The psql program is terminated using the command ``$\backslash$q''.
The database server is stopped with
\begin{verbatim}
pgsql/bin/pg_ctl stop -D mydbname
\end{verbatim}
\subsubsection{Remark}
Since Postgres and MayBMS use the same process identifiers,
MayBMS and Postgres cannot run concurrently on the same machine.
If you start Postgres when MayBMS is already running
(or vice versa), there will be an error message stating that Postgres is
already running. Since MayBMS always identifies itself as Postgres,
standard Postgres applications and middleware can run on MayBMS.
\chapter{Probabilistic Databases}
We first give an informal definition of probabilistic databases, followed
by a formal definition.
%You should be able to do fine by just reading the
%first if the latter is too mathematical.
\section{Informal Definition}
Given a relational database schema (i.e., the structural information usually
specified by SQL CREATE TABLE statements).
A probabilistic database is a finite set of {\em possible worlds}\/, where each
possible world has a weight greater than 0 but no greater than 1
such that the sum of the weights
of all the worlds is one.
Each possible world is a relational database over the given
schema. That is, the schema is common to all possible worlds.
Possible worlds are a means of expressing uncertainty.
\begin{itemize}
\item
In a frequentist interpretation, the probabilistic database represents the
possible outcomes of a random experiment, the outcomes of which are relational
databases (or can be conveniently represented as relational databases).
The probability weight of a possible world is (the limit of) the relative
frequency of that possible world occurring as outcome of the random experiment
over a large number of trials.
\item
In a Bayesian interpretation, one of the possible worlds is
``true'', but we do not know which one, and the probabilities represent
degrees of belief in the various possible worlds.
\end{itemize}
Note that these interpretations of probabilistic databases are completely
standard in probability theory (and formalized via the notion of {\em probability spaces}). The only aspect particular to probabilistic
databases is the fact that possible worlds are relational databases.
Note that the idea of a probabilistic database as a set of possible worlds
is only the conceptual model. The physical representation of the
set of possible worlds in the MayBMS system is quite different
(see Section~\ref{sect:representation}) and allows for the efficient and
space-saving (compressed) representation of very large sets of possible
worlds.
\section{Formal Definition}
The following is a standard definition from probability theory and
shall only be recalled to demonstrate the close connection of
probabilistic databases to classical concepts in mathematics.
\begin{definition}\em
A {\em finite probability space}\/ is a triple $(\Omega, {\cal F}, \Pr)$ where
\begin{itemize}
\item
$\Omega$ is a finite set called the {\em sample space}\/,
\item
${\cal F} = 2^\Omega$ is the set of
subsets of $\Omega$ (these subsets are called {\em events}; the one-element subsets $\{\omega\}$ are called atomic events), and
\item
$\Pr$ is a
{\em probability measure}\/, i.e., a function
that maps each element $\omega \in \Omega$ (i.e., each atomic event)
to a number between 0 and 1 such that
\[
\sum_{\omega \in \Omega} \Pr[\omega] = 1
\]
and that maps
each (nonatomic) event $E \in ({\cal F} \;\backslash\; \Omega)$ to
$\sum_{\omega \in E} Pr[\omega]$.
\punto
\end{itemize}
\end{definition}
Formally,
a {\em probabilistic database}\/ over a relational database schema $sch$
is a finite probability space $(\Omega, {\cal F} = 2^\Omega, \Pr)$ with an associated
function $I$ (for {\em instance}) that maps each
$\omega \in \Omega$ to a relational database
over schema $sch$.
We call the elements $\omega$ of $\Omega$ the {\em possible worlds}\/
of the probabilistic database.
We can identify events with Boolean queries $Q$ that are true on a subset of
$\Omega$. Of course, the probability of such an event is given by
\[
\Pr[Q] = \sum_{\omega \in \Omega \;:\; Q(I(\omega))=true} \Pr[\omega].
\]
One particular type of event is membership of a given tuple $\vec{t}$
in the result of a (nonboolean) query, i.e., an event
\[
\{\omega \in \Omega \;:\; \vec{t} \in Q(I(\omega)) \}.
\]
The probability of this event is called the
{\em tuple confidence}\/ for tuple $\vec{t}$.
A {\em random variable} $X$ is a function from $\Omega$ to a set $D$
(the ``values'' of the random variable).
We can associate each expression $X=x$, where $x \in D$, with an event
\[
\{ \omega \in \Omega \mid X(\omega) = x \}.
\]
Again, this is the usual notion from probability theory.
\section{An Example}
Consider a finite probability space with
\[
\Omega = \{
\omega_{rain, wet},
\omega_{\neg rain, wet},
\omega_{rain, \neg wet},
\omega_{\neg rain, \neg wet}
\}
\]
and
$\Pr[\omega_{rain, wet}] = 0.35$,
$\Pr[\omega_{rain, \neg wet}] = 0.05$,
$\Pr[\omega_{\neg rain, wet}] = 0.1$, and
$\Pr[\omega_{\neg rain, \neg wet}] = 0.5$.
Let $Wet$ be the event $\{ \omega_{rain, wet}, \omega_{\neg rain, wet} \}$.
Then $\Pr[Wet] = 0.35+0.1 = 0.45$.
%
We define Boolean random variables Wet and Rain as follows:
\[
Wet = \{
\omega_{rain, wet} \mapsto true,
\omega_{\neg rain, wet} \mapsto true,
\omega_{rain, \neg wet} \mapsto false,
\omega_{\neg rain, \neg wet} \mapsto false
\};
\]\[
Rain = \{
\omega_{rain, wet} \mapsto true,
\omega_{\neg rain, wet} \mapsto false,
\omega_{rain, \neg wet} \mapsto true,
\omega_{\neg rain, \neg wet} \mapsto false
\}.
\]
Then, $\Pr[Wet=true]$ is again $0.45$.
The first example of the following tutorial chapter captures this
example in the framework of the MayBMS query and update language.
\chapter{Tutorial}
This tutorial introduces the main features of MayBMS in an informal
way. The full examples can be run using the psql command line interface.
\section{A Really Simple Example}
We start by creating a simple table using SQL commands.
The table encodes that we see rain and wet ground with probability 0.4,
no rain but wet ground with probability 0.1, and
no rain and dry ground with probability 0.5.
%
\begin{verbatim}
create table R (Dummy varchar, Weather varchar,
Ground varchar, P float);
insert into R values ('dummy', 'rain', 'wet', 0.35);
insert into R values ('dummy', 'rain', 'dry', 0.05);
insert into R values ('dummy', 'no rain', 'wet', 0.1);
insert into R values ('dummy', 'no rain', 'dry', 0.5);
select * from R;
dummy | weather | ground | p
-------+---------+--------+------
dummy | rain | wet | 0.35
dummy | rain | dry | 0.05
dummy | no rain | wet | 0.1
dummy | no rain | dry | 0.5
(4 rows)
\end{verbatim}
Table R is a completely standard relational database table,
created using standard SQL statement. One of the columns, P, stores
probabilities, but to the system these are only numbers without any particular
meaning so far.
The following statement creates a probabilistic database table S:
%
\begin{verbatim}
create table S as
repair key Dummy in R weight by P;
\end{verbatim}
The repair-key statement is one of the extensions of the MayBMS query
language over standard SQL, and it associates a special meaning to the
values taken from the ``weight by'' column.
The statement creates a probability space with a sample space consisting
of three possible databases -- each one consisting just of one tuple
from $R$ -- with an associated probability measure given by the P column.
There are at least two natural interpretations of this example,
one using random variables and one using a possible worlds semantics.
%
\begin{itemize}
\item
We can think of S as a table specifying the joint probability distribution
of two discrete random variables Weather (with values ``rain'' and ``no rain'')
and Ground (with values ``wet'' and ``dry'').
\item
Alternatively, there are three possible worlds. Each of these worlds
is a relation S with a single tuple from R. The probability of such a world is
the value given for the tuple in column P of R.
\end{itemize}
We can compute the probabilities Pr[Ground='wet'] and
Pr[Weather='rain' and Ground='wet'] as follows
using the MayBMS conf() aggregate (which stands for ``confidence'').
%
\begin{verbatim}
create table Wet as
select conf() as P from S where Ground = 'wet';
select * from Wet;
p
------
0.45
(1 row)
create table Rain_and_Wet as
select conf() as P from S
where Weather = 'rain' and Ground = 'wet';
select * from Rain_and_Wet;
p
------
0.35
(1 row)
\end{verbatim}
The conditional probability
Pr[Weather='rain' $|$ Ground='wet'] can be computed as the ratio
\[
\mbox{Pr[Weather='rain' and Ground='wet'] / Pr[Ground='wet'].}
\]
%
\begin{verbatim}
select R1.P/R2.P as Rain_if_Wet from Rain_and_Wet R1, Wet R2;
rain_if_wet
-------------
0.777777778
(1 row)
\end{verbatim}
Since conf() is an aggregate, we can compute the marginal probability
table for random variable Ground as
\begin{verbatim}
select Ground, conf() from S group by Ground;
ground | conf
--------+------
dry | 0.55
wet | 0.45
(2 rows)
\end{verbatim}
\section{Example: Triangles in Random Graphs}
\label{sec:randgraph}
In this tutorial, we compute the probability that a triangle occurs
in a random graph
with $k$ named (and thus distinguishable) nodes.
That is, we ask for the probability that an undirected
graph, chosen uniformly at random among the graphs of $k$ nodes,
contains at least one triangle.
This is equivalent to computing the count $n$ of graphs
that contain a triangle among the $2^{k \cdot (k-1)/2}$ undirected graphs of
$k$ distinguished nodes.
Indeed, an undirected graph of $k$ nodes has at most
$k \cdot (k-1)/2$ edges, and we obtain all the graphs over the given
$k$ nodes by considering all subsets of this maximal set of edges.
We start by creating a unary ``node'' relation, say with five nodes.
We do this with the standard SQL ``create table'' and ``insert'' commands,
which behave as usual in a relational database system.
\begin{verbatim}
create table node (n integer);
insert into node values (1);
insert into node values (2);
insert into node values (3);
insert into node values (4);
insert into node values (5);
\end{verbatim}
Next we create the total order over the nodes, i.e., a binary relation
with exactly one edge between any two nodes. This is again a standard
SQL ``create table'' statement where we compute the tuples to be inserted
with a standard SQL query over the ``node'' relation.
%
\begin{verbatim}
create table total_order as
(
select n1.n as u, n2.n as v
from node n1, node n2
where n1.n < n2.n
);
\end{verbatim}
We create a table to represent that each edge is either in the
graph (bit=1) or missing (bit=0).
%
\begin{verbatim}
create table inout (bit integer);
insert into inout values (1);
insert into inout values (0);
\end{verbatim}
The following operation introduces uncertainty into the database and
creates a probabilistic database with $2^{5 \cdot 4/2} = 1024$ possible
worlds, one for each possible edge relation over the five nodes
(=subset of the total order).
We do this by a query operation ``repair key'' that for each edge
of the total order nondeterministically chooses whether the edge is in
the graph (bit=1) or not. (That is, since we do not indicate at what
probability either of the two alternatives for bit is to be chosen, the
system makes the decision {\em uniformly}\/ at random, choosing bit=1 with
probability 0.5.) The resulting probabilistic database
represents all the alternative edge relations as possible worlds.
%
\begin{verbatim}
create table to_subset as
(
repair key u,v in (select * from total_order, inout)
);
\end{verbatim}
The ``repair key'' operation is the most difficult to understand and
at the same time the most interesting addition to SQL that MayBMS provides.
Conceptually, ``repair key'' takes a set of attributes $\vec{K}$
and a relation $R$ (in this case the relational
product of total\_order and inout)
as arguments and nondeterministically chooses a maximal repair
of key $\vec{K}$ in $R$, that is, it removes a minimal set of tuples from
$R$ such that $\vec{K}$ ceases to violate a key constraint on columns $u, v$.
In this case, there are exactly two tuples for each pair $(u,v)$, namely
$(u,v,1)$ and $(u,v,0)$, and repair key chooses exactly one of them.
The consequence is that, overall, the operation nondeterministically
chooses a subset of the set of all edges. It chooses from these subsets
uniformly. The ``repair key'' operation accepts an additional argument that
allows us to assign nonuniform probabilities to the possible choices, but
in this case we do want uniform probabilities.
We have now created a probabilistic database. Conceptually, queries
and updates are evaluated in all possible worlds in parallel. Viewed differently, there is only one to\_subset relation (but we do not know which one), and
we continue to run queries and updates on this uncertain relation.
To actually create the edge relation, we select those tuples that have
bit=1 and compute their symmetric closure (to really represent an undirected
graph).
%
\begin{verbatim}
create table edge0 as (select u,v from to_subset where bit=1);
create table edge as (select * from edge0);
insert into edge (select v as u, u as v from edge0);
\end{verbatim}
Now we can compute the probability that the chosen graph has a triangle
as
%
\begin{verbatim}
select conf() as triangle_prob
from edge e1, edge e2, edge e3
where e1.v = e2.u and e2.v = e3.u and e3.v=e1.u
and e1.u <> e2.u and e1.u <> e3.u and e2.u <> e3.u;
\end{verbatim}
where the conf aggregate computes the probability (``confidence'') that
the query given by the from-where statement returns a nonempty result.
This results in
%
\begin{verbatim}
triangle_prob
---------------
0.623355
(1 row)
\end{verbatim}
This is the correct probability: out of the 1024 possible
graphs of five nodes, 636 have a triangle, and $636/1024 \approx .623355$.
Indeed, the query
%
\begin{verbatim}
select *
from edge e1, edge e2, edge e3
where e1.v = e2.u and e2.v = e3.u and e3.v=e1.u
and e1.u <> e2.u and e1.u <> e3.u and e2.u <> e3.u;
\end{verbatim}
%
computes at least one tuple in exactly those possible worlds (=on those
graphs) that have a triangle.
The conf() aggregate applied to this query conceptually
computes the sum of the probability
weights of the worlds in which the query has a nonempty result.
(The actual implementation does not naively iterate over possible
worlds, because this would be very inefficient.)
A more efficient implementation of the same query starts from the
``edge0'' relation:
%
\begin{verbatim}
select conf() as triangle_prob
from edge0 e1, edge0 e2, edge0 e3
where e1.v = e2.u and e2.v = e3.v and e1.u = e3.u
and e1.u < e2.u and e2.u < e3.v;
\end{verbatim}
Finally, an even more efficient implementation uses the
aconf$(\epsilon, \delta)$ aggregate
to compute an $(\epsilon, \delta)$-approximation of the probability,
i.e., the probability that the computed value $\hat{p}$ returned by aconf
deviates from the
correct probability $p$ by more than $\epsilon \cdot p$ is less than $\delta$.
%
\begin{verbatim}
select aconf(.05,.05) as triangle_prob
from edge0 e1, edge0 e2, edge0 e3
where e1.v = e2.u and e2.v = e3.v and e1.u = e3.u
and e1.u < e2.u and e2.u < e3.v;
\end{verbatim}
This result may be somewhat off, but the probability that the error is greater
than 5\% is less than 5\%.
Note that in the example we have seen only two extensions of SQL, ``repair
key'' and ``[a]conf''. The good news is that this is essentially
all there is. SQL extended by just these two features allows for very powerful
queries, including the computation of conditional probability tables,
maximum likelihood estimates, maximum-a-posteriori, Bayesian learning,
and much more.
\section{Example: Skills Management}
The following example demonstrates that probabilistic databases can be useful
even if the input data is not uncertain and the desired result is a classical
relational table. We define a hypothetical query in the context of skills
management. Assume we are given a classical relational database with two
tables, one, CE, stores possible takeover targets -- companies that we might
decide to buy with the employees that work in these companies.
The second table, ES, stores each employee's skills.
Here is an example database. We can build this database in MayBMS with the
standard SQL ``create table'' and ``insert'' statements.
\[
\begin{tabular}{l@{~}|@{~}l@{~~}l}
CE & CID & EID \\
\hline
& Google & Bob \\
& Google & Joe \\
& Yahoo & Dan \\
& Yahoo & Bill \\
& Yahoo & Fred \\
\end{tabular}
\hspace{2mm}
\begin{tabular}{l@{~}|@{~}l@{~~}l}
ES & EID & Skill \\
\hline
& Bob & Web \\
& Joe & Web \\
& Dan & Java \\
& Dan & Web \\
& Bill & Search \\
& Fred & Java \\
\end{tabular}
\]
Now suppose that we want to buy exactly one of those companies, and
we expect exactly one employee to leave as a result of the takeover.
Which skills can we gain for certain?
We express this query in two steps. First we randomly choose a
company to buy and an employee who leaves, and compute the remaining
employees in the chosen company. We obtain this uncertain table using the
following query:
%
\begin{verbatim}
create table RemainingEmployees as
select CE.cid, CE.eid
from CE,
(repair key dummy
in (select 1 as dummy, * from CE)) Choice
where CE.cid = Choice.cid
and CE.eid <> Choice.eid;
\end{verbatim}
Note that the probabilistic database thus created contains five possible
worlds (since there are five tuples in CE), with a uniform probability
distribution. Not all these worlds have the same number of tuples: If we chose
Google and Bob, the world contains one tuple, Google and Joe. If we choose
Yahoo and Dan, the world contains two tuples, (Yahoo, Bill) and (Yahoo, Fred).
Now we compute which skills we gain for certain:
\begin{verbatim}
create table SkillGained as
select Q1.cid, Q1.skill, p1, p2, p1/p2 as p
from (select R.cid, ES.skill, conf() as p1
from RemainingEmployees R, ES
where R.eid = ES.eid
group by R.cid, ES.skill) Q1,
(select cid, conf() as p2
from RemainingEmployees
group by cid) Q2
where Q1.cid = Q2.cid;
select cid, skill from SkillGained where p=1;
\end{verbatim}
The result is the table
\begin{center}
\begin{tabular}{ll}
CID & Skill \\
\hline
Google & Web \\
Yahoo & Java \\
\end{tabular}
\end{center}
indicating that if we buy Google, we gain the skill ``Web'' for certain, and
if we buy Yahoo, we gain the skill ``Java'' for certain.
It is worth looking at the auxiliary table SkillGained:
\begin{center}
\begin{tabular}{l|l@{~~}l@{~~}l@{~~}l@{~~}l}
SkillGained & CID & Skill & p1 & p2 & p \\
\hline
& Google & Web & 2/5 & 2/5 & 1 \\
& Yahoo & Java & 3/5 & 3/5 & 1 \\
& Yahoo & Web & 2/5 & 3/5 & 2/3 \\
& Yahoo & Search & 2/5 & 3/5 & 2/3 \\
\end{tabular}
\end{center}
This table consists of the tuples $(x,y, p1, p2, p)$ such that
\begin{itemize}
\item
$x$ is a company,
\item
$y$ is a skill,
\item
$p1$ is the probability that the chosen company is $x$ and the skill
$y$ is gained (e.g., for $x$=Yahoo and $y$=Web, this is true in two of the
five possible worlds),
\item
$p2$ is the probability that $x$ is the chosen company
(e.g., for $x$=Yahoo, this is true in three of the five possible worlds), and
\item
$p=p1/p2$ is the probability that skill $y$ is gained if company $x$ is bought
(e.g., for $x$=Yahoo and $y$=Web, the probability is 2/3: of the three possible
worlds in which Yahoo was bought, only two worlds guarantee that the skill
Web is gained).
\end{itemize}
Thus, indeed, if we select those tuples of SkillGained for which $p=1$, we
obtain the desired pairs of companies and skills -- those skills that we
obtain for certain if we buy a company.
\section{Data Cleaning}
The following example is in the domain of data cleaning. Consider a
census in which a number of individuals complete forms, that are subsequently
digitized using an OCR system that will in some cases indicate a number
of alternative readings, together with probabilities.
For simplicity, let us assume that the forms only ask for a social security
number (SSN).
For example, if two individuals complete their forms and the OCR system
recognizes the SSN of the first to be either 185 (with probability .4) or
785 and the SSN of the second to be either 185 (with probability .7) or
186, we store this information in a probabilistic database constructed as
follows:
%
\begin{verbatim}
create table Census_SSN_0 (tid integer, ssn integer, p float);
insert into Census_SSN_0 values (1, 185, .4);
insert into Census_SSN_0 values (1, 785, .6);
insert into Census_SSN_0 values (2, 185, .7);
insert into Census_SSN_0 values (2, 186, .3);
create table Census_SSN as
repair key tid in Census_SSN_0 weight by p;
\end{verbatim}
We can view the alternatives and their probability weights by the following
query:
\begin{verbatim}
select tid, ssn, conf() as prior
from Census_SSN
group by tid, ssn;
tid | ssn | prior
-----+-----+-------
1 | 185 | 0.4
1 | 785 | 0.6
2 | 185 | 0.7
2 | 186 | 0.3
\end{verbatim}
We can determine the probability that at least one individual has any
particular SSN (assuming that the OCR system did not miss the correct
SSN as an alternative) using the following query:
\begin{verbatim}
select ssn, conf() as ssn_prior
from Census_SSN
group by ssn;
ssn | ssn_prior
-----+-----------
185 | 0.82
186 | 0.3
785 | 0.6
\end{verbatim}
Indeed, the probability that at least one individual has SSN 185 is
$1 - .6 \cdot .3 = .82$.
We now perform data cleaning using a single integrity constraint, namely
that no two individuals can have the same ssn.
Conceptually, we want to exclude worlds that violate the functional dependency
\[
ssn \rightarrow tid,
\]
i.e., the constraint that ssn must be a key for the relation.
We start by computing an auxiliary relation that
computes, in each possible worlds, the ssn values that violate the
integrity constraint.
\begin{verbatim}
create table FD_Violations as
select S1.ssn
from Census_SSN S1, Census_SSN S2
where S1.tid < S2.tid and S1.ssn = S2.ssn;
\end{verbatim}
Note that two tuples violate the constraint if they have the same ssn
but different tid. We express this in the above query using a slightly
changed condition: (S1.tid $<$ S2.tid and S1.ssn = S2.ssn) instead of
(S1.tid $<>$ S2.tid and S1.ssn = S2.ssn). However, both conditions
select the same set of distinct ssn values that violate the integrity
constraint.
This query computes the uncertain table that holds 185 in the world in
which both forms have ssn value 185. In all other worlds it is empty.
Next we compute an auxiliary relation which computes, for each
SSN that occurs in at least one world in which an FD is violated,
the sum of the weights of those worlds in
which the SSN occurs and an FD is violated.
\begin{verbatim}
create table FD_Violations_by_ssn as
(
select S.ssn, conf() as p
from FD_Violations V,
Census_SSN S
group by S.ssn
);
\end{verbatim}
Next we compute the conditional probability table
\begin{verbatim}
create table TidSSNPosterior as
select Q1.tid, Q1.ssn, p1, p2, p3,
cast((p1-p2)/(1-p3) as real) as posterior
from
(
select tid, ssn, conf() as p1
from Census_SSN
group by tid, ssn
) Q1,
(
(select ssn, p as p2 from FD_Violations_by_ssn)
union
(
(select ssn, 0 as p2 from Census_SSN_0)
except
(select possible ssn, 0 as p2 from FD_Violations_by_ssn)
)
) Q2,
(
select conf() as p3
from FD_Violations
) Q3
where Q1.ssn = Q2.ssn;
select * from TidSSNPosterior;
tid | ssn | p1 | p2 | p3 | posterior
-----+-----+-----+------+------+-----------
1 | 185 | 0.4 | 0.28 | 0.28 | 0.166667
1 | 785 | 0.6 | 0 | 0.28 | 0.833333
2 | 185 | 0.7 | 0.28 | 0.28 | 0.583333
2 | 186 | 0.3 | 0 | 0.28 | 0.416667
\end{verbatim}
This table stores, for each pair of form tid and ssn, the posterior probability
that the individual who completed the form tid has the social security number
ssn given that no two individuals can have the same ssn.
We can compute, for each form, the maximum-a-posteriori ssn (the most likely
ssn given the evidence specified by the integrity constraint) as
\begin{verbatim}
select tid, argmax(ssn, posterior) as map
from TidSSNPosterior
group by tid
order by tid;
tid | map
-----+-----
1 | 785
2 | 185
\end{verbatim}
In a sense, these map values are the locally best values that we could decide
upon for each uncertain answer in our census database. Note, however, that,
if we always choose the map value, we may sometimes create a database that
again violates the integrity constraints used for data cleaning.
This would have been the case if we had indicated probability .9 for both
185 alternatives in the input database.
A further example that computes conditional probabilities and MAP values
in a different context can be
found in Chapter~\ref{sect:ql} (Example~\ref{ex:coins_sql}).

192
apps/nba/data/Fitness.txt Executable file
View File

@ -0,0 +1,192 @@
Kobe Bryant|Fit for Match
Pau Gasol|Fit for Match
Andrew Bynum|Fit for Match
Lamar Odom|Fit for Match
Derek Fisher|Fit for Match
Trevor Ariza|Slightly Injured
Jordan Farmar|Fit for Match
Sasha Vujacic|Fit for Match
Luke Walton|Fit for Match
Josh Powell|Fit for Match
Shannon Brown|Fit for Match
Didier Ilunga-Mbenga|Fit for Match
Paul Pierce|Fit for Match
Ray Allen|Fit for Match
Kevin Garnett|Slightly Injured
Rajon Rondo|Slightly Injured
Eddie House|Fit for Match
Kendrick Perkins|Slightly Injured
Tony Allen|Fit for Match
Leon Powe|Fit for Match
Glen Davis|Slightly Injured
Mikki Moore|Fit for Match
Stephon Marbury|Slightly Injured
Brian Scalabrine|Fit for Match
Dirk Nowitzki|Fit for Match
Jason Terry|Fit for Match
Josh Howard|Fit for Match
Jason Kidd|Slightly Injured
Brandon Bass|Fit for Match
Jose Barea|Fit for Match
Antoine Wright|Fit for Match
Erick Dampier|Fit for Match
James Singleton|Fit for Match
Devean George|Fit for Match
Ryan Hollins|Fit for Match
Matt Carroll|Fit for Match
Devin Harris|Seriously Injured
Vince Carter|Fit for Match
Brook Lopez|Fit for Match
Keyon Dooling|Slightly Injured
Jarvis Hayes|Fit for Match
Yi Jianlian|Fit for Match
Bobby Simmons|Fit for Match
Ryan Anderson|Fit for Match
Chris Douglas-Roberts|Fit for Match
Josh Boone|Slightly Injured
Trenton Hassell|Seriously Injured
Eduardo Najera|Fit for Match
Yao Ming|Fit for Match
Ron Artest|Fit for Match
Tracy McGrady|Slightly Injured
Luis Scola|Fit for Match
Aaron Brooks|Fit for Match
Von Wafer|Slightly Injured
Carl Landry|Fit for Match
Kyle Lowry|Slightly Injured
Shane Battier|Slightly Injured
Brent Barry|Slightly Injured
Brian Cook|Fit for Match
Chuck Hayes|Fit for Match
Al Harrington|Fit for Match
Nate Robinson|Fit for Match
David Lee|Fit for Match
Wilson Chandler|Fit for Match
Larry Hughes|Seriously Injured
Chris Duhon|Fit for Match
Quentin Richardson|Fit for Match
Danilo Gallinari|Fit for Match
Chris Wilcox|Seriously Injured
Jared Jeffries|Fit for Match
Mouhamed Sene|Fit for Match
Cheikh Samb|Fit for Match
Rudy Gay|Fit for Match
OJ Mayo|Fit for Match
Marc Gasol|Seriously Injured
Hakim Warrick|Fit for Match
Mike Conley|Seriously Injured
Darrell Arthur|Fit for Match
Darko Milicic|Slightly Injured
Quinton Ross|Fit for Match
Darius Miles|Fit for Match
Marko Jaric|Fit for Match
Greg Buckner|Fit for Match
Hamed Haddadi|Fit for Match
Andre Iguodala|Fit for Match
Andre Miller|Fit for Match
Thaddeus Young|Fit for Match
Elton Brand|Fit for Match
Louis Williams|Fit for Match
Willie Green|Slightly Injured
Marreese Speights|Fit for Match
Samuel Dalembert|Seriously Injured
Donyell Marshall|Fit for Match
Reggie Evans|Fit for Match
Royal Ivey|Fit for Match
Theo Ratliff|Fit for Match
Chris Paul|Slightly Injured
David West|Fit for Match
Predrag Stojakovic|Fit for Match
Rasual Butler|Fit for Match
James Posey|Fit for Match
Tyson Chandler|Fit for Match
Devin Brown|Fit for Match
Hilton Armstrong|Fit for Match
Julian Wright|Fit for Match
Morris Peterson|Seriously Injured
Antonio Daniels|Slightly Injured
Sean Marks|Fit for Match
Tony Parker|Slightly Injured
Tim Duncan|Fit for Match
Manu Ginobili|Slightly Injured
Roger Mason|Fit for Match
Drew Gooden|Fit for Match
Michael Finley|Fit for Match
Matt Bonner|Fit for Match
George Hill|Slightly Injured
Ime Udoka|Slightly Injured
Kurt Thomas|Fit for Match
Malik Hairston|Fit for Match
Bruce Bowen|Fit for Match
Ben Gordon|Fit for Match
John Salmons|Fit for Match
Derrick Rose|Fit for Match
Luol Deng|Fit for Match
Brad Miller|Fit for Match
Tyrus Thomas|Fit for Match
Kirk Hinrich|Slightly Injured
Joakim Noah|Fit for Match
Tim Thomas|Slightly Injured
Aaron Gray|Fit for Match
Lindsey Hunter|Fit for Match
Anthony Roberson|Fit for Match
Carmelo Anthony|Fit for Match
Chauncey Billups|Slightly Injured
JR Smith|Fit for Match
Nene Nene|Fit for Match
Kenyon Martin|Fit for Match
Linas Kleiza|Seriously Injured
Chris Andersen|Fit for Match
Dahntay Jones|Fit for Match
Anthony Carter|Fit for Match
Renaldo Balkman|Fit for Match
Johan Petro|Fit for Match
Jason Hart|Slightly Injured
Al Jefferson|Fit for Match
Randy Foye|Fit for Match
Ryan Gomes|Fit for Match
Kevin Love|Fit for Match
Craig Smith|Fit for Match
Mike Miller|Slightly Injured
Sebastian Telfair|Fit for Match
Rodney Carney|Fit for Match
Corey Brewer|Fit for Match
Bobby Brown|Fit for Match
Kevin Ollie|Fit for Match
Brian Cardinal|Slightly Injured
Richard Hamilton|Fit for Match
Allen Iverson|Fit for Match
Tayshaun Prince|Fit for Match
Rodney Stuckey|Fit for Match
Rasheed Wallace|Fit for Match
Antonio McDyess|Slightly Injured
Will Bynum|Fit for Match
Jason Maxiell|Fit for Match
Arron Afflalo|Fit for Match
Kwame Brown|Fit for Match
Walter Herrmann|Fit for Match
Amir Johnson|Fit for Match
Brandon Roy|Slightly Injured
LaMarcus Aldridge|Slightly Injured
Travis Outlaw|Fit for Match
Steve Blake|Fit for Match
Rudy Fernandez|Fit for Match
Greg Oden|Fit for Match
Joel Przybilla|Fit for Match
Nicolas Batum|Fit for Match
Sergio Rodriguez|Fit for Match
Jerryd Bayless|Fit for Match
Channing Frye|Fit for Match
Shavlik Randolph|Fit for Match
Danny Granger|Fit for Match
Mike Dunleavy|Fit for Match
T.J. Ford|Fit for Match
Troy Murphy|Fit for Match
Marquis Daniels|Fit for Match
Jarrett Jack|Slightly Injured
Brandon Rush|Fit for Match
Roy Hibbert|Fit for Match
Rasho Nesterovic|Fit for Match
Jeff Foster|Fit for Match
Stephen Graham|Seriously Injured
Travis Diener|Fit for Match

File diff suppressed because it is too large Load Diff

80
apps/nba/data/Matches.txt Executable file
View File

@ -0,0 +1,80 @@
LA Lakers|@ Milwaukee
LA Lakers|vs Houston
LA Lakers|vs LA Clippers
LA Lakers|@ Sacramento
LA Lakers|vs Denver
Boston Celtics|vs Charlotte
Boston Celtics|vs Atlanta
Boston Celtics|vs New Jersey
Boston Celtics|vs Miami
Boston Celtics|@ Cleveland
Dallas Mavericks|vs Miami
Dallas Mavericks|@ Memphis
Dallas Mavericks|vs Phoenix
Dallas Mavericks|vs Utah
Dallas Mavericks|vs New Orleans
New Jersey Nets|vs Detroit
New Jersey Nets|@ Chicago
New Jersey Nets|vs Philadelphia
New Jersey Nets|@ Boston
New Jersey Nets|@ Detroit
Houston Rockets|@ Phoenix
Houston Rockets|@ LA Lakers
Houston Rockets|vs Portland
Houston Rockets|vs Orlando
Houston Rockets|@ Sacramento
New York Knicks|vs Toronto
New York Knicks|@ Toronto
New York Knicks|@ Chicago
New York Knicks|vs Detroit
New York Knicks|@ Orlando
Memphis Grizzlies|vs Washington
Memphis Grizzlies|vs Dallas
Memphis Grizzlies|@ Milwaukee
Memphis Grizzlies|vs Portland
Memphis Grizzlies|@ Orlando
Philadelphia 76ers|vs Milwaukee
Philadelphia 76ers|vs Detroit
Philadelphia 76ers|@ New Jersey
Philadelphia 76ers|@ Charlotte
Philadelphia 76ers|@ Chicago
New Orleans Hornets|@ LA Clippers
New Orleans Hornets|@ Golden State
New Orleans Hornets|vs Utah
New Orleans Hornets|@ Miami
New Orleans Hornets|vs Phoenix
San Antonio Spurs|@ Indiana
San Antonio Spurs|@ Cleveland
San Antonio Spurs|@ Oklahoma City
San Antonio Spurs|vs Portland
San Antonio Spurs|vs Utah
Chicago Bulls|vs New Jersey
Chicago Bulls|vs New York
Chicago Bulls|vs Philadelphia
Chicago Bulls|vs Charlotte
Chicago Bulls|@ Detroit
Denver Nuggets|vs Utah
Denver Nuggets|vs LA Clippers
Denver Nuggets|@ Minnesota
Denver Nuggets|vs Oklahoma City
Denver Nuggets|@ LA Lakers
Minnesota Timberwolves|vs Houston
Minnesota Timberwolves|vs Golden State
Minnesota Timberwolves|@ LA Lakers
Minnesota Timberwolves|@ Portland
Minnesota Timberwolves|vs Washington
Detroit Pistons|@ New Jersey
Detroit Pistons|@ Philadelphia
Detroit Pistons|vs Charlotte
Detroit Pistons|@ New York
Detroit Pistons|vs New Jersey
Portland Trail Blazers|@ Oklahoma City
Portland Trail Blazers|@ Houston
Portland Trail Blazers|@ Memphis
Portland Trail Blazers|@ San Antonio
Portland Trail Blazers|vs LA Lakers
Indiana Pacers|vs Denver
Indiana Pacers|@ Sacramento
Indiana Pacers|@ Portland
Indiana Pacers|@ LA Clippers
Indiana Pacers|vs Utah

192
apps/nba/data/Participation.txt Executable file
View File

@ -0,0 +1,192 @@
LA Lakers|Kobe Bryant|110|82
LA Lakers|Pau Gasol|110|81
LA Lakers|Andrew Bynum|110|50
LA Lakers|Lamar Odom|110|78
LA Lakers|Derek Fisher|110|82
LA Lakers|Trevor Ariza|110|82
LA Lakers|Jordan Farmar|110|65
LA Lakers|Sasha Vujacic|110|80
LA Lakers|Luke Walton|110|65
LA Lakers|Josh Powell|110|60
LA Lakers|Shannon Brown|110|48
LA Lakers|Didier Ilunga-Mbenga|110|23
Boston Celtics|Paul Pierce|110|81
Boston Celtics|Ray Allen|110|79
Boston Celtics|Kevin Garnett|110|57
Boston Celtics|Rajon Rondo|110|80
Boston Celtics|Eddie House|110|81
Boston Celtics|Kendrick Perkins|110|76
Boston Celtics|Tony Allen|110|46
Boston Celtics|Leon Powe|110|70
Boston Celtics|Glen Davis|110|76
Boston Celtics|Mikki Moore|110|70
Boston Celtics|Stephon Marbury|110|23
Boston Celtics|Brian Scalabrine|110|39
Dallas Mavericks|Dirk Nowitzki|110|81
Dallas Mavericks|Jason Terry|110|74
Dallas Mavericks|Josh Howard|110|52
Dallas Mavericks|Jason Kidd|110|81
Dallas Mavericks|Brandon Bass|110|81
Dallas Mavericks|Jose Barea|110|79
Dallas Mavericks|Antoine Wright|110|65
Dallas Mavericks|Erick Dampier|110|80
Dallas Mavericks|James Singleton|110|62
Dallas Mavericks|Devean George|110|43
Dallas Mavericks|Ryan Hollins|110|45
Dallas Mavericks|Matt Carroll|110|55
New Jersey Nets|Devin Harris|110|69
New Jersey Nets|Vince Carter|110|80
New Jersey Nets|Brook Lopez|110|82
New Jersey Nets|Keyon Dooling|110|77
New Jersey Nets|Jarvis Hayes|110|74
New Jersey Nets|Yi Jianlian|110|61
New Jersey Nets|Bobby Simmons|110|71
New Jersey Nets|Ryan Anderson|110|66
New Jersey Nets|Chris Douglas-Roberts|110|44
New Jersey Nets|Josh Boone|110|62
New Jersey Nets|Trenton Hassell|110|53
New Jersey Nets|Eduardo Najera|110|27
Houston Rockets|Yao Ming|110|77
Houston Rockets|Ron Artest|110|69
Houston Rockets|Tracy McGrady|110|35
Houston Rockets|Luis Scola|110|82
Houston Rockets|Aaron Brooks|110|80
Houston Rockets|Von Wafer|110|63
Houston Rockets|Carl Landry|110|69
Houston Rockets|Kyle Lowry|110|77
Houston Rockets|Shane Battier|110|60
Houston Rockets|Brent Barry|110|56
Houston Rockets|Brian Cook|110|30
Houston Rockets|Chuck Hayes|110|71
New York Knicks|Al Harrington|110|73
New York Knicks|Nate Robinson|110|74
New York Knicks|David Lee|110|81
New York Knicks|Wilson Chandler|110|82
New York Knicks|Larry Hughes|110|55
New York Knicks|Chris Duhon|110|79
New York Knicks|Quentin Richardson|110|72
New York Knicks|Danilo Gallinari|110|28
New York Knicks|Chris Wilcox|110|62
New York Knicks|Jared Jeffries|110|56
New York Knicks|Mouhamed Sene|110|6
New York Knicks|Cheikh Samb|110|18
Memphis Grizzlies|Rudy Gay|110|79
Memphis Grizzlies|OJ Mayo|110|82
Memphis Grizzlies|Marc Gasol|110|82
Memphis Grizzlies|Hakim Warrick|110|82
Memphis Grizzlies|Mike Conley|110|82
Memphis Grizzlies|Darrell Arthur|110|76
Memphis Grizzlies|Darko Milicic|110|61
Memphis Grizzlies|Quinton Ross|110|68
Memphis Grizzlies|Darius Miles|110|34
Memphis Grizzlies|Marko Jaric|110|53
Memphis Grizzlies|Greg Buckner|110|63
Memphis Grizzlies|Hamed Haddadi|110|19
Philadelphia 76ers|Andre Iguodala|110|82
Philadelphia 76ers|Andre Miller|110|82
Philadelphia 76ers|Thaddeus Young|110|75
Philadelphia 76ers|Elton Brand|110|29
Philadelphia 76ers|Louis Williams|110|81
Philadelphia 76ers|Willie Green|110|81
Philadelphia 76ers|Marreese Speights|110|79
Philadelphia 76ers|Samuel Dalembert|110|82
Philadelphia 76ers|Donyell Marshall|110|25
Philadelphia 76ers|Reggie Evans|110|79
Philadelphia 76ers|Royal Ivey|110|71
Philadelphia 76ers|Theo Ratliff|110|46
New Orleans Hornets|Chris Paul|110|78
New Orleans Hornets|David West|110|76
New Orleans Hornets|Predrag Stojakovic|110|61
New Orleans Hornets|Rasual Butler|110|82
New Orleans Hornets|James Posey|110|75
New Orleans Hornets|Tyson Chandler|110|32
New Orleans Hornets|Devin Brown|110|63
New Orleans Hornets|Hilton Armstrong|110|70
New Orleans Hornets|Julian Wright|110|54
New Orleans Hornets|Morris Peterson|110|43
New Orleans Hornets|Antonio Daniels|110|74
New Orleans Hornets|Sean Marks|110|60
San Antonio Spurs|Tony Parker|110|72
San Antonio Spurs|Tim Duncan|110|75
San Antonio Spurs|Manu Ginobili|110|44
San Antonio Spurs|Roger Mason|110|82
San Antonio Spurs|Drew Gooden|110|51
San Antonio Spurs|Michael Finley|110|81
San Antonio Spurs|Matt Bonner|110|81
San Antonio Spurs|George Hill|110|77
San Antonio Spurs|Ime Udoka|110|67
San Antonio Spurs|Kurt Thomas|110|79
San Antonio Spurs|Malik Hairston|110|15
San Antonio Spurs|Bruce Bowen|110|80
Chicago Bulls|Ben Gordon|110|82
Chicago Bulls|John Salmons|110|79
Chicago Bulls|Derrick Rose|110|81
Chicago Bulls|Luol Deng|110|49
Chicago Bulls|Brad Miller|110|70
Chicago Bulls|Tyrus Thomas|110|79
Chicago Bulls|Kirk Hinrich|110|51
Chicago Bulls|Joakim Noah|110|80
Chicago Bulls|Tim Thomas|110|64
Chicago Bulls|Aaron Gray|110|56
Chicago Bulls|Lindsey Hunter|110|28
Chicago Bulls|Anthony Roberson|110|29
Denver Nuggets|Carmelo Anthony|110|66
Denver Nuggets|Chauncey Billups|110|79
Denver Nuggets|JR Smith|110|81
Denver Nuggets|Nene Nene|110|77
Denver Nuggets|Kenyon Martin|110|66
Denver Nuggets|Linas Kleiza|110|82
Denver Nuggets|Chris Andersen|110|71
Denver Nuggets|Dahntay Jones|110|79
Denver Nuggets|Anthony Carter|110|78
Denver Nuggets|Renaldo Balkman|110|53
Denver Nuggets|Johan Petro|110|49
Denver Nuggets|Jason Hart|110|39
Minnesota Timberwolves|Al Jefferson|110|50
Minnesota Timberwolves|Randy Foye|110|70
Minnesota Timberwolves|Ryan Gomes|110|82
Minnesota Timberwolves|Kevin Love|110|81
Minnesota Timberwolves|Craig Smith|110|74
Minnesota Timberwolves|Mike Miller|110|73
Minnesota Timberwolves|Sebastian Telfair|110|75
Minnesota Timberwolves|Rodney Carney|110|67
Minnesota Timberwolves|Corey Brewer|110|15
Minnesota Timberwolves|Bobby Brown|110|68
Minnesota Timberwolves|Kevin Ollie|110|50
Minnesota Timberwolves|Brian Cardinal|110|64
Detroit Pistons|Richard Hamilton|110|67
Detroit Pistons|Allen Iverson|110|57
Detroit Pistons|Tayshaun Prince|110|82
Detroit Pistons|Rodney Stuckey|110|79
Detroit Pistons|Rasheed Wallace|110|66
Detroit Pistons|Antonio McDyess|110|62
Detroit Pistons|Will Bynum|110|57
Detroit Pistons|Jason Maxiell|110|78
Detroit Pistons|Arron Afflalo|110|74
Detroit Pistons|Kwame Brown|110|58
Detroit Pistons|Walter Herrmann|110|59
Detroit Pistons|Amir Johnson|110|62
Portland Trail Blazers|Brandon Roy|110|78
Portland Trail Blazers|LaMarcus Aldridge|110|81
Portland Trail Blazers|Travis Outlaw|110|81
Portland Trail Blazers|Steve Blake|110|69
Portland Trail Blazers|Rudy Fernandez|110|78
Portland Trail Blazers|Greg Oden|110|61
Portland Trail Blazers|Joel Przybilla|110|82
Portland Trail Blazers|Nicolas Batum|110|79
Portland Trail Blazers|Sergio Rodriguez|110|80
Portland Trail Blazers|Jerryd Bayless|110|53
Portland Trail Blazers|Channing Frye|110|63
Portland Trail Blazers|Shavlik Randolph|110|10
Indiana Pacers|Danny Granger|110|67
Indiana Pacers|Mike Dunleavy|110|18
Indiana Pacers|T.J. Ford|110|74
Indiana Pacers|Troy Murphy|110|73
Indiana Pacers|Marquis Daniels|110|54
Indiana Pacers|Jarrett Jack|110|82
Indiana Pacers|Brandon Rush|110|75
Indiana Pacers|Roy Hibbert|110|70
Indiana Pacers|Rasho Nesterovic|110|70
Indiana Pacers|Jeff Foster|110|74
Indiana Pacers|Stephen Graham|110|52
Indiana Pacers|Travis Diener|110|55

2694
apps/nba/data/Performance.txt Executable file

File diff suppressed because it is too large Load Diff

224
apps/nba/data/PlayerInfo.txt Executable file
View File

@ -0,0 +1,224 @@
LA Lakers|Trevor Ariza|06/30/1985|6-8|210
LA Lakers|Shannon Brown|11/29/1985|6-4|211
LA Lakers|Kobe Bryant|08/23/1978|6-6|205
LA Lakers|Andrew Bynum|10/27/1987|7-0|285
LA Lakers|Jordan Farmar|11/30/1986|6-2|180
LA Lakers|Derek Fisher|08/09/1974|6-1|210
LA Lakers|Pau Gasol|07/06/1980|7-0|250
LA Lakers|Didier Ilunga-Mbenga|12/30/1980|7-0|255
LA Lakers|Adam Morrison|07/19/1984|6-8|205
LA Lakers|Lamar Odom|11/06/1979|6-10|230
LA Lakers|Josh Powell|01/25/1983|6-9|240
LA Lakers|Sasha Vujacic|03/08/1984|6-7|205
LA Lakers|Luke Walton|03/28/1980|6-8|235
LA Lakers|Sun Yue|11/06/1985|6-9|205
Boston Celtics|Ray Allen|07/20/1975|6-5|205
Boston Celtics|Tony Allen|01/11/1982|6-4|213
Boston Celtics|Glen Davis|01/01/1986|6-9|289
Boston Celtics|Kevin Garnett|05/19/1976|6-11|253
Boston Celtics|J.R. Giddens|02/13/1985|6-5|215
Boston Celtics|Eddie House|05/14/1978|6-1|175
Boston Celtics|Mikki Moore|11/04/1975|7-0|225
Boston Celtics|Kendrick Perkins|11/10/1984|6-10|280
Boston Celtics|Paul Pierce|10/13/1977|6-7|235
Boston Celtics|Leon Powe|01/22/1984|6-8|240
Boston Celtics|Rajon Rondo|02/22/1986|6-1|171
Boston Celtics|Brian Scalabrine|03/18/1978|6-9|235
Boston Celtics|Stephon Marbury|02/20/1977|6-2|205
Dallas Mavericks|Jose Barea|06/26/1984|6-0|175
Dallas Mavericks|Brandon Bass|04/30/1985|6-8|250
Dallas Mavericks|Matt Carroll|08/28/1980|6-6|212
Dallas Mavericks|Erick Dampier|07/14/1975|6-11|265
Dallas Mavericks|Devean George|08/29/1977|6-8|235
Dallas Mavericks|Ryan Hollins|10/10/1984|7-0|230
Dallas Mavericks|Josh Howard|04/28/1980|6-7|210
Dallas Mavericks|Jason Kidd|03/23/1973|6-4|210
Dallas Mavericks|Dirk Nowitzki|06/19/1978|7-0|245
Dallas Mavericks|James Singleton|07/20/1981|6-8|230
Dallas Mavericks|Jason Terry|09/15/1977|6-2|180
Dallas Mavericks|Antoine Wright|02/06/1984|6-7|215
New Jersey Nets|Ryan Anderson|05/06/1988|6-10|240
New Jersey Nets|Josh Boone|11/21/1984|6-10|237
New Jersey Nets|Vince Carter|01/26/1977|6-6|220
New Jersey Nets|Keyon Dooling|05/08/1980|6-3|195
New Jersey Nets|Chris Douglas-Roberts|01/08/1987|6-7|200
New Jersey Nets|Devin Harris|02/27/1983|6-3|185
New Jersey Nets|Trenton Hassell|03/04/1979|6-5|233
New Jersey Nets|Jarvis Hayes|08/09/1981|6-8|228
New Jersey Nets|Brook Lopez|04/01/1988|7-0|260
New Jersey Nets|Eduardo Najera|07/11/1976|6-8|235
New Jersey Nets|Bobby Simmons|06/02/1980|6-6|230
New Jersey Nets|Yi Jianlian|10/27/1987|7-0|238
Houston Rockets|Ron Artest|11/13/1979|6-7|260
Houston Rockets|Brent Barry|12/31/1971|6-7|210
Houston Rockets|Shane Battier|09/09/1978|6-8|220
Houston Rockets|Aaron Brooks|01/14/1985|6-0|161
Houston Rockets|Brian Cook|12/04/1980|6-9|250
Houston Rockets|Chuck Hayes|06/11/1983|6-6|238
Houston Rockets|Carl Landry|09/19/1983|6-9|248
Houston Rockets|Kyle Lowry|03/25/1986|6-0|205
Houston Rockets|Tracy McGrady|05/24/1979|6-8|223
Houston Rockets|Luis Scola|04/30/1980|6-9|245
Houston Rockets|Von Wafer|07/21/1985|6-5|210
Houston Rockets|Yao Ming|09/12/1980|7-6|310
New York Knicks|Wilson Chandler|05/10/1987|6-8|220
New York Knicks|Joe Crawford|06/17/1986|6-5|210
New York Knicks|Eddy Curry|12/05/1982|6-11|285
New York Knicks|Chris Duhon|08/31/1982|6-1|185
New York Knicks|Danilo Gallinari|08/08/1988|6-10|225
New York Knicks|Al Harrington|02/17/1980|6-9|250
New York Knicks|Larry Hughes|01/23/1979|6-5|185
New York Knicks|Chris Hunter|07/07/1984|6-11|240
New York Knicks|Jared Jeffries|11/25/1981|6-11|240
New York Knicks|David Lee|04/29/1983|6-9|240
New York Knicks|Cuttino Mobley|09/01/1975|6-4|215
New York Knicks|Quentin Richardson|04/13/1980|6-6|235
New York Knicks|Nate Robinson|05/31/1984|5-9|180
New York Knicks|Cheikh Samb|05/12/1986|6-11|230
New York Knicks|Courtney Sims|10/21/1983|6-11|245
New York Knicks|Chris Wilcox|09/03/1982|6-10|235
Memphis Grizzlies|Darrell Arthur|03/25/1988|6-9|225
Memphis Grizzlies|Greg Buckner|09/16/1976|6-4|210
Memphis Grizzlies|Mike Conley|10/11/1987|6-1|180
Memphis Grizzlies|Marc Gasol|01/29/1985|7-1|265
Memphis Grizzlies|Rudy Gay|08/17/1986|6-8|222
Memphis Grizzlies|Hamed Haddadi|05/19/1985|7-2|254
Memphis Grizzlies|Marko Jaric|10/12/1978|6-7|224
Memphis Grizzlies|OJ Mayo|11/05/1987|6-4|210
Memphis Grizzlies|Chris Mihm|07/16/1979|7-0|265
Memphis Grizzlies|Darius Miles|10/09/1981|6-9|235
Memphis Grizzlies|Darko Milicic|06/20/1985|7-0|275
Memphis Grizzlies|Quinton Ross|04/30/1981|6-6|193
Memphis Grizzlies|Hakim Warrick|07/08/1982|6-9|219
Memphis Grizzlies|Mike Wilks|05/07/1979|5-10|180
Philadelphia 76ers|Elton Brand|03/11/1979|6-9|254
Philadelphia 76ers|Samuel Dalembert|05/10/1981|6-11|250
Philadelphia 76ers|Reggie Evans|05/18/1980|6-8|245
Philadelphia 76ers|Willie Green|07/28/1981|6-3|201
Philadelphia 76ers|Andre Iguodala|01/28/1984|6-6|207
Philadelphia 76ers|Royal Ivey|12/20/1981|6-4|215
Philadelphia 76ers|Donyell Marshall|05/18/1973|6-9|245
Philadelphia 76ers|Andre Miller|03/19/1976|6-2|200
Philadelphia 76ers|Theo Ratliff|04/17/1973|6-10|235
Philadelphia 76ers|Kareem Rush|10/30/1980|6-6|215
Philadelphia 76ers|Jason Smith|03/02/1986|7-0|240
Philadelphia 76ers|Marreese Speights|08/04/1987|6-10|245
Philadelphia 76ers|Louis Williams|10/27/1986|6-2|175
Philadelphia 76ers|Thaddeus Young|06/21/1988|6-8|220
New Orleans Hornets|Hilton Armstrong|11/11/1984|6-11|235
New Orleans Hornets|Ryan Bowen|11/20/1975|6-9|218
New Orleans Hornets|Devin Brown|12/30/1978|6-5|210
New Orleans Hornets|Rasual Butler|05/23/1979|6-7|205
New Orleans Hornets|Tyson Chandler|10/02/1982|7-1|235
New Orleans Hornets|Antonio Daniels|03/19/1975|6-4|205
New Orleans Hornets|Melvin Ely|05/02/1978|6-10|261
New Orleans Hornets|Sean Marks|08/23/1975|6-10|250
New Orleans Hornets|Chris Paul|05/06/1985|6-0|175
New Orleans Hornets|Morris Peterson|08/26/1977|6-7|220
New Orleans Hornets|James Posey|01/13/1977|6-8|217
New Orleans Hornets|Predrag Stojakovic|06/09/1977|6-10|229
New Orleans Hornets|David West|08/29/1980|6-9|240
New Orleans Hornets|Julian Wright|05/20/1987|6-8|225
San Antonio Spurs|Malik Hairston|02/23/1987|6-6|220
San Antonio Spurs|Matt Bonner|04/05/1980|6-10|240
San Antonio Spurs|Bruce Bowen|06/14/1971|6-7|200
San Antonio Spurs|Tim Duncan|04/25/1976|6-11|260
San Antonio Spurs|Michael Finley|03/06/1973|6-7|225
San Antonio Spurs|Manu Ginobili|07/28/1977|6-6|205
San Antonio Spurs|Drew Gooden|09/24/1981|6-10|250
San Antonio Spurs|George Hill|05/04/1986|6-2|180
San Antonio Spurs|Ian Mahinmi|11/05/1986|6-11|230
San Antonio Spurs|Roger Mason|09/10/1980|6-5|212
San Antonio Spurs|Fabricio Oberto|03/21/1975|6-10|245
San Antonio Spurs|Tony Parker|05/17/1982|6-2|180
San Antonio Spurs|Kurt Thomas|10/04/1972|6-9|235
San Antonio Spurs|Ime Udoka|08/09/1977|6-5|220
San Antonio Spurs|Jacque Vaughn|02/11/1975|6-1|190
San Antonio Spurs|Marcus Williams|11/18/1986|6-7|207
Chicago Bulls|Luol Deng|04/16/1985|6-9|220
Chicago Bulls|Ben Gordon|04/04/1983|6-3|200
Chicago Bulls|Aaron Gray|12/07/1984|7-0|270
Chicago Bulls|Kirk Hinrich|01/02/1981|6-3|190
Chicago Bulls|Lindsey Hunter|12/03/1970|6-2|195
Chicago Bulls|Jerome James|11/17/1975|7-1|285
Chicago Bulls|Linton Johnson|205|F|6-8
Chicago Bulls|Brad Miller|04/12/1976|7-0|261
Chicago Bulls|DeMarcus Nelson|11/02/1985|6-4|200
Chicago Bulls|Joakim Noah|02/25/1985|6-11|232
Chicago Bulls|Anthony Roberson|02/14/1983|6-2|180
Chicago Bulls|Derrick Rose|10/04/1988|6-3|190
Chicago Bulls|John Salmons|12/12/1979|6-6|207
Chicago Bulls|Tim Thomas|02/26/1977|6-10|240
Chicago Bulls|Tyrus Thomas|08/17/1986|6-9|215
Denver Nuggets|Chris Andersen|07/07/1978|6-10|228
Denver Nuggets|Carmelo Anthony|05/29/1984|6-8|230
Denver Nuggets|Renaldo Balkman|07/14/1984|6-8|208
Denver Nuggets|Chauncey Billups|09/25/1976|6-3|202
Denver Nuggets|Anthony Carter|06/16/1975|6-2|195
Denver Nuggets|Jason Hart|04/29/1978|6-3|180
Denver Nuggets|Steven Hunter|10/31/1981|7-0|240
Denver Nuggets|Dahntay Jones|12/27/1980|6-6|210
Denver Nuggets|Linas Kleiza|01/03/1985|6-8|245
Denver Nuggets|Kenyon Martin|12/30/1977|6-9|240
Denver Nuggets|Nene Nene|09/13/1982|6-11|250
Denver Nuggets|Johan Petro|01/27/1986|7-0|247
Denver Nuggets|JR Smith|09/09/1985|6-6|220
Denver Nuggets|Sonny Weems|07/08/1986|6-6|203
Minnesota Timberwolves|Corey Brewer|03/05/1986|6-9|188
Minnesota Timberwolves|Bobby Brown|09/24/1984|6-2|175
Minnesota Timberwolves|Brian Cardinal|05/02/1977|6-8|240
Minnesota Timberwolves|Rodney Carney|04/05/1984|6-7|201
Minnesota Timberwolves|Jason Collins|12/02/1978|7-0|255
Minnesota Timberwolves|Randy Foye|09/24/1983|6-4|213
Minnesota Timberwolves|Ryan Gomes|09/01/1982|6-7|245
Minnesota Timberwolves|Al Jefferson|01/04/1985|6-10|265
Minnesota Timberwolves|Kevin Love|09/07/1988|6-10|260
Minnesota Timberwolves|Mark Madsen|01/28/1976|6-9|255
Minnesota Timberwolves|Mike Miller|02/19/1980|6-8|218
Minnesota Timberwolves|Kevin Ollie|12/27/1972|6-2|195
Minnesota Timberwolves|Craig Smith|11/10/1983|6-7|250
Minnesota Timberwolves|Sebastian Telfair|06/09/1985|6-0|175
Minnesota Timberwolves|Shelden Williams|10/21/1983|6-9|250
Detroit Pistons|Arron Afflalo|10/15/1985|6-5|215
Detroit Pistons|Kwame Brown|03/10/1982|6-11|270
Detroit Pistons|Will Bynum|01/04/1983|6-0|185
Detroit Pistons|Richard Hamilton|02/14/1978|6-7|193
Detroit Pistons|Walter Herrmann|06/26/1979|6-9|225
Detroit Pistons|Allen Iverson|06/07/1975|6-0|180
Detroit Pistons|Amir Johnson|05/01/1987|6-9|210
Detroit Pistons|Jason Maxiell|02/18/1983|6-7|260
Detroit Pistons|Antonio McDyess|09/07/1974|6-9|245
Detroit Pistons|Tayshaun Prince|02/28/1980|6-9|215
Detroit Pistons|Walter Sharpe|07/18/1986|6-9|245
Detroit Pistons|Rodney Stuckey|04/21/1986|6-5|205
Detroit Pistons|Rasheed Wallace|09/17/1974|6-11|230
Portland Trail Blazers|LaMarcus Aldridge|07/19/1985|6-11|240
Portland Trail Blazers|Nicolas Batum|12/14/1988|6-8|200
Portland Trail Blazers|Jerryd Bayless|08/20/1988|6-3|200
Portland Trail Blazers|Steve Blake|02/26/1980|6-3|172
Portland Trail Blazers|Rudy Fernandez|04/04/1985|6-6|185
Portland Trail Blazers|Channing Frye|05/17/1983|6-11|245
Portland Trail Blazers|Raef LaFrentz|05/29/1976|6-11|240
Portland Trail Blazers|Greg Oden|01/22/1988|7-0|285
Portland Trail Blazers|Travis Outlaw|09/18/1984|6-9|207
Portland Trail Blazers|Joel Przybilla|10/10/1979|7-1|245
Portland Trail Blazers|Shavlik Randolph|11/24/1983|6-10|240
Portland Trail Blazers|Sergio Rodriguez|06/12/1986|6-3|176
Portland Trail Blazers|Brandon Roy|07/23/1984|6-6|211
Portland Trail Blazers|Michael Ruffin|01/21/1977|6-8|248
Portland Trail Blazers|Martell Webster|12/04/1986|6-7|235
Indiana Pacers|Maceo Baston|05/26/1976|6-10|230
Indiana Pacers|Marquis Daniels|01/07/1981|6-6|200
Indiana Pacers|Travis Diener|03/01/1982|6-1|175
Indiana Pacers|Mike Dunleavy|09/15/1980|6-9|230
Indiana Pacers|T.J. Ford|03/24/1983|6-0|165
Indiana Pacers|Jeff Foster|01/16/1977|6-11|250
Indiana Pacers|Stephen Graham|06/11/1982|6-6|215
Indiana Pacers|Danny Granger|04/20/1983|6-8|228
Indiana Pacers|Roy Hibbert|12/11/1986|7-2|278
Indiana Pacers|Jarrett Jack|10/28/1983|6-3|197
Indiana Pacers|Josh McRoberts|02/28/1987|6-10|240
Indiana Pacers|Troy Murphy|05/02/1980|6-11|245
Indiana Pacers|Rasho Nesterovic|05/30/1976|7-0|255
Indiana Pacers|Brandon Rush|07/07/1985|6-6|210
Indiana Pacers|Jamaal Tinsley|02/28/1978|6-3|185

192
apps/nba/data/Salary.txt Executable file
View File

@ -0,0 +1,192 @@
Kobe Bryant|21262500
Pau Gasol|15080312
Lamar Odom|11400000
Shannon Brown|6049400
Derek Fisher|4698000
Sasha Vujacic|4524887
Luke Walton|4420000
Trevor Ariza|2911600
Andrew Bynum|2769300
Jordan Farmar|1080000
Josh Powell|854957
Didier Ilunga-Mbenga|854957
Kevin Garnett|24750000
Paul Pierce|18077903
Ray Allen|17388430
Kendrick Perkins|4078880
Brian Scalabrine|3206897
Eddie House|2650000
Tony Allen|2500000
Rajon Rondo|1646784
Stephon Marbury|1262275
Leon Powe|797581
Glen Davis|711517
Mikki Moore|378683
Jason Kidd|21372000
Dirk Nowitzki|18077904
Josh Howard|9945000
Erick Dampier|9550000
Jason Terry|9075000
Matt Carroll|5050000
Jose Barea|1500000
Ryan Hollins|972581
Antoine Wright|1910000
Brandon Bass|826269
Devean George|1600000
James Singleton|797581
Vince Carter|15200000
Bobby Simmons|9920000
Devin Harris|7800000
Trenton Hassell|4350000
Eduardo Najera|3400000
Keyon Dooling|3300000
Yi Jianlian|2986080
Brook Lopez|2098560
Jarvis Hayes|1910000
Ryan Anderson|1225200
Josh Boone|1212120
Chris Douglas-Roberts|442114
Tracy McGrady|21126874
Yao Ming|15070550
Ron Artest|8450000
Shane Battier|6373900
Brian Cook|3500000
Luis Scola|3142800
Carl Landry|3000000
Von Wafer|797581
Chuck Hayes|1933750
Brent Barry|1910000
Kyle Lowry|1163520
Aaron Brooks|1045560
Larry Hughes|12827676
Al Harrington|9226250
Quentin Richardson|8825750
Chris Wilcox|6750000
Jared Jeffries|6049400
Chris Duhon|5585000
Danilo Gallinari|2873520
Nate Robinson|2020178
David Lee|1788033
Wilson Chandler|1173480
Cheikh Samb|79057
Saer Sene|110066
Darko Milicic|7000000
Marko Jaric|6575000
OJ Mayo|3875040
Greg Buckner|3759259
Mike Conley|3630480
Marc Gasol|3000000
Rudy Gay|2579400
Hakim Warrick|2119101
Hamed Haddadi|1572221
Darrell Arthur|977160
Darius Miles|875409
Quinton Ross|797581
Elton Brand|13757844
Andre Iguodala|11300000
Samuel Dalembert|10520000
Andre Miller|9999999
Louis Williams|4500000
Reggie Evans|4640000
Willie Green|3388000
Thaddeus Young|1968120
Marreese Speights|1542600
Donyell Marshall|1262275
Theo Ratliff|1262275
Royal Ivey|854957
Predrag Stojakovic|13068000
Tyson Chandler|10950000
David West|9862500
Antonio Daniels|6200000
Morris Peterson|5784480
James Posey|5585000
Chris Paul|4574189
Rasual Butler|3630000
Hilton Armstrong|2032800
Julian Wright|1869600
Sean Marks|1141838
Devin Brown|998398
Tim Duncan|20598703
Tony Parker|11550000
Manu Ginobili|9900000
Kurt Thomas|4200000
Bruce Bowen|4000000
Roger Mason|3500000
Matt Bonner|2959190
Michael Finley|2500000
Drew Gooden|1484029
Ime Udoka|1080000
George Hill|1006200
Malik Hairston|250531
Brad Miller|11375000
Kirk Hinrich|10000000
Luol Deng|9385000
Ben Gordon|6404749
Tim Thomas|6049400
John Salmons|5104000
Derrick Rose|4822800
Tyrus Thomas|3749880
Joakim Noah|2295480
Lindsey Hunter|1150072
Aaron Gray|711517
Anthony Roberson|797581
Carmelo Anthony|14410581
Kenyon Martin|14181818
Chauncey Billups|11050000
Nene Nene|9680000
JR Smith|5585001
Johan Petro|1939893
Linas Kleiza|1824493
Renaldo Balkman|1320960
Anthony Carter|1260000
Chris Andersen|998398
Dahntay Jones|926678
Jason Hart|344815
Al Jefferson|11000000
Mike Miller|9000000
Brian Cardinal|6300000
Ryan Gomes|3500000
Kevin Love|3163680
Randy Foye|2815560
Corey Brewer|2725920
Sebastian Telfair|2300000
Craig Smith|2300000
Rodney Carney|1655760
Kevin Ollie|1262275
Bobby Brown|442114
Allen Iverson|21937500
Rasheed Wallace|13680000
Richard Hamilton|10562500
Tayshaun Prince|9500000
Kwame Brown|4000000
Amir Johnson|3666666
Walter Herrmann|2000000
Jason Maxiell|1877572
Rodney Stuckey|1687320
Arron Afflalo|1015440
Antonio McDyess|995794
Will Bynum|711517
Joel Przybilla|6310150
Greg Oden|5011680
LaMarcus Aldridge|4631400
Steve Blake|4590000
Travis Outlaw|4000000
Channing Frye|3163769
Brandon Roy|3084240
Jerryd Bayless|1993560
Rudy Fernandez|1084080
Sergio Rodriguez|1048800
Nicolas Batum|1040640
Shavlik Randolph|826269
Troy Murphy|10126984
Mike Dunleavy|9000000
Rasho Nesterovic|8400000
T.J. Ford|8000000
Marquis Daniels|6860000
Jeff Foster|6175000
Danny Granger|2329804
Jarrett Jack|2002623
Brandon Rush|1799160
Travis Diener|1620000
Roy Hibbert|1465440
Stephen Graham|826269

960
apps/nba/data/Skills.txt Executable file
View File

@ -0,0 +1,960 @@
LA Lakers|Kobe Bryant|Shooting|Y
LA Lakers|Kobe Bryant|Passing|Y
LA Lakers|Kobe Bryant|Rebound|Y
LA Lakers|Kobe Bryant|Blocking|N
LA Lakers|Kobe Bryant|Stealing|N
LA Lakers|Pau Gasol|Shooting|Y
LA Lakers|Pau Gasol|Passing|Y
LA Lakers|Pau Gasol|Rebound|N
LA Lakers|Pau Gasol|Blocking|Y
LA Lakers|Pau Gasol|Stealing|Y
LA Lakers|Andrew Bynum|Shooting|Y
LA Lakers|Andrew Bynum|Passing|N
LA Lakers|Andrew Bynum|Rebound|Y
LA Lakers|Andrew Bynum|Blocking|Y
LA Lakers|Andrew Bynum|Stealing|Y
LA Lakers|Lamar Odom|Shooting|Y
LA Lakers|Lamar Odom|Passing|Y
LA Lakers|Lamar Odom|Rebound|Y
LA Lakers|Lamar Odom|Blocking|Y
LA Lakers|Lamar Odom|Stealing|N
LA Lakers|Derek Fisher|Shooting|N
LA Lakers|Derek Fisher|Passing|Y
LA Lakers|Derek Fisher|Rebound|N
LA Lakers|Derek Fisher|Blocking|N
LA Lakers|Derek Fisher|Stealing|N
LA Lakers|Trevor Ariza|Shooting|Y
LA Lakers|Trevor Ariza|Passing|N
LA Lakers|Trevor Ariza|Rebound|Y
LA Lakers|Trevor Ariza|Blocking|N
LA Lakers|Trevor Ariza|Stealing|N
LA Lakers|Jordan Farmar|Shooting|N
LA Lakers|Jordan Farmar|Passing|Y
LA Lakers|Jordan Farmar|Rebound|N
LA Lakers|Jordan Farmar|Blocking|N
LA Lakers|Jordan Farmar|Stealing|N
LA Lakers|Sasha Vujacic|Shooting|N
LA Lakers|Sasha Vujacic|Passing|Y
LA Lakers|Sasha Vujacic|Rebound|N
LA Lakers|Sasha Vujacic|Blocking|N
LA Lakers|Sasha Vujacic|Stealing|N
LA Lakers|Luke Walton|Shooting|N
LA Lakers|Luke Walton|Passing|Y
LA Lakers|Luke Walton|Rebound|N
LA Lakers|Luke Walton|Blocking|N
LA Lakers|Luke Walton|Stealing|N
LA Lakers|Josh Powell|Shooting|Y
LA Lakers|Josh Powell|Passing|N
LA Lakers|Josh Powell|Rebound|N
LA Lakers|Josh Powell|Blocking|N
LA Lakers|Josh Powell|Stealing|N
LA Lakers|Shannon Brown|Shooting|Y
LA Lakers|Shannon Brown|Passing|N
LA Lakers|Shannon Brown|Rebound|N
LA Lakers|Shannon Brown|Blocking|N
LA Lakers|Shannon Brown|Stealing|N
LA Lakers|Didier Ilunga-Mbenga|Shooting|Y
LA Lakers|Didier Ilunga-Mbenga|Passing|N
LA Lakers|Didier Ilunga-Mbenga|Rebound|N
LA Lakers|Didier Ilunga-Mbenga|Blocking|Y
LA Lakers|Didier Ilunga-Mbenga|Stealing|N
Boston Celtics|Paul Pierce|Shooting|Y
Boston Celtics|Paul Pierce|Passing|Y
Boston Celtics|Paul Pierce|Rebound|Y
Boston Celtics|Paul Pierce|Blocking|N
Boston Celtics|Paul Pierce|Stealing|N
Boston Celtics|Ray Allen|Shooting|Y
Boston Celtics|Ray Allen|Passing|Y
Boston Celtics|Ray Allen|Rebound|Y
Boston Celtics|Ray Allen|Blocking|N
Boston Celtics|Ray Allen|Stealing|N
Boston Celtics|Kevin Garnett|Shooting|Y
Boston Celtics|Kevin Garnett|Passing|Y
Boston Celtics|Kevin Garnett|Rebound|Y
Boston Celtics|Kevin Garnett|Blocking|N
Boston Celtics|Kevin Garnett|Stealing|Y
Boston Celtics|Rajon Rondo|Shooting|Y
Boston Celtics|Rajon Rondo|Passing|Y
Boston Celtics|Rajon Rondo|Rebound|Y
Boston Celtics|Rajon Rondo|Blocking|N
Boston Celtics|Rajon Rondo|Stealing|Y
Boston Celtics|Eddie House|Shooting|N
Boston Celtics|Eddie House|Passing|N
Boston Celtics|Eddie House|Rebound|N
Boston Celtics|Eddie House|Blocking|N
Boston Celtics|Eddie House|Stealing|Y
Boston Celtics|Kendrick Perkins|Shooting|Y
Boston Celtics|Kendrick Perkins|Passing|N
Boston Celtics|Kendrick Perkins|Rebound|Y
Boston Celtics|Kendrick Perkins|Blocking|Y
Boston Celtics|Kendrick Perkins|Stealing|Y
Boston Celtics|Tony Allen|Shooting|Y
Boston Celtics|Tony Allen|Passing|N
Boston Celtics|Tony Allen|Rebound|N
Boston Celtics|Tony Allen|Blocking|N
Boston Celtics|Tony Allen|Stealing|N
Boston Celtics|Leon Powe|Shooting|Y
Boston Celtics|Leon Powe|Passing|N
Boston Celtics|Leon Powe|Rebound|Y
Boston Celtics|Leon Powe|Blocking|N
Boston Celtics|Leon Powe|Stealing|Y
Boston Celtics|Glen Davis|Shooting|N
Boston Celtics|Glen Davis|Passing|N
Boston Celtics|Glen Davis|Rebound|Y
Boston Celtics|Glen Davis|Blocking|N
Boston Celtics|Glen Davis|Stealing|N
Boston Celtics|Mikki Moore|Shooting|Y
Boston Celtics|Mikki Moore|Passing|N
Boston Celtics|Mikki Moore|Rebound|Y
Boston Celtics|Mikki Moore|Blocking|N
Boston Celtics|Mikki Moore|Stealing|Y
Boston Celtics|Stephon Marbury|Shooting|N
Boston Celtics|Stephon Marbury|Passing|Y
Boston Celtics|Stephon Marbury|Rebound|N
Boston Celtics|Stephon Marbury|Blocking|N
Boston Celtics|Stephon Marbury|Stealing|N
Boston Celtics|Brian Scalabrine|Shooting|N
Boston Celtics|Brian Scalabrine|Passing|Y
Boston Celtics|Brian Scalabrine|Rebound|N
Boston Celtics|Brian Scalabrine|Blocking|N
Boston Celtics|Brian Scalabrine|Stealing|N
Dallas Mavericks|Dirk Nowitzki|Shooting|Y
Dallas Mavericks|Dirk Nowitzki|Passing|Y
Dallas Mavericks|Dirk Nowitzki|Rebound|Y
Dallas Mavericks|Dirk Nowitzki|Blocking|N
Dallas Mavericks|Dirk Nowitzki|Stealing|N
Dallas Mavericks|Jason Terry|Shooting|Y
Dallas Mavericks|Jason Terry|Passing|Y
Dallas Mavericks|Jason Terry|Rebound|N
Dallas Mavericks|Jason Terry|Blocking|N
Dallas Mavericks|Jason Terry|Stealing|N
Dallas Mavericks|Josh Howard|Shooting|Y
Dallas Mavericks|Josh Howard|Passing|N
Dallas Mavericks|Josh Howard|Rebound|Y
Dallas Mavericks|Josh Howard|Blocking|N
Dallas Mavericks|Josh Howard|Stealing|N
Dallas Mavericks|Jason Kidd|Shooting|N
Dallas Mavericks|Jason Kidd|Passing|Y
Dallas Mavericks|Jason Kidd|Rebound|Y
Dallas Mavericks|Jason Kidd|Blocking|N
Dallas Mavericks|Jason Kidd|Stealing|N
Dallas Mavericks|Brandon Bass|Shooting|Y
Dallas Mavericks|Brandon Bass|Passing|N
Dallas Mavericks|Brandon Bass|Rebound|Y
Dallas Mavericks|Brandon Bass|Blocking|N
Dallas Mavericks|Brandon Bass|Stealing|N
Dallas Mavericks|Jose Barea|Shooting|N
Dallas Mavericks|Jose Barea|Passing|Y
Dallas Mavericks|Jose Barea|Rebound|N
Dallas Mavericks|Jose Barea|Blocking|N
Dallas Mavericks|Jose Barea|Stealing|N
Dallas Mavericks|Antoine Wright|Shooting|N
Dallas Mavericks|Antoine Wright|Passing|Y
Dallas Mavericks|Antoine Wright|Rebound|N
Dallas Mavericks|Antoine Wright|Blocking|N
Dallas Mavericks|Antoine Wright|Stealing|N
Dallas Mavericks|Erick Dampier|Shooting|Y
Dallas Mavericks|Erick Dampier|Passing|N
Dallas Mavericks|Erick Dampier|Rebound|Y
Dallas Mavericks|Erick Dampier|Blocking|Y
Dallas Mavericks|Erick Dampier|Stealing|Y
Dallas Mavericks|James Singleton|Shooting|Y
Dallas Mavericks|James Singleton|Passing|N
Dallas Mavericks|James Singleton|Rebound|Y
Dallas Mavericks|James Singleton|Blocking|N
Dallas Mavericks|James Singleton|Stealing|Y
Dallas Mavericks|Devean George|Shooting|N
Dallas Mavericks|Devean George|Passing|N
Dallas Mavericks|Devean George|Rebound|Y
Dallas Mavericks|Devean George|Blocking|N
Dallas Mavericks|Devean George|Stealing|N
Dallas Mavericks|Ryan Hollins|Shooting|Y
Dallas Mavericks|Ryan Hollins|Passing|N
Dallas Mavericks|Ryan Hollins|Rebound|N
Dallas Mavericks|Ryan Hollins|Blocking|N
Dallas Mavericks|Ryan Hollins|Stealing|Y
Dallas Mavericks|Matt Carroll|Shooting|Y
Dallas Mavericks|Matt Carroll|Passing|N
Dallas Mavericks|Matt Carroll|Rebound|N
Dallas Mavericks|Matt Carroll|Blocking|N
Dallas Mavericks|Matt Carroll|Stealing|N
New Jersey Nets|Devin Harris|Shooting|N
New Jersey Nets|Devin Harris|Passing|Y
New Jersey Nets|Devin Harris|Rebound|Y
New Jersey Nets|Devin Harris|Blocking|N
New Jersey Nets|Devin Harris|Stealing|N
New Jersey Nets|Vince Carter|Shooting|N
New Jersey Nets|Vince Carter|Passing|Y
New Jersey Nets|Vince Carter|Rebound|Y
New Jersey Nets|Vince Carter|Blocking|N
New Jersey Nets|Vince Carter|Stealing|N
New Jersey Nets|Brook Lopez|Shooting|Y
New Jersey Nets|Brook Lopez|Passing|N
New Jersey Nets|Brook Lopez|Rebound|Y
New Jersey Nets|Brook Lopez|Blocking|Y
New Jersey Nets|Brook Lopez|Stealing|Y
New Jersey Nets|Keyon Dooling|Shooting|N
New Jersey Nets|Keyon Dooling|Passing|Y
New Jersey Nets|Keyon Dooling|Rebound|N
New Jersey Nets|Keyon Dooling|Blocking|N
New Jersey Nets|Keyon Dooling|Stealing|N
New Jersey Nets|Jarvis Hayes|Shooting|N
New Jersey Nets|Jarvis Hayes|Passing|N
New Jersey Nets|Jarvis Hayes|Rebound|Y
New Jersey Nets|Jarvis Hayes|Blocking|N
New Jersey Nets|Jarvis Hayes|Stealing|N
New Jersey Nets|Yi Jianlian|Shooting|N
New Jersey Nets|Yi Jianlian|Passing|N
New Jersey Nets|Yi Jianlian|Rebound|Y
New Jersey Nets|Yi Jianlian|Blocking|N
New Jersey Nets|Yi Jianlian|Stealing|N
New Jersey Nets|Bobby Simmons|Shooting|N
New Jersey Nets|Bobby Simmons|Passing|N
New Jersey Nets|Bobby Simmons|Rebound|Y
New Jersey Nets|Bobby Simmons|Blocking|N
New Jersey Nets|Bobby Simmons|Stealing|N
New Jersey Nets|Ryan Anderson|Shooting|N
New Jersey Nets|Ryan Anderson|Passing|N
New Jersey Nets|Ryan Anderson|Rebound|Y
New Jersey Nets|Ryan Anderson|Blocking|N
New Jersey Nets|Ryan Anderson|Stealing|N
New Jersey Nets|Chris Douglas-Roberts|Shooting|Y
New Jersey Nets|Chris Douglas-Roberts|Passing|N
New Jersey Nets|Chris Douglas-Roberts|Rebound|N
New Jersey Nets|Chris Douglas-Roberts|Blocking|N
New Jersey Nets|Chris Douglas-Roberts|Stealing|N
New Jersey Nets|Josh Boone|Shooting|Y
New Jersey Nets|Josh Boone|Passing|N
New Jersey Nets|Josh Boone|Rebound|Y
New Jersey Nets|Josh Boone|Blocking|N
New Jersey Nets|Josh Boone|Stealing|Y
New Jersey Nets|Trenton Hassell|Shooting|Y
New Jersey Nets|Trenton Hassell|Passing|N
New Jersey Nets|Trenton Hassell|Rebound|N
New Jersey Nets|Trenton Hassell|Blocking|N
New Jersey Nets|Trenton Hassell|Stealing|N
New Jersey Nets|Eduardo Najera|Shooting|N
New Jersey Nets|Eduardo Najera|Passing|N
New Jersey Nets|Eduardo Najera|Rebound|N
New Jersey Nets|Eduardo Najera|Blocking|Y
New Jersey Nets|Eduardo Najera|Stealing|N
Houston Rockets|Yao Ming|Shooting|Y
Houston Rockets|Yao Ming|Passing|N
Houston Rockets|Yao Ming|Rebound|Y
Houston Rockets|Yao Ming|Blocking|Y
Houston Rockets|Yao Ming|Stealing|Y
Houston Rockets|Ron Artest|Shooting|N
Houston Rockets|Ron Artest|Passing|Y
Houston Rockets|Ron Artest|Rebound|Y
Houston Rockets|Ron Artest|Blocking|N
Houston Rockets|Ron Artest|Stealing|N
Houston Rockets|Tracy McGrady|Shooting|N
Houston Rockets|Tracy McGrady|Passing|Y
Houston Rockets|Tracy McGrady|Rebound|Y
Houston Rockets|Tracy McGrady|Blocking|N
Houston Rockets|Tracy McGrady|Stealing|N
Houston Rockets|Luis Scola|Shooting|Y
Houston Rockets|Luis Scola|Passing|N
Houston Rockets|Luis Scola|Rebound|Y
Houston Rockets|Luis Scola|Blocking|N
Houston Rockets|Luis Scola|Stealing|Y
Houston Rockets|Aaron Brooks|Shooting|N
Houston Rockets|Aaron Brooks|Passing|Y
Houston Rockets|Aaron Brooks|Rebound|N
Houston Rockets|Aaron Brooks|Blocking|N
Houston Rockets|Aaron Brooks|Stealing|N
Houston Rockets|Von Wafer|Shooting|N
Houston Rockets|Von Wafer|Passing|N
Houston Rockets|Von Wafer|Rebound|N
Houston Rockets|Von Wafer|Blocking|N
Houston Rockets|Von Wafer|Stealing|Y
Houston Rockets|Carl Landry|Shooting|Y
Houston Rockets|Carl Landry|Passing|N
Houston Rockets|Carl Landry|Rebound|Y
Houston Rockets|Carl Landry|Blocking|N
Houston Rockets|Carl Landry|Stealing|Y
Houston Rockets|Kyle Lowry|Shooting|N
Houston Rockets|Kyle Lowry|Passing|Y
Houston Rockets|Kyle Lowry|Rebound|N
Houston Rockets|Kyle Lowry|Blocking|N
Houston Rockets|Kyle Lowry|Stealing|N
Houston Rockets|Shane Battier|Shooting|N
Houston Rockets|Shane Battier|Passing|Y
Houston Rockets|Shane Battier|Rebound|Y
Houston Rockets|Shane Battier|Blocking|N
Houston Rockets|Shane Battier|Stealing|N
Houston Rockets|Brent Barry|Shooting|N
Houston Rockets|Brent Barry|Passing|N
Houston Rockets|Brent Barry|Rebound|N
Houston Rockets|Brent Barry|Blocking|N
Houston Rockets|Brent Barry|Stealing|Y
Houston Rockets|Brian Cook|Shooting|N
Houston Rockets|Brian Cook|Passing|N
Houston Rockets|Brian Cook|Rebound|N
Houston Rockets|Brian Cook|Blocking|Y
Houston Rockets|Brian Cook|Stealing|N
Houston Rockets|Chuck Hayes|Shooting|N
Houston Rockets|Chuck Hayes|Passing|N
Houston Rockets|Chuck Hayes|Rebound|Y
Houston Rockets|Chuck Hayes|Blocking|N
Houston Rockets|Chuck Hayes|Stealing|N
New York Knicks|Al Harrington|Shooting|N
New York Knicks|Al Harrington|Passing|N
New York Knicks|Al Harrington|Rebound|Y
New York Knicks|Al Harrington|Blocking|N
New York Knicks|Al Harrington|Stealing|N
New York Knicks|Nate Robinson|Shooting|N
New York Knicks|Nate Robinson|Passing|Y
New York Knicks|Nate Robinson|Rebound|Y
New York Knicks|Nate Robinson|Blocking|N
New York Knicks|Nate Robinson|Stealing|N
New York Knicks|David Lee|Shooting|Y
New York Knicks|David Lee|Passing|Y
New York Knicks|David Lee|Rebound|Y
New York Knicks|David Lee|Blocking|N
New York Knicks|David Lee|Stealing|Y
New York Knicks|Wilson Chandler|Shooting|N
New York Knicks|Wilson Chandler|Passing|Y
New York Knicks|Wilson Chandler|Rebound|Y
New York Knicks|Wilson Chandler|Blocking|N
New York Knicks|Wilson Chandler|Stealing|N
New York Knicks|Larry Hughes|Shooting|N
New York Knicks|Larry Hughes|Passing|Y
New York Knicks|Larry Hughes|Rebound|N
New York Knicks|Larry Hughes|Blocking|N
New York Knicks|Larry Hughes|Stealing|N
New York Knicks|Chris Duhon|Shooting|N
New York Knicks|Chris Duhon|Passing|Y
New York Knicks|Chris Duhon|Rebound|Y
New York Knicks|Chris Duhon|Blocking|N
New York Knicks|Chris Duhon|Stealing|N
New York Knicks|Quentin Richardson|Shooting|N
New York Knicks|Quentin Richardson|Passing|N
New York Knicks|Quentin Richardson|Rebound|Y
New York Knicks|Quentin Richardson|Blocking|N
New York Knicks|Quentin Richardson|Stealing|N
New York Knicks|Danilo Gallinari|Shooting|N
New York Knicks|Danilo Gallinari|Passing|N
New York Knicks|Danilo Gallinari|Rebound|N
New York Knicks|Danilo Gallinari|Blocking|N
New York Knicks|Danilo Gallinari|Stealing|Y
New York Knicks|Chris Wilcox|Shooting|Y
New York Knicks|Chris Wilcox|Passing|N
New York Knicks|Chris Wilcox|Rebound|Y
New York Knicks|Chris Wilcox|Blocking|N
New York Knicks|Chris Wilcox|Stealing|N
New York Knicks|Jared Jeffries|Shooting|N
New York Knicks|Jared Jeffries|Passing|N
New York Knicks|Jared Jeffries|Rebound|Y
New York Knicks|Jared Jeffries|Blocking|N
New York Knicks|Jared Jeffries|Stealing|N
New York Knicks|Mouhamed Sene|Shooting|Y
New York Knicks|Mouhamed Sene|Passing|N
New York Knicks|Mouhamed Sene|Rebound|N
New York Knicks|Mouhamed Sene|Blocking|N
New York Knicks|Mouhamed Sene|Stealing|Y
New York Knicks|Cheikh Samb|Shooting|Y
New York Knicks|Cheikh Samb|Passing|N
New York Knicks|Cheikh Samb|Rebound|N
New York Knicks|Cheikh Samb|Blocking|N
New York Knicks|Cheikh Samb|Stealing|N
Memphis Grizzlies|Rudy Gay|Shooting|Y
Memphis Grizzlies|Rudy Gay|Passing|N
Memphis Grizzlies|Rudy Gay|Rebound|Y
Memphis Grizzlies|Rudy Gay|Blocking|N
Memphis Grizzlies|Rudy Gay|Stealing|N
Memphis Grizzlies|OJ Mayo|Shooting|N
Memphis Grizzlies|OJ Mayo|Passing|Y
Memphis Grizzlies|OJ Mayo|Rebound|Y
Memphis Grizzlies|OJ Mayo|Blocking|N
Memphis Grizzlies|OJ Mayo|Stealing|N
Memphis Grizzlies|Marc Gasol|Shooting|Y
Memphis Grizzlies|Marc Gasol|Passing|N
Memphis Grizzlies|Marc Gasol|Rebound|Y
Memphis Grizzlies|Marc Gasol|Blocking|Y
Memphis Grizzlies|Marc Gasol|Stealing|Y
Memphis Grizzlies|Hakim Warrick|Shooting|Y
Memphis Grizzlies|Hakim Warrick|Passing|N
Memphis Grizzlies|Hakim Warrick|Rebound|Y
Memphis Grizzlies|Hakim Warrick|Blocking|N
Memphis Grizzlies|Hakim Warrick|Stealing|N
Memphis Grizzlies|Mike Conley|Shooting|N
Memphis Grizzlies|Mike Conley|Passing|Y
Memphis Grizzlies|Mike Conley|Rebound|Y
Memphis Grizzlies|Mike Conley|Blocking|N
Memphis Grizzlies|Mike Conley|Stealing|N
Memphis Grizzlies|Darrell Arthur|Shooting|N
Memphis Grizzlies|Darrell Arthur|Passing|N
Memphis Grizzlies|Darrell Arthur|Rebound|Y
Memphis Grizzlies|Darrell Arthur|Blocking|N
Memphis Grizzlies|Darrell Arthur|Stealing|N
Memphis Grizzlies|Darko Milicic|Shooting|Y
Memphis Grizzlies|Darko Milicic|Passing|N
Memphis Grizzlies|Darko Milicic|Rebound|Y
Memphis Grizzlies|Darko Milicic|Blocking|N
Memphis Grizzlies|Darko Milicic|Stealing|Y
Memphis Grizzlies|Quinton Ross|Shooting|N
Memphis Grizzlies|Quinton Ross|Passing|Y
Memphis Grizzlies|Quinton Ross|Rebound|N
Memphis Grizzlies|Quinton Ross|Blocking|N
Memphis Grizzlies|Quinton Ross|Stealing|N
Memphis Grizzlies|Darius Miles|Shooting|Y
Memphis Grizzlies|Darius Miles|Passing|N
Memphis Grizzlies|Darius Miles|Rebound|N
Memphis Grizzlies|Darius Miles|Blocking|N
Memphis Grizzlies|Darius Miles|Stealing|N
Memphis Grizzlies|Marko Jaric|Shooting|N
Memphis Grizzlies|Marko Jaric|Passing|N
Memphis Grizzlies|Marko Jaric|Rebound|N
Memphis Grizzlies|Marko Jaric|Blocking|Y
Memphis Grizzlies|Marko Jaric|Stealing|N
Memphis Grizzlies|Greg Buckner|Shooting|N
Memphis Grizzlies|Greg Buckner|Passing|N
Memphis Grizzlies|Greg Buckner|Rebound|N
Memphis Grizzlies|Greg Buckner|Blocking|N
Memphis Grizzlies|Greg Buckner|Stealing|Y
Memphis Grizzlies|Hamed Haddadi|Shooting|Y
Memphis Grizzlies|Hamed Haddadi|Passing|N
Memphis Grizzlies|Hamed Haddadi|Rebound|N
Memphis Grizzlies|Hamed Haddadi|Blocking|N
Memphis Grizzlies|Hamed Haddadi|Stealing|N
Philadelphia 76ers|Andre Iguodala|Shooting|Y
Philadelphia 76ers|Andre Iguodala|Passing|Y
Philadelphia 76ers|Andre Iguodala|Rebound|Y
Philadelphia 76ers|Andre Iguodala|Blocking|N
Philadelphia 76ers|Andre Iguodala|Stealing|N
Philadelphia 76ers|Andre Miller|Shooting|Y
Philadelphia 76ers|Andre Miller|Passing|Y
Philadelphia 76ers|Andre Miller|Rebound|Y
Philadelphia 76ers|Andre Miller|Blocking|N
Philadelphia 76ers|Andre Miller|Stealing|N
Philadelphia 76ers|Thaddeus Young|Shooting|Y
Philadelphia 76ers|Thaddeus Young|Passing|N
Philadelphia 76ers|Thaddeus Young|Rebound|Y
Philadelphia 76ers|Thaddeus Young|Blocking|N
Philadelphia 76ers|Thaddeus Young|Stealing|N
Philadelphia 76ers|Elton Brand|Shooting|N
Philadelphia 76ers|Elton Brand|Passing|N
Philadelphia 76ers|Elton Brand|Rebound|Y
Philadelphia 76ers|Elton Brand|Blocking|Y
Philadelphia 76ers|Elton Brand|Stealing|N
Philadelphia 76ers|Louis Williams|Shooting|N
Philadelphia 76ers|Louis Williams|Passing|Y
Philadelphia 76ers|Louis Williams|Rebound|N
Philadelphia 76ers|Louis Williams|Blocking|N
Philadelphia 76ers|Louis Williams|Stealing|N
Philadelphia 76ers|Willie Green|Shooting|N
Philadelphia 76ers|Willie Green|Passing|Y
Philadelphia 76ers|Willie Green|Rebound|N
Philadelphia 76ers|Willie Green|Blocking|N
Philadelphia 76ers|Willie Green|Stealing|N
Philadelphia 76ers|Marreese Speights|Shooting|Y
Philadelphia 76ers|Marreese Speights|Passing|N
Philadelphia 76ers|Marreese Speights|Rebound|Y
Philadelphia 76ers|Marreese Speights|Blocking|N
Philadelphia 76ers|Marreese Speights|Stealing|Y
Philadelphia 76ers|Samuel Dalembert|Shooting|Y
Philadelphia 76ers|Samuel Dalembert|Passing|N
Philadelphia 76ers|Samuel Dalembert|Rebound|Y
Philadelphia 76ers|Samuel Dalembert|Blocking|Y
Philadelphia 76ers|Samuel Dalembert|Stealing|N
Philadelphia 76ers|Donyell Marshall|Shooting|Y
Philadelphia 76ers|Donyell Marshall|Passing|N
Philadelphia 76ers|Donyell Marshall|Rebound|N
Philadelphia 76ers|Donyell Marshall|Blocking|N
Philadelphia 76ers|Donyell Marshall|Stealing|N
Philadelphia 76ers|Reggie Evans|Shooting|N
Philadelphia 76ers|Reggie Evans|Passing|N
Philadelphia 76ers|Reggie Evans|Rebound|Y
Philadelphia 76ers|Reggie Evans|Blocking|N
Philadelphia 76ers|Reggie Evans|Stealing|N
Philadelphia 76ers|Royal Ivey|Shooting|N
Philadelphia 76ers|Royal Ivey|Passing|N
Philadelphia 76ers|Royal Ivey|Rebound|N
Philadelphia 76ers|Royal Ivey|Blocking|N
Philadelphia 76ers|Royal Ivey|Stealing|Y
Philadelphia 76ers|Theo Ratliff|Shooting|Y
Philadelphia 76ers|Theo Ratliff|Passing|N
Philadelphia 76ers|Theo Ratliff|Rebound|N
Philadelphia 76ers|Theo Ratliff|Blocking|Y
Philadelphia 76ers|Theo Ratliff|Stealing|Y
New Orleans Hornets|Chris Paul|Shooting|Y
New Orleans Hornets|Chris Paul|Passing|Y
New Orleans Hornets|Chris Paul|Rebound|Y
New Orleans Hornets|Chris Paul|Blocking|N
New Orleans Hornets|Chris Paul|Stealing|Y
New Orleans Hornets|David West|Shooting|Y
New Orleans Hornets|David West|Passing|Y
New Orleans Hornets|David West|Rebound|Y
New Orleans Hornets|David West|Blocking|N
New Orleans Hornets|David West|Stealing|N
New Orleans Hornets|Predrag Stojakovic|Shooting|N
New Orleans Hornets|Predrag Stojakovic|Passing|N
New Orleans Hornets|Predrag Stojakovic|Rebound|Y
New Orleans Hornets|Predrag Stojakovic|Blocking|N
New Orleans Hornets|Predrag Stojakovic|Stealing|N
New Orleans Hornets|Rasual Butler|Shooting|N
New Orleans Hornets|Rasual Butler|Passing|N
New Orleans Hornets|Rasual Butler|Rebound|Y
New Orleans Hornets|Rasual Butler|Blocking|N
New Orleans Hornets|Rasual Butler|Stealing|N
New Orleans Hornets|James Posey|Shooting|N
New Orleans Hornets|James Posey|Passing|N
New Orleans Hornets|James Posey|Rebound|Y
New Orleans Hornets|James Posey|Blocking|N
New Orleans Hornets|James Posey|Stealing|N
New Orleans Hornets|Tyson Chandler|Shooting|Y
New Orleans Hornets|Tyson Chandler|Passing|N
New Orleans Hornets|Tyson Chandler|Rebound|Y
New Orleans Hornets|Tyson Chandler|Blocking|Y
New Orleans Hornets|Tyson Chandler|Stealing|Y
New Orleans Hornets|Devin Brown|Shooting|N
New Orleans Hornets|Devin Brown|Passing|N
New Orleans Hornets|Devin Brown|Rebound|N
New Orleans Hornets|Devin Brown|Blocking|Y
New Orleans Hornets|Devin Brown|Stealing|N
New Orleans Hornets|Hilton Armstrong|Shooting|Y
New Orleans Hornets|Hilton Armstrong|Passing|N
New Orleans Hornets|Hilton Armstrong|Rebound|N
New Orleans Hornets|Hilton Armstrong|Blocking|N
New Orleans Hornets|Hilton Armstrong|Stealing|Y
New Orleans Hornets|Julian Wright|Shooting|Y
New Orleans Hornets|Julian Wright|Passing|N
New Orleans Hornets|Julian Wright|Rebound|N
New Orleans Hornets|Julian Wright|Blocking|N
New Orleans Hornets|Julian Wright|Stealing|N
New Orleans Hornets|Morris Peterson|Shooting|Y
New Orleans Hornets|Morris Peterson|Passing|N
New Orleans Hornets|Morris Peterson|Rebound|N
New Orleans Hornets|Morris Peterson|Blocking|N
New Orleans Hornets|Morris Peterson|Stealing|N
New Orleans Hornets|Antonio Daniels|Shooting|N
New Orleans Hornets|Antonio Daniels|Passing|Y
New Orleans Hornets|Antonio Daniels|Rebound|N
New Orleans Hornets|Antonio Daniels|Blocking|N
New Orleans Hornets|Antonio Daniels|Stealing|N
New Orleans Hornets|Sean Marks|Shooting|Y
New Orleans Hornets|Sean Marks|Passing|N
New Orleans Hornets|Sean Marks|Rebound|Y
New Orleans Hornets|Sean Marks|Blocking|N
New Orleans Hornets|Sean Marks|Stealing|N
San Antonio Spurs|Tony Parker|Shooting|Y
San Antonio Spurs|Tony Parker|Passing|Y
San Antonio Spurs|Tony Parker|Rebound|Y
San Antonio Spurs|Tony Parker|Blocking|N
San Antonio Spurs|Tony Parker|Stealing|Y
San Antonio Spurs|Tim Duncan|Shooting|N
San Antonio Spurs|Tim Duncan|Passing|Y
San Antonio Spurs|Tim Duncan|Rebound|Y
San Antonio Spurs|Tim Duncan|Blocking|Y
San Antonio Spurs|Tim Duncan|Stealing|Y
San Antonio Spurs|Manu Ginobili|Shooting|Y
San Antonio Spurs|Manu Ginobili|Passing|Y
San Antonio Spurs|Manu Ginobili|Rebound|Y
San Antonio Spurs|Manu Ginobili|Blocking|N
San Antonio Spurs|Manu Ginobili|Stealing|N
San Antonio Spurs|Roger Mason|Shooting|N
San Antonio Spurs|Roger Mason|Passing|Y
San Antonio Spurs|Roger Mason|Rebound|Y
San Antonio Spurs|Roger Mason|Blocking|N
San Antonio Spurs|Roger Mason|Stealing|N
San Antonio Spurs|Drew Gooden|Shooting|Y
San Antonio Spurs|Drew Gooden|Passing|N
San Antonio Spurs|Drew Gooden|Rebound|Y
San Antonio Spurs|Drew Gooden|Blocking|N
San Antonio Spurs|Drew Gooden|Stealing|N
San Antonio Spurs|Michael Finley|Shooting|N
San Antonio Spurs|Michael Finley|Passing|N
San Antonio Spurs|Michael Finley|Rebound|Y
San Antonio Spurs|Michael Finley|Blocking|N
San Antonio Spurs|Michael Finley|Stealing|N
San Antonio Spurs|Matt Bonner|Shooting|Y
San Antonio Spurs|Matt Bonner|Passing|N
San Antonio Spurs|Matt Bonner|Rebound|Y
San Antonio Spurs|Matt Bonner|Blocking|N
San Antonio Spurs|Matt Bonner|Stealing|N
San Antonio Spurs|George Hill|Shooting|N
San Antonio Spurs|George Hill|Passing|N
San Antonio Spurs|George Hill|Rebound|Y
San Antonio Spurs|George Hill|Blocking|N
San Antonio Spurs|George Hill|Stealing|N
San Antonio Spurs|Ime Udoka|Shooting|N
San Antonio Spurs|Ime Udoka|Passing|N
San Antonio Spurs|Ime Udoka|Rebound|Y
San Antonio Spurs|Ime Udoka|Blocking|N
San Antonio Spurs|Ime Udoka|Stealing|N
San Antonio Spurs|Kurt Thomas|Shooting|Y
San Antonio Spurs|Kurt Thomas|Passing|N
San Antonio Spurs|Kurt Thomas|Rebound|Y
San Antonio Spurs|Kurt Thomas|Blocking|N
San Antonio Spurs|Kurt Thomas|Stealing|Y
San Antonio Spurs|Malik Hairston|Shooting|Y
San Antonio Spurs|Malik Hairston|Passing|N
San Antonio Spurs|Malik Hairston|Rebound|N
San Antonio Spurs|Malik Hairston|Blocking|N
San Antonio Spurs|Malik Hairston|Stealing|N
San Antonio Spurs|Bruce Bowen|Shooting|N
San Antonio Spurs|Bruce Bowen|Passing|N
San Antonio Spurs|Bruce Bowen|Rebound|N
San Antonio Spurs|Bruce Bowen|Blocking|N
San Antonio Spurs|Bruce Bowen|Stealing|Y
Chicago Bulls|Ben Gordon|Shooting|Y
Chicago Bulls|Ben Gordon|Passing|Y
Chicago Bulls|Ben Gordon|Rebound|Y
Chicago Bulls|Ben Gordon|Blocking|N
Chicago Bulls|Ben Gordon|Stealing|N
Chicago Bulls|John Salmons|Shooting|Y
Chicago Bulls|John Salmons|Passing|Y
Chicago Bulls|John Salmons|Rebound|Y
Chicago Bulls|John Salmons|Blocking|N
Chicago Bulls|John Salmons|Stealing|N
Chicago Bulls|Derrick Rose|Shooting|Y
Chicago Bulls|Derrick Rose|Passing|Y
Chicago Bulls|Derrick Rose|Rebound|Y
Chicago Bulls|Derrick Rose|Blocking|N
Chicago Bulls|Derrick Rose|Stealing|N
Chicago Bulls|Luol Deng|Shooting|N
Chicago Bulls|Luol Deng|Passing|N
Chicago Bulls|Luol Deng|Rebound|Y
Chicago Bulls|Luol Deng|Blocking|N
Chicago Bulls|Luol Deng|Stealing|N
Chicago Bulls|Brad Miller|Shooting|Y
Chicago Bulls|Brad Miller|Passing|Y
Chicago Bulls|Brad Miller|Rebound|Y
Chicago Bulls|Brad Miller|Blocking|N
Chicago Bulls|Brad Miller|Stealing|N
Chicago Bulls|Tyrus Thomas|Shooting|Y
Chicago Bulls|Tyrus Thomas|Passing|N
Chicago Bulls|Tyrus Thomas|Rebound|Y
Chicago Bulls|Tyrus Thomas|Blocking|Y
Chicago Bulls|Tyrus Thomas|Stealing|N
Chicago Bulls|Kirk Hinrich|Shooting|N
Chicago Bulls|Kirk Hinrich|Passing|Y
Chicago Bulls|Kirk Hinrich|Rebound|N
Chicago Bulls|Kirk Hinrich|Blocking|N
Chicago Bulls|Kirk Hinrich|Stealing|N
Chicago Bulls|Joakim Noah|Shooting|Y
Chicago Bulls|Joakim Noah|Passing|N
Chicago Bulls|Joakim Noah|Rebound|Y
Chicago Bulls|Joakim Noah|Blocking|Y
Chicago Bulls|Joakim Noah|Stealing|Y
Chicago Bulls|Tim Thomas|Shooting|N
Chicago Bulls|Tim Thomas|Passing|N
Chicago Bulls|Tim Thomas|Rebound|Y
Chicago Bulls|Tim Thomas|Blocking|N
Chicago Bulls|Tim Thomas|Stealing|N
Chicago Bulls|Aaron Gray|Shooting|Y
Chicago Bulls|Aaron Gray|Passing|N
Chicago Bulls|Aaron Gray|Rebound|Y
Chicago Bulls|Aaron Gray|Blocking|N
Chicago Bulls|Aaron Gray|Stealing|N
Chicago Bulls|Lindsey Hunter|Shooting|N
Chicago Bulls|Lindsey Hunter|Passing|Y
Chicago Bulls|Lindsey Hunter|Rebound|N
Chicago Bulls|Lindsey Hunter|Blocking|N
Chicago Bulls|Lindsey Hunter|Stealing|N
Chicago Bulls|Anthony Roberson|Shooting|N
Chicago Bulls|Anthony Roberson|Passing|Y
Chicago Bulls|Anthony Roberson|Rebound|N
Chicago Bulls|Anthony Roberson|Blocking|N
Chicago Bulls|Anthony Roberson|Stealing|N
Denver Nuggets|Carmelo Anthony|Shooting|N
Denver Nuggets|Carmelo Anthony|Passing|Y
Denver Nuggets|Carmelo Anthony|Rebound|Y
Denver Nuggets|Carmelo Anthony|Blocking|N
Denver Nuggets|Carmelo Anthony|Stealing|N
Denver Nuggets|Chauncey Billups|Shooting|N
Denver Nuggets|Chauncey Billups|Passing|Y
Denver Nuggets|Chauncey Billups|Rebound|Y
Denver Nuggets|Chauncey Billups|Blocking|N
Denver Nuggets|Chauncey Billups|Stealing|N
Denver Nuggets|JR Smith|Shooting|N
Denver Nuggets|JR Smith|Passing|Y
Denver Nuggets|JR Smith|Rebound|Y
Denver Nuggets|JR Smith|Blocking|N
Denver Nuggets|JR Smith|Stealing|N
Denver Nuggets|Nene Nene|Shooting|Y
Denver Nuggets|Nene Nene|Passing|N
Denver Nuggets|Nene Nene|Rebound|Y
Denver Nuggets|Nene Nene|Blocking|Y
Denver Nuggets|Nene Nene|Stealing|Y
Denver Nuggets|Kenyon Martin|Shooting|Y
Denver Nuggets|Kenyon Martin|Passing|Y
Denver Nuggets|Kenyon Martin|Rebound|Y
Denver Nuggets|Kenyon Martin|Blocking|Y
Denver Nuggets|Kenyon Martin|Stealing|N
Denver Nuggets|Linas Kleiza|Shooting|N
Denver Nuggets|Linas Kleiza|Passing|N
Denver Nuggets|Linas Kleiza|Rebound|Y
Denver Nuggets|Linas Kleiza|Blocking|N
Denver Nuggets|Linas Kleiza|Stealing|N
Denver Nuggets|Chris Andersen|Shooting|Y
Denver Nuggets|Chris Andersen|Passing|N
Denver Nuggets|Chris Andersen|Rebound|Y
Denver Nuggets|Chris Andersen|Blocking|Y
Denver Nuggets|Chris Andersen|Stealing|Y
Denver Nuggets|Dahntay Jones|Shooting|Y
Denver Nuggets|Dahntay Jones|Passing|N
Denver Nuggets|Dahntay Jones|Rebound|N
Denver Nuggets|Dahntay Jones|Blocking|N
Denver Nuggets|Dahntay Jones|Stealing|N
Denver Nuggets|Anthony Carter|Shooting|N
Denver Nuggets|Anthony Carter|Passing|Y
Denver Nuggets|Anthony Carter|Rebound|N
Denver Nuggets|Anthony Carter|Blocking|N
Denver Nuggets|Anthony Carter|Stealing|N
Denver Nuggets|Renaldo Balkman|Shooting|Y
Denver Nuggets|Renaldo Balkman|Passing|N
Denver Nuggets|Renaldo Balkman|Rebound|Y
Denver Nuggets|Renaldo Balkman|Blocking|N
Denver Nuggets|Renaldo Balkman|Stealing|Y
Denver Nuggets|Johan Petro|Shooting|N
Denver Nuggets|Johan Petro|Passing|N
Denver Nuggets|Johan Petro|Rebound|Y
Denver Nuggets|Johan Petro|Blocking|N
Denver Nuggets|Johan Petro|Stealing|N
Denver Nuggets|Jason Hart|Shooting|N
Denver Nuggets|Jason Hart|Passing|N
Denver Nuggets|Jason Hart|Rebound|N
Denver Nuggets|Jason Hart|Blocking|N
Denver Nuggets|Jason Hart|Stealing|Y
Minnesota Timberwolves|Al Jefferson|Shooting|Y
Minnesota Timberwolves|Al Jefferson|Passing|N
Minnesota Timberwolves|Al Jefferson|Rebound|Y
Minnesota Timberwolves|Al Jefferson|Blocking|Y
Minnesota Timberwolves|Al Jefferson|Stealing|N
Minnesota Timberwolves|Randy Foye|Shooting|N
Minnesota Timberwolves|Randy Foye|Passing|Y
Minnesota Timberwolves|Randy Foye|Rebound|Y
Minnesota Timberwolves|Randy Foye|Blocking|N
Minnesota Timberwolves|Randy Foye|Stealing|N
Minnesota Timberwolves|Ryan Gomes|Shooting|N
Minnesota Timberwolves|Ryan Gomes|Passing|N
Minnesota Timberwolves|Ryan Gomes|Rebound|Y
Minnesota Timberwolves|Ryan Gomes|Blocking|N
Minnesota Timberwolves|Ryan Gomes|Stealing|N
Minnesota Timberwolves|Kevin Love|Shooting|Y
Minnesota Timberwolves|Kevin Love|Passing|N
Minnesota Timberwolves|Kevin Love|Rebound|Y
Minnesota Timberwolves|Kevin Love|Blocking|N
Minnesota Timberwolves|Kevin Love|Stealing|N
Minnesota Timberwolves|Craig Smith|Shooting|Y
Minnesota Timberwolves|Craig Smith|Passing|N
Minnesota Timberwolves|Craig Smith|Rebound|Y
Minnesota Timberwolves|Craig Smith|Blocking|N
Minnesota Timberwolves|Craig Smith|Stealing|Y
Minnesota Timberwolves|Mike Miller|Shooting|Y
Minnesota Timberwolves|Mike Miller|Passing|Y
Minnesota Timberwolves|Mike Miller|Rebound|Y
Minnesota Timberwolves|Mike Miller|Blocking|N
Minnesota Timberwolves|Mike Miller|Stealing|N
Minnesota Timberwolves|Sebastian Telfair|Shooting|N
Minnesota Timberwolves|Sebastian Telfair|Passing|Y
Minnesota Timberwolves|Sebastian Telfair|Rebound|N
Minnesota Timberwolves|Sebastian Telfair|Blocking|N
Minnesota Timberwolves|Sebastian Telfair|Stealing|N
Minnesota Timberwolves|Rodney Carney|Shooting|Y
Minnesota Timberwolves|Rodney Carney|Passing|N
Minnesota Timberwolves|Rodney Carney|Rebound|N
Minnesota Timberwolves|Rodney Carney|Blocking|N
Minnesota Timberwolves|Rodney Carney|Stealing|N
Minnesota Timberwolves|Corey Brewer|Shooting|N
Minnesota Timberwolves|Corey Brewer|Passing|N
Minnesota Timberwolves|Corey Brewer|Rebound|Y
Minnesota Timberwolves|Corey Brewer|Blocking|N
Minnesota Timberwolves|Corey Brewer|Stealing|N
Minnesota Timberwolves|Bobby Brown|Shooting|N
Minnesota Timberwolves|Bobby Brown|Passing|N
Minnesota Timberwolves|Bobby Brown|Rebound|Y
Minnesota Timberwolves|Bobby Brown|Blocking|N
Minnesota Timberwolves|Bobby Brown|Stealing|N
Minnesota Timberwolves|Kevin Ollie|Shooting|N
Minnesota Timberwolves|Kevin Ollie|Passing|Y
Minnesota Timberwolves|Kevin Ollie|Rebound|N
Minnesota Timberwolves|Kevin Ollie|Blocking|N
Minnesota Timberwolves|Kevin Ollie|Stealing|N
Minnesota Timberwolves|Brian Cardinal|Shooting|N
Minnesota Timberwolves|Brian Cardinal|Passing|N
Minnesota Timberwolves|Brian Cardinal|Rebound|N
Minnesota Timberwolves|Brian Cardinal|Blocking|Y
Minnesota Timberwolves|Brian Cardinal|Stealing|N
Detroit Pistons|Richard Hamilton|Shooting|N
Detroit Pistons|Richard Hamilton|Passing|Y
Detroit Pistons|Richard Hamilton|Rebound|Y
Detroit Pistons|Richard Hamilton|Blocking|N
Detroit Pistons|Richard Hamilton|Stealing|N
Detroit Pistons|Allen Iverson|Shooting|N
Detroit Pistons|Allen Iverson|Passing|Y
Detroit Pistons|Allen Iverson|Rebound|Y
Detroit Pistons|Allen Iverson|Blocking|N
Detroit Pistons|Allen Iverson|Stealing|N
Detroit Pistons|Tayshaun Prince|Shooting|Y
Detroit Pistons|Tayshaun Prince|Passing|Y
Detroit Pistons|Tayshaun Prince|Rebound|Y
Detroit Pistons|Tayshaun Prince|Blocking|N
Detroit Pistons|Tayshaun Prince|Stealing|N
Detroit Pistons|Rodney Stuckey|Shooting|N
Detroit Pistons|Rodney Stuckey|Passing|Y
Detroit Pistons|Rodney Stuckey|Rebound|Y
Detroit Pistons|Rodney Stuckey|Blocking|N
Detroit Pistons|Rodney Stuckey|Stealing|N
Detroit Pistons|Rasheed Wallace|Shooting|N
Detroit Pistons|Rasheed Wallace|Passing|N
Detroit Pistons|Rasheed Wallace|Rebound|Y
Detroit Pistons|Rasheed Wallace|Blocking|Y
Detroit Pistons|Rasheed Wallace|Stealing|N
Detroit Pistons|Antonio McDyess|Shooting|Y
Detroit Pistons|Antonio McDyess|Passing|N
Detroit Pistons|Antonio McDyess|Rebound|Y
Detroit Pistons|Antonio McDyess|Blocking|N
Detroit Pistons|Antonio McDyess|Stealing|Y
Detroit Pistons|Will Bynum|Shooting|Y
Detroit Pistons|Will Bynum|Passing|Y
Detroit Pistons|Will Bynum|Rebound|N
Detroit Pistons|Will Bynum|Blocking|N
Detroit Pistons|Will Bynum|Stealing|N
Detroit Pistons|Jason Maxiell|Shooting|Y
Detroit Pistons|Jason Maxiell|Passing|N
Detroit Pistons|Jason Maxiell|Rebound|Y
Detroit Pistons|Jason Maxiell|Blocking|N
Detroit Pistons|Jason Maxiell|Stealing|Y
Detroit Pistons|Arron Afflalo|Shooting|N
Detroit Pistons|Arron Afflalo|Passing|N
Detroit Pistons|Arron Afflalo|Rebound|Y
Detroit Pistons|Arron Afflalo|Blocking|N
Detroit Pistons|Arron Afflalo|Stealing|N
Detroit Pistons|Kwame Brown|Shooting|Y
Detroit Pistons|Kwame Brown|Passing|N
Detroit Pistons|Kwame Brown|Rebound|Y
Detroit Pistons|Kwame Brown|Blocking|N
Detroit Pistons|Kwame Brown|Stealing|Y
Detroit Pistons|Walter Herrmann|Shooting|Y
Detroit Pistons|Walter Herrmann|Passing|N
Detroit Pistons|Walter Herrmann|Rebound|N
Detroit Pistons|Walter Herrmann|Blocking|N
Detroit Pistons|Walter Herrmann|Stealing|N
Detroit Pistons|Amir Johnson|Shooting|Y
Detroit Pistons|Amir Johnson|Passing|N
Detroit Pistons|Amir Johnson|Rebound|Y
Detroit Pistons|Amir Johnson|Blocking|N
Detroit Pistons|Amir Johnson|Stealing|Y
Portland Trail Blazers|Brandon Roy|Shooting|Y
Portland Trail Blazers|Brandon Roy|Passing|Y
Portland Trail Blazers|Brandon Roy|Rebound|Y
Portland Trail Blazers|Brandon Roy|Blocking|N
Portland Trail Blazers|Brandon Roy|Stealing|N
Portland Trail Blazers|LaMarcus Aldridge|Shooting|Y
Portland Trail Blazers|LaMarcus Aldridge|Passing|N
Portland Trail Blazers|LaMarcus Aldridge|Rebound|Y
Portland Trail Blazers|LaMarcus Aldridge|Blocking|N
Portland Trail Blazers|LaMarcus Aldridge|Stealing|N
Portland Trail Blazers|Travis Outlaw|Shooting|Y
Portland Trail Blazers|Travis Outlaw|Passing|N
Portland Trail Blazers|Travis Outlaw|Rebound|Y
Portland Trail Blazers|Travis Outlaw|Blocking|N
Portland Trail Blazers|Travis Outlaw|Stealing|N
Portland Trail Blazers|Steve Blake|Shooting|N
Portland Trail Blazers|Steve Blake|Passing|Y
Portland Trail Blazers|Steve Blake|Rebound|N
Portland Trail Blazers|Steve Blake|Blocking|N
Portland Trail Blazers|Steve Blake|Stealing|N
Portland Trail Blazers|Rudy Fernandez|Shooting|N
Portland Trail Blazers|Rudy Fernandez|Passing|Y
Portland Trail Blazers|Rudy Fernandez|Rebound|N
Portland Trail Blazers|Rudy Fernandez|Blocking|N
Portland Trail Blazers|Rudy Fernandez|Stealing|N
Portland Trail Blazers|Greg Oden|Shooting|Y
Portland Trail Blazers|Greg Oden|Passing|N
Portland Trail Blazers|Greg Oden|Rebound|Y
Portland Trail Blazers|Greg Oden|Blocking|Y
Portland Trail Blazers|Greg Oden|Stealing|Y
Portland Trail Blazers|Joel Przybilla|Shooting|Y
Portland Trail Blazers|Joel Przybilla|Passing|N
Portland Trail Blazers|Joel Przybilla|Rebound|Y
Portland Trail Blazers|Joel Przybilla|Blocking|Y
Portland Trail Blazers|Joel Przybilla|Stealing|Y
Portland Trail Blazers|Nicolas Batum|Shooting|N
Portland Trail Blazers|Nicolas Batum|Passing|Y
Portland Trail Blazers|Nicolas Batum|Rebound|N
Portland Trail Blazers|Nicolas Batum|Blocking|N
Portland Trail Blazers|Nicolas Batum|Stealing|N
Portland Trail Blazers|Sergio Rodriguez|Shooting|N
Portland Trail Blazers|Sergio Rodriguez|Passing|Y
Portland Trail Blazers|Sergio Rodriguez|Rebound|N
Portland Trail Blazers|Sergio Rodriguez|Blocking|N
Portland Trail Blazers|Sergio Rodriguez|Stealing|N
Portland Trail Blazers|Jerryd Bayless|Shooting|Y
Portland Trail Blazers|Jerryd Bayless|Passing|N
Portland Trail Blazers|Jerryd Bayless|Rebound|N
Portland Trail Blazers|Jerryd Bayless|Blocking|N
Portland Trail Blazers|Jerryd Bayless|Stealing|N
Portland Trail Blazers|Channing Frye|Shooting|N
Portland Trail Blazers|Channing Frye|Passing|N
Portland Trail Blazers|Channing Frye|Rebound|N
Portland Trail Blazers|Channing Frye|Blocking|N
Portland Trail Blazers|Channing Frye|Stealing|Y
Portland Trail Blazers|Shavlik Randolph|Shooting|Y
Portland Trail Blazers|Shavlik Randolph|Passing|N
Portland Trail Blazers|Shavlik Randolph|Rebound|N
Portland Trail Blazers|Shavlik Randolph|Blocking|N
Portland Trail Blazers|Shavlik Randolph|Stealing|Y
Indiana Pacers|Danny Granger|Shooting|N
Indiana Pacers|Danny Granger|Passing|Y
Indiana Pacers|Danny Granger|Rebound|Y
Indiana Pacers|Danny Granger|Blocking|Y
Indiana Pacers|Danny Granger|Stealing|N
Indiana Pacers|Mike Dunleavy|Shooting|N
Indiana Pacers|Mike Dunleavy|Passing|Y
Indiana Pacers|Mike Dunleavy|Rebound|Y
Indiana Pacers|Mike Dunleavy|Blocking|N
Indiana Pacers|Mike Dunleavy|Stealing|N
Indiana Pacers|T.J. Ford|Shooting|Y
Indiana Pacers|T.J. Ford|Passing|Y
Indiana Pacers|T.J. Ford|Rebound|Y
Indiana Pacers|T.J. Ford|Blocking|N
Indiana Pacers|T.J. Ford|Stealing|N
Indiana Pacers|Troy Murphy|Shooting|Y
Indiana Pacers|Troy Murphy|Passing|Y
Indiana Pacers|Troy Murphy|Rebound|Y
Indiana Pacers|Troy Murphy|Blocking|N
Indiana Pacers|Troy Murphy|Stealing|N
Indiana Pacers|Marquis Daniels|Shooting|Y
Indiana Pacers|Marquis Daniels|Passing|Y
Indiana Pacers|Marquis Daniels|Rebound|Y
Indiana Pacers|Marquis Daniels|Blocking|N
Indiana Pacers|Marquis Daniels|Stealing|N
Indiana Pacers|Jarrett Jack|Shooting|Y
Indiana Pacers|Jarrett Jack|Passing|Y
Indiana Pacers|Jarrett Jack|Rebound|Y
Indiana Pacers|Jarrett Jack|Blocking|N
Indiana Pacers|Jarrett Jack|Stealing|N
Indiana Pacers|Brandon Rush|Shooting|N
Indiana Pacers|Brandon Rush|Passing|N
Indiana Pacers|Brandon Rush|Rebound|Y
Indiana Pacers|Brandon Rush|Blocking|N
Indiana Pacers|Brandon Rush|Stealing|N
Indiana Pacers|Roy Hibbert|Shooting|Y
Indiana Pacers|Roy Hibbert|Passing|N
Indiana Pacers|Roy Hibbert|Rebound|Y
Indiana Pacers|Roy Hibbert|Blocking|Y
Indiana Pacers|Roy Hibbert|Stealing|N
Indiana Pacers|Rasho Nesterovic|Shooting|Y
Indiana Pacers|Rasho Nesterovic|Passing|N
Indiana Pacers|Rasho Nesterovic|Rebound|Y
Indiana Pacers|Rasho Nesterovic|Blocking|N
Indiana Pacers|Rasho Nesterovic|Stealing|Y
Indiana Pacers|Jeff Foster|Shooting|Y
Indiana Pacers|Jeff Foster|Passing|N
Indiana Pacers|Jeff Foster|Rebound|Y
Indiana Pacers|Jeff Foster|Blocking|N
Indiana Pacers|Jeff Foster|Stealing|Y
Indiana Pacers|Stephen Graham|Shooting|N
Indiana Pacers|Stephen Graham|Passing|N
Indiana Pacers|Stephen Graham|Rebound|N
Indiana Pacers|Stephen Graham|Blocking|Y
Indiana Pacers|Stephen Graham|Stealing|N
Indiana Pacers|Travis Diener|Shooting|N
Indiana Pacers|Travis Diener|Passing|Y
Indiana Pacers|Travis Diener|Rebound|N
Indiana Pacers|Travis Diener|Blocking|N
Indiana Pacers|Travis Diener|Stealing|N

37
apps/nba/data/import_data.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# Please replace '/home/jiewen/paper/db/bin' with the directory where the
# binaries of the postgres component are installed
bin_dir=/home/jiewen/paper/db/bin
#create a database
$bin_dir/dropdb nba
$bin_dir/createdb nba
#import data
$bin_dir/psql -d nba -f populate.sql
$bin_dir/psql -d nba -c "COPY PlayerInfo FROM '$PWD/PlayerInfo.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "COPY ParticipationRate FROM '$PWD/Participation.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "alter table ParticipationRate add rate real"
$bin_dir/psql -d nba -c "update ParticipationRate set rate = participation / total"
$bin_dir/psql -d nba -c "create table Participation as pick tuples from ParticipationRate with probability rate"
$bin_dir/psql -d nba -c "COPY Performance FROM '$PWD/Performance.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "COPY Skills FROM '$PWD/Skills.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "COPY Salary FROM '$PWD/Salary.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "COPY FitnessTransition FROM '$PWD/FitnessTransition.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "COPY Matches FROM '$PWD/Matches.txt' WITH DELIMITER AS '|'"
$bin_dir/psql -d nba -c "COPY Fitness FROM '$PWD/Fitness.txt' WITH DELIMITER AS '|'"

18
apps/nba/data/populate.sql Executable file
View File

@ -0,0 +1,18 @@
create sequence serial increment -1 maxvalue 10000;
create table PlayerInfo( team varchar, player varchar, dob varchar, height varchar, weight varchar );
create table ParticipationRate( team varchar, player varchar, total real, participation real );
create table Performance( player varchar, match_date date, match varchar, points int );
create table Skills( team varchar, player varchar, skill varchar, has varchar );
create table Salary( player varchar, salary int );
create table FitnessTransition( player varchar, play_a_match varchar, InitState varchar, FinalState varchar, P real );
create table Matches( team1 varchar, team2 varchar );
create table Fitness( player varchar, fitness varchar );

View File

@ -0,0 +1,5 @@
This directory contains the raw data from NBA web sites.
The data which can be imported directly to database is located in directory 'apps/nba/data'. It is not necessary to regenerate them.
If you do want to regenerate the data, run 'generate_data.sh' in this directory.

View File

@ -0,0 +1,32 @@
#!/bin/bash
# This script randomly generates current fintness information for all players.
input_file=names.txt
output_file=Fitness.txt
rm -f $output_file
cat $input_file | while read LINE
do
name=`echo $LINE | cut -d' ' -f1-2`
random=$(($RANDOM % 10))
case "$random" in
[0-6])
fitness="Fit for Match"
;;
'9')
fitness="Seriously Injured"
;;
[7-8])
fitness="Slightly Injured"
;;
esac
echo "$name|$fitness" >> $output_file
done
mv $output_file ../$output_file

View File

@ -0,0 +1,13 @@
#!/bin/sh
# This script generates the data which can be imported directly into the database
./generate_participation.sh
./generate_skills.sh
./generate_player_info.sh
./generate_perf.sh
./generate_match.sh
./generate_name.sh
./generate_current_fitness.sh
./generate_fitness_transition.sh

View File

@ -0,0 +1,115 @@
#!/bin/bash
# This script randomly generates fitness transition matrices for all players.
input_file=names.txt
output_file=FitnessTransition.txt
rm -f $output_file
cat $input_file | while read LINE
do
name=`echo $LINE | cut -d' ' -f1-2`
counter=0
while [ $counter -lt 18 ]
do
choice=$(($counter % 18))
case "$choice" in
'0')
echo "$name|N|Fit for Match|Fit for Match|1" >> $output_file
;;
'1')
echo "$name|N|Fit for Match|Seriously Injured|0" >> $output_file
;;
'2')
echo "$name|N|Fit for Match|Slightly Injured|0" >> $output_file
;;
'3')
prob=$(($RANDOM % 10))
prob=$(($prob + 1))
prob=$(echo "scale=2; $prob / 100" | bc)
echo "$name|N|Seriously Injured|Fit for Match|$prob" >> $output_file
;;
'4')
prob2=$(($RANDOM % 50))
prob2=$(($prob2 + 1))
prob2=$(echo "scale=2; $prob2 / 100" | bc)
echo "$name|N|Seriously Injured|Seriously Injured|$prob2" >> $output_file
;;
'5')
prob3=$(echo "scale=2; 1 - $prob - $prob2" | bc)
echo "$name|N|Seriously Injured|Slightly Injured|$prob3" >> $output_file
;;
'6')
prob=$(($RANDOM % 60))
prob=$(($prob + 11))
prob=$(echo "scale=2; $prob / 100" | bc)
echo "$name|N|Slightly Injured|Fit for Match|$prob" >> $output_file
;;
'7')
echo "$name|N|Slightly Injured|Seriously Injured|0" >> $output_file
;;
'8')
prob3=$(echo "scale=2; 1 - $prob" | bc)
echo "$name|N|Slightly Injured|Slightly Injured|$prob3" >> $output_file
;;
'9')
prob=$(($RANDOM % 5))
prob=$(($prob + 1))
prob=$(echo "scale=2; $prob / 100" | bc)
echo "$name|Y|Fit for Match|Seriously Injured|$prob" >> $output_file
;;
'10')
prob2=$(($RANDOM % 15))
prob2=$(($prob2 + 6))
prob2=$(echo "scale=2; $prob2 / 100" | bc)
echo "$name|Y|Fit for Match|Slightly Injured|$prob2" >> $output_file
;;
'11')
prob3=$(echo "scale=2; 1 - $prob - $prob2" | bc)
echo "$name|Y|Fit for Match|Fit for Match|$prob3" >> $output_file
;;
'12')
echo "$name|Y|Seriously Injured|Fit for Match|0" >> $output_file
;;
'13')
echo "$name|Y|Seriously Injured|Seriously Injured|1" >> $output_file
;;
'14')
echo "$name|Y|Seriously Injured|Slightly Injured|0" >> $output_file
;;
'15')
echo "$name|Y|Slightly Injured|Fit for Match|0" >> $output_file
;;
'16')
prob=$(($RANDOM % 30))
prob=$(($prob + 1))
prob=$(echo "scale=2; $prob / 100" | bc)
echo "$name|Y|Slightly Injured|Seriously Injured|$prob" >> $output_file
;;
'17')
prob2=$(echo "scale=2; 1 - $prob" | bc)
echo "$name|Y|Slightly Injured|Slightly Injured|$prob2" >> $output_file
;;
esac
counter=$(($counter + 1))
done
done
mv $output_file ../$output_file

View File

@ -0,0 +1,34 @@
#!/bin/bash
# This script generates match information.
input_file=match_raw.txt
output_file=Matches.txt
rm -f $output_file
cat $input_file | while read LINE
do
nf=`echo $LINE | awk '{ print NF }'`
if [ $nf -eq 2 -o $nf -eq 3 ]
then
name=`echo $LINE | cut -d ' ' -f1-$nf`
else
if [ $nf -eq 6 ]
then
opponent=`echo $LINE | cut -d' ' -f3-4`
else
opponent=`echo $LINE | cut -d' ' -f3-5`
fi
echo "$name|$opponent" >> $output_file
fi
done
mv $output_file ../$output_file

View File

@ -0,0 +1,33 @@
#!/bin/bash
# This script fetches all the player names in the raw data and place them in a file.
counter=1
players_per_team=12
input_file=skills_raw.txt
output_file=names.txt
rm -f $output_file
cat $input_file | while read LINE
do
if [ $(($counter % $(( $players_per_team + 1 )) )) -eq 1 ]
then
nf=`echo $LINE | awk '{ print NF }'`
team=`echo $LINE | cut -d ' ' -f1-$nf`
else
name=`echo $LINE | cut -d' ' -f1-2`
echo "$name" >> $output_file
fi
counter=$(( $counter + 1))
done

View File

@ -0,0 +1,35 @@
#!/bin/bash
# This script generates the participation information for all players.
counter=1
players_per_team=12
input_file=skills_raw.txt
output_file=Participation.txt
rm -f $output_file
cat $input_file | while read LINE
do
if [ $(($counter % $(( $players_per_team + 1 )) )) -eq 1 ]
then
nf=`echo $LINE | awk '{ print NF }'`
team=`echo $LINE | cut -d ' ' -f1-$nf`
else
name=`echo $LINE | cut -d' ' -f1-2`
participate=`echo $LINE | cut -d' ' -f3`
echo "$team|$name|110|$participate" >> $output_file
fi
counter=$(( $counter + 1))
done
mv $output_file ../$output_file

View File

@ -0,0 +1,33 @@
#!/bin/bash
# This script generates the performance-related data.
input_file=performance_raw.txt
output_file=Performance.txt
rm -f $output_file
cat $input_file | while read LINE
do
nf=`echo $LINE | awk '{ print NF }'`
if [ $nf -eq 2 ]
then
name=`echo $LINE | cut -d ' ' -f1-2`
else
date=`echo $LINE | cut -d' ' -f1-2`
opponent=`echo $LINE | cut -d' ' -f4`
points=`echo $LINE | cut -d' ' -f27`
echo "$name|$date, 2009|$opponent|$points" >> $output_file
fi
done
mv $output_file ../$output_file

View File

@ -0,0 +1,34 @@
#!/bin/bash
input_file=player_info_raw.txt
output_file=PlayerInfo.txt
rm -f $output_file
cat $input_file | while read LINE
do
nf=`echo $LINE | awk '{ print NF }'`
if [ $nf -eq 2 -o $nf -eq 3 ]
then
team=`echo $LINE | cut -d ' ' -f1-$nf`
else
name=`echo $LINE | cut -d' ' -f2-3`
born=`echo $LINE | cut -d' ' -f7`
ht=`echo $LINE | cut -d' ' -f5`
wt=`echo $LINE | cut -d' ' -f6`
echo "$team|$name|$born|$ht|$wt" >> $output_file
fi
done
mv $output_file ../$output_file

View File

@ -0,0 +1,134 @@
#!/bin/bash
# This script generates the skill information for all players.
# These are the thresholds for all skills. If the skill performance of a player
# passes the threshold for the skill, then the player is considered to have own
# the skill.
# For example, the threshold for for skill rebound is 3. If a player gets 2.1
# rebounds per game, then he is considered not to own skill rebound. If a player
# gets 3.1 rebounds per game, then he is considered to own skill rebound.
block_threshold=1
pass_threshold=2
rebound_threshold=3
shoot_threshold=0.45
steal_threshold=0.50
counter=1
players_per_team=12
input_file=skills_raw.txt
output_file=Skills.txt
rm -f $output_file
cat $input_file | while read LINE
do
if [ $(($counter % $(( $players_per_team + 1 )) )) -eq 1 ]
then
nf=`echo $LINE | awk '{ print NF }'`
team=`echo $LINE | cut -d ' ' -f1-$nf`
else
name=`echo $LINE | cut -d' ' -f1-2`
#Add the blocking skill
block=`echo $LINE | cut -d' ' -f14`
if [ $(echo "$block >= $block_threshold"|bc) -eq 1 ]
then
has_block="Y"
else
has_block="N"
fi
#Add the passing skill
pass=`echo $LINE | cut -d' ' -f12`
if [ $(echo "$pass >= $pass_threshold"|bc) -eq 1 ]
then
has_pass="Y"
else
has_pass="N"
fi
#Add the rebound skill
rebound=`echo $LINE | cut -d' ' -f11`
if [ $(echo "$rebound >= $rebound_threshold"|bc) -eq 1 ]
then
has_rebound="Y"
else
has_rebound="N"
fi
#Add the shooting skill
shoot=`echo $LINE | cut -d' ' -f6`
if [ $(echo "$shoot >= $shoot_threshold"|bc) -eq 1 ]
then
has_shoot="Y"
else
has_shoot="N"
fi
#Add the stealing skill
steal=`echo $LINE | cut -d' ' -f6`
if [ $(echo "$steal >= $steal_threshold"|bc) -eq 1 ]
then
has_steal="Y"
else
has_steal="N"
fi
#the following code randomly remove or add a skill to a player
random=10
if [ $has_block == "Y" -a $has_pass == "Y" -a $has_rebound == "Y" -a $has_shoot == "Y" -a $has_steal == "Y" ]
then
random=$(($RANDOM % 5))
new="N"
fi
if [ $has_block == "N" -a $has_pass == "N" -a $has_rebound == "N" -a $has_shoot == "N" -a $has_steal == "N" ]
then
random=$(($RANDOM % 5))
new="Y"
fi
case "$random" in
'0')
has_block=$new
;;
'1')
has_pass=$new
;;
'2')
has_rebound=$new
;;
'3')
has_shoot=$new
;;
'4')
has_steal=$new
;;
esac
echo "$team|$name|Shooting|$has_shoot" >> $output_file
echo "$team|$name|Passing|$has_pass" >> $output_file
echo "$team|$name|Rebound|$has_rebound" >> $output_file
echo "$team|$name|Blocking|$has_block" >> $output_file
echo "$team|$name|Stealing|$has_steal" >> $output_file
fi
counter=$(( $counter + 1))
done
mv $output_file ../$output_file

View File

@ -0,0 +1,96 @@
LA Lakers
Wed 01 @ Milwaukee W 104-98
Fri 03 vs Houston W 93-81
Sun 05 vs LA Clippers W 88-85
Tue 07 @ Sacramento W 122-104
Thu 09 vs Denver W 116-102
Boston Celtics
Wed 01 vs Charlotte W 111-109
Fri 03 vs Atlanta W 104-92
Wed 08 vs New Jersey W 106-104
Fri 10 vs Miami W 105-98
Sun 12 @ Cleveland L 76-107
Dallas Mavericks
Wed 01 vs Miami W 98-96
Fri 03 @ Memphis L 102-107
Sun 05 vs Phoenix W 140-116
Wed 08 vs Utah W 130-101
Fri 10 vs New Orleans W 100-92
New Jersey Nets
Wed 01 vs Detroit W 111-98
Sat 04 @ Chicago L 94-103
Sun 05 vs Philadelphia W 96-67
Wed 08 @ Boston L 104-106
Fri 10 @ Detroit L 93-100
Houston Rockets
Wed 01 @ Phoenix L 109-114
Fri 03 @ LA Lakers L 81-93
Sun 05 vs Portland W 102-88
Tue 07 vs Orlando W 93-83
Thu 09 @ Sacramento W 115-98
New York Knicks
Sat 04 vs Toronto L 95-102
Sun 05 @ Toronto W 112-103
Tue 07 @ Chicago L 103-110
Wed 08 vs Detroit L 86-113
Fri 10 @ Orlando W 105-95
Memphis Grizzlies
Wed 01 vs Washington W 112-107
Fri 03 vs Dallas W 107-102
Sat 04 @ Milwaukee W 107-102
Tue 07 vs Portland L 93-96
Wed 08 @ Orlando L 78-81
Philadelphia 76ers
Thu 02 vs Milwaukee W 105-95
Sat 04 vs Detroit W 95-90
Sun 05 @ New Jersey L 67-96
Tue 07 @ Charlotte L 98-101
Thu 09 @ Chicago L 99-113
New Orleans Hornets
Wed 01 @ LA Clippers W 104-98
Fri 03 @ Golden State L 103-111
Sun 05 vs Utah L 94-108
Tue 07 @ Miami W 93-87
Wed 08 vs Phoenix L 100-105
San Antonio Spurs
Fri 03 @ Indiana W 126-121
Sun 05 @ Cleveland L 81-101
Tue 07 @ Oklahoma City W 99-89
Wed 08 vs Portland L 83-95
Fri 10 vs Utah W 105-99
Chicago Bulls
Sat 04 vs New Jersey W 103-94
Tue 07 vs New York W 110-103
Thu 09 vs Philadelphia W 113-99
Sat 11 vs Charlotte W 113-106
Mon 13 @ Detroit W 91-88
Denver Nuggets
Thu 02 vs Utah W 114-104
Sat 04 vs LA Clippers W 120-104
Sun 05 @ Minnesota W 110-87
Wed 08 vs Oklahoma City W 122-112
Thu 09 @ LA Lakers L 102-116
Minnesota Timberwolves
Sun 01 vs Houston L 94-105
Tue 03 vs Golden State L 94-118
Fri 06 @ LA Lakers L 90-110
Sat 07 @ Portland L 93-95
Mon 09 vs Washington L 99-110
Detroit Pistons
Wed 01 @ New Jersey L 98-111
Sat 04 @ Philadelphia L 90-95
Sun 05 vs Charlotte W 104-97
Wed 08 @ New York W 113-86
Fri 10 vs New Jersey W 100-93
Portland Trail Blazers
Fri 03 @ Oklahoma City W 107-72
Sun 05 @ Houston L 88-102
Tue 07 @ Memphis W 96-93
Wed 08 @ San Antonio W 95-83
Fri 10 vs LA Lakers W 106-98
Indiana Pacers
Sun 01 vs Denver W 100-94
Tue 03 @ Sacramento W 117-109
Wed 04 @ Portland L 105-107
Sat 07 @ LA Clippers W 106-105
Tue 10 vs Utah L 100-112

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,240 @@
LA Lakers
3 Trevor Ariza F 6-8 210 06/30/1985 UCLA 4
12 Shannon Brown G 6-4 211 11/29/1985 Michigan State 2
24 Kobe Bryant G 6-6 205 08/23/1978 Lower Merion HS (PA) 12
17 Andrew Bynum C 7-0 285 10/27/1987 St. Joseph HS (NJ) 3
5 Jordan Farmar G 6-2 180 11/30/1986 UCLA 2
2 Derek Fisher G 6-1 210 08/09/1974 Arkansas-Little Rock 12
16 Pau Gasol F-C 7-0 250 07/06/1980 Spain 7
28 Didier Ilunga-Mbenga C 7-0 255 12/30/1980 Congo 4
6 Adam Morrison F 6-8 205 07/19/1984 Gonzaga 1
7 Lamar Odom F 6-10 230 11/06/1979 Rhode Island 9
21 Josh Powell F-C 6-9 240 01/25/1983 North Carolina State 3
18 Sasha Vujacic G 6-7 205 03/08/1984 Slovenia 4
4 Luke Walton F 6-8 235 03/28/1980 Arizona 5
9 Sun Yue G 6-9 205 11/06/1985 China R
Boston Celtics
20 Ray Allen G 6-5 205 07/20/1975 12
42 Tony Allen G 6-4 213 01/11/1982 4
11 Glen Davis F 6-9 289 01/01/1986 1
5 Kevin Garnett F 6-11 253 05/19/1976 13
4 J.R. Giddens G 6-5 215 02/13/1985 R
50 Eddie House G 6-1 175 05/14/1978 8
7 Mikki Moore F-C 7-0 225 11/04/1975 10
43 Kendrick Perkins C 6-10 280 11/10/1984 5
34 Paul Pierce F 6-7 235 10/13/1977 10
0 Leon Powe F 6-8 240 01/22/1984 2
9 Rajon Rondo G 6-1 171 02/22/1986 2
44 Brian Scalabrine C-F 6-9 235 03/18/1978 7
8 Stephon Marbury G 6-2 205 02/20/1977 Georgia Tech 12
Dallas Mavericks
11 Jose Barea G 6-0 175 06/26/1984 2
32 Brandon Bass F 6-8 250 04/30/1985 3
13 Matt Carroll G 6-6 212 08/28/1980 5
25 Erick Dampier C 6-11 265 07/14/1975 12
40 Devean George F 6-8 235 08/29/1977 9
1 Ryan Hollins C 7-0 230 10/10/1984 2
5 Josh Howard F-G 6-7 210 04/28/1980 5
2 Jason Kidd G 6-4 210 03/23/1973 14
41 Dirk Nowitzki F 7-0 245 06/19/1978 10
33 James Singleton F 6-8 230 07/20/1981 4
31 Jason Terry G 6-2 180 09/15/1977 9
21 Antoine Wright G-F 6-7 215 02/06/1984 3
New Jersey Nets
20 Ryan Anderson F 6-10 240 05/06/1988 R
2 Josh Boone C 6-10 237 11/21/1984 2
15 Vince Carter G 6-6 220 01/26/1977 10
55 Keyon Dooling G 6-3 195 05/08/1980 8
17 Chris Douglas-Roberts G 6-7 200 01/08/1987 R
34 Devin Harris G 6-3 185 02/27/1983 4
44 Trenton Hassell F 6-5 233 03/04/1979 7
22 Jarvis Hayes F 6-8 228 08/09/1981 5
11 Brook Lopez C 7-0 260 04/01/1988 R
14 Eduardo Najera F 6-8 235 07/11/1976 8
21 Bobby Simmons F 6-6 230 06/02/1980 6
9 Yi Jianlian F 7-0 238 10/27/1987 1
Houston Rockets
96 Ron Artest F 6-7 260 11/13/1979 9
17 Brent Barry G 6-7 210 12/31/1971 13
31 Shane Battier F 6-8 220 09/09/1978 7
0 Aaron Brooks G 6-0 161 01/14/1985 1
43 Brian Cook F 6-9 250 12/04/1980 5
44 Chuck Hayes F 6-6 238 06/11/1983 3
14 Carl Landry F 6-9 248 09/19/1983 1
7 Kyle Lowry G 6-0 205 03/25/1986 2
1 Tracy McGrady G 6-8 223 05/24/1979 11
4 Luis Scola F-C 6-9 245 04/30/1980 1
13 Von Wafer G 6-5 210 07/21/1985 3
11 Yao Ming C 7-6 310 09/12/1980 6
New York Knicks
21 Wilson Chandler F 6-8 220 05/10/1987 1
5 Joe Crawford G 6-5 210 06/17/1986 R
34 Eddy Curry C 6-11 285 12/05/1982 7
1 Chris Duhon G 6-1 185 08/31/1982 4
8 Danilo Gallinari F 6-10 225 08/08/1988 R
7 Al Harrington F 6-9 250 02/17/1980 10
0 Larry Hughes F 6-5 185 01/23/1979 10
31 Chris Hunter F-C 6-11 240 07/07/1984 R
20 Jared Jeffries C-F 6-11 240 11/25/1981 6
42 David Lee F-C 6-9 240 04/29/1983 3
32 Cuttino Mobley G 6-4 215 09/01/1975 10
23 Quentin Richardson G-F 6-6 235 04/13/1980 8
4 Nate Robinson G 5-9 180 05/31/1984 3
18 Cheikh Samb C 6-11 230 05/12/1986 2
44 Courtney Sims C 6-11 245 10/21/1983 1
9 Chris Wilcox C 6-10 235 09/03/1982 6
Memphis Grizzlies
00 Darrell Arthur F 6-9 225 03/25/1988 Kansas R
7 Greg Buckner G 6-4 210 09/16/1976 Clemson 9
11 Mike Conley G 6-1 180 10/11/1987 Ohio State 1
33 Marc Gasol C 7-1 265 01/29/1985 Spain R
22 Rudy Gay F 6-8 222 08/17/1986 Connecticut 2
15 Hamed Haddadi C 7-2 254 05/19/1985 I.R. of Iran R
55 Marko Jaric G 6-7 224 10/12/1978 Serbia 6
32 OJ Mayo G 6-4 210 11/05/1987 USC R
4 Chris Mihm C 7-0 265 07/16/1979 Texas 8
3 Darius Miles F 6-9 235 10/09/1981 East St. Louis HS (IL) 6
31 Darko Milicic C-F 7-0 275 06/20/1985 Serbia 5
13 Quinton Ross F-G 6-6 193 04/30/1981 Southern Methodist 4
21 Hakim Warrick F 6-9 219 07/08/1982 Syracuse 3
29 Mike Wilks G 5-10 180 05/07/1979 Rice 6
Philadelphia 76ers
42 Elton Brand F 6-9 254 03/11/1979 Duke 9
1 Samuel Dalembert C 6-11 250 05/10/1981 Seton Hall 6
30 Reggie Evans F 6-8 245 05/18/1980 Iowa 6
33 Willie Green G 6-3 201 07/28/1981 Detroit Mercy 5
9 Andre Iguodala G-F 6-6 207 01/28/1984 Arizona 4
12 Royal Ivey G 6-4 215 12/20/1981 Texas 4
8 Donyell Marshall F 6-9 245 05/18/1973 Connecticut 14
7 Andre Miller G 6-2 200 03/19/1976 Utah 9
50 Theo Ratliff C 6-10 235 04/17/1973 Wyoming 13
4 Kareem Rush G 6-6 215 10/30/1980 Missouri 5
14 Jason Smith F 7-0 240 03/02/1986 Colorado State 1
16 Marreese Speights F-C 6-10 245 08/04/1987 Florida R
23 Louis Williams G 6-2 175 10/27/1986 South Gwinnett HS (Snellville, GA) 3
21 Thaddeus Young F 6-8 220 06/21/1988 Georgia Tech 1
New Orleans Hornets
12 Hilton Armstrong C-F 6-11 235 11/11/1984 Connecticut 2
40 Ryan Bowen F 6-9 218 11/20/1975 Iowa 8
23 Devin Brown G-F 6-5 210 12/30/1978 Texas-San Antonio 6
45 Rasual Butler G-F 6-7 205 05/23/1979 La Salle 6
6 Tyson Chandler C 7-1 235 10/02/1982 Dominguez HS (CA) 7
50 Antonio Daniels G 6-4 205 03/19/1975 Bowling Green 11
33 Melvin Ely C-F 6-10 261 05/02/1978 Fresno State 6
4 Sean Marks F-C 6-10 250 08/23/1975 California 8
3 Chris Paul G 6-0 175 05/06/1985 Wake Forest 3
9 Morris Peterson G 6-7 220 08/26/1977 Michigan State 8
41 James Posey F 6-8 217 01/13/1977 Xavier (Ohio) 9
16 Predrag Stojakovic F 6-10 229 06/09/1977 Serbia 10
30 David West F 6-9 240 08/29/1980 Xavier (Ohio) 5
32 Julian Wright F 6-8 225 05/20/1987 Kansas 1
San Antonio Spurs
18 Malik Hairston F 6-6 220 02/23/1987 Florida R
15 Matt Bonner F 6-10 240 04/05/1980 Florida 4
12 Bruce Bowen G-F 6-7 200 06/14/1971 Cal State Fullerton 12
21 Tim Duncan F 6-11 260 04/25/1976 Wake Forest 11
4 Michael Finley F-G 6-7 225 03/06/1973 Wisconsin 13
20 Manu Ginobili G 6-6 205 07/28/1977 Argentina 6
90 Drew Gooden F-C 6-10 250 09/24/1981 Kansas 6
3 George Hill G 6-2 180 05/04/1986 IUPUI R
28 Ian Mahinmi C 6-11 230 11/05/1986 France 1
8 Roger Mason G 6-5 212 09/10/1980 Virginia 4
7 Fabricio Oberto C-F 6-10 245 03/21/1975 Argentina 3
9 Tony Parker G 6-2 180 05/17/1982 France 7
40 Kurt Thomas C-F 6-9 235 10/04/1972 Texas Christian 13
5 Ime Udoka F-G 6-5 220 08/09/1977 Portland State 4
11 Jacque Vaughn G 6-1 190 02/11/1975 Kansas 11
2 Marcus Williams G 6-7 207 11/18/1986 Arizona 1
Chicago Bulls
9 Luol Deng F 6-9 220 04/16/1985 Duke 4
7 Ben Gordon G 6-3 200 04/04/1983 Connecticut 4
34 Aaron Gray C 7-0 270 12/07/1984 Pittsburgh 1
12 Kirk Hinrich G 6-3 190 01/02/1981 Kansas 5
11 Lindsey Hunter G 6-2 195 12/03/1970 Jackson State 15
31 Jerome James C 7-1 285 11/17/1975 Florida A&M 8
54 Linton Johnson III F 6-8 205 06/13/1980 Tulane 5
52 Brad Miller C 7-0 261 04/12/1976 Purdue 10
21 DeMarcus Nelson G 6-4 200 11/02/1985 Duke R
13 Joakim Noah C-F 6-11 232 02/25/1985 Florida 1
5 Anthony Roberson G 6-2 180 02/14/1983 Florida 2
1 Derrick Rose G 6-3 190 10/04/1988 Memphis R
15 John Salmons F-G 6-6 207 12/12/1979 Miami (Fla.) 6
2 Tim Thomas F 6-10 240 02/26/1977 Villanova 11
24 Tyrus Thomas F 6-9 215 08/17/1986 Louisiana State 2
Denver Nuggets
11 Chris Andersen F-C 6-10 228 07/07/1978 Blinn Coll. TX (JC) 6
15 Carmelo Anthony F 6-8 230 05/29/1984 Syracuse 5
32 Renaldo Balkman F 6-8 208 07/14/1984 South Carolina 2
7 Chauncey Billups G 6-3 202 09/25/1976 Colorado 11
25 Anthony Carter G 6-2 195 06/16/1975 Hawaii 9
6 Jason Hart G 6-3 180 04/29/1978 Syracuse 7
45 Steven Hunter F-C 7-0 240 10/31/1981 DePaul 7
30 Dahntay Jones G-F 6-6 210 12/27/1980 Duke 5
43 Linas Kleiza F-G 6-8 245 01/03/1985 Missouri 3
4 Kenyon Martin F 6-9 240 12/30/1977 Cincinnati 8
31 Nene Nene C-F 6-11 250 09/13/1982 Brazil 6
27 Johan Petro C 7-0 247 01/27/1986 France 3
1 JR Smith G 6-6 220 09/09/1985 St. Benedict's Prep (Newark, NJ) 4
13 Sonny Weems G-F 6-6 203 07/08/1986 Arkansas R
Minnesota Timberwolves
22 Corey Brewer F-G 6-9 188 03/05/1986 Florida 1
1 Bobby Brown G 6-2 175 09/24/1984 Cal State-Fullerton R
14 Brian Cardinal F 6-8 240 05/02/1977 Purdue 8
10 Rodney Carney F 6-7 201 04/05/1984 Memphis 2
34 Jason Collins C 7-0 255 12/02/1978 Stanford 7
4 Randy Foye G 6-4 213 09/24/1983 Villanova 2
8 Ryan Gomes F 6-7 245 09/01/1982 Providence 3
25 Al Jefferson C-F 6-10 265 01/04/1985 Prentiss HS (MS) 4
42 Kevin Love F 6-10 260 09/07/1988 UCLA R
35 Mark Madsen F 6-9 255 01/28/1976 Stanford 8
33 Mike Miller G-F 6-8 218 02/19/1980 Florida 8
12 Kevin Ollie G 6-2 195 12/27/1972 Connecticut 11
5 Craig Smith F 6-7 250 11/10/1983 Boston College 2
3 Sebastian Telfair G 6-0 175 06/09/1985 Abraham Lincoln HS (Brooklyn, NY) 4
23 Shelden Williams F-C 6-9 250 10/21/1983 Duke 2
Detroit Pistons
28 Arron Afflalo G 6-5 215 10/15/1985 UCLA 1
38 Kwame Brown C 6-11 270 03/10/1982 Glynn Academy HS (GA) 7
12 Will Bynum G 6-0 185 01/04/1983 Georgia Tech 1
32 Richard Hamilton G 6-7 193 02/14/1978 Connecticut 9
5 Walter Herrmann F 6-9 225 06/26/1979 Argentina 2
1 Allen Iverson G 6-0 180 06/07/1975 Georgetown 12
25 Amir Johnson F 6-9 210 05/01/1987 Westchester HS (Los Angeles, CA) 3
54 Jason Maxiell F 6-7 260 02/18/1983 Cincinnati 3
24 Antonio McDyess F-C 6-9 245 09/07/1974 Alabama 12
22 Tayshaun Prince F 6-9 215 02/28/1980 Kentucky 6
42 Walter Sharpe F 6-9 245 07/18/1986 Alabama-Birmingham R
3 Rodney Stuckey G 6-5 205 04/21/1986 Eastern Washington 1
30 Rasheed Wallace C-F 6-11 230 09/17/1974 North Carolina 13
Portland Trail Blazers
12 LaMarcus Aldridge F-C 6-11 240 07/19/1985 Texas 2
88 Nicolas Batum F 6-8 200 12/14/1988 France R
4 Jerryd Bayless G 6-3 200 08/20/1988 Arizona R
2 Steve Blake G 6-3 172 02/26/1980 Maryland 5
5 Rudy Fernandez G-F 6-6 185 04/04/1985 Spain R
44 Channing Frye F-C 6-11 245 05/17/1983 Arizona 3
9 Raef LaFrentz C-F 6-11 240 05/29/1976 Kansas 10
52 Greg Oden C 7-0 285 01/22/1988 Ohio State R
25 Travis Outlaw F 6-9 207 09/18/1984 Starkville HS (MS) 5
10 Joel Przybilla C 7-1 245 10/10/1979 Minnesota 8
42 Shavlik Randolph F 6-10 240 11/24/1983 Duke 3
11 Sergio Rodriguez G 6-3 176 06/12/1986 Spain 2
7 Brandon Roy G 6-6 211 07/23/1984 Washington 2
51 Michael Ruffin F-C 6-8 248 01/21/1977 Tulsa 8
8 Martell Webster G-F 6-7 235 12/04/1986 Seattle Prep HS (WA) 3
Indiana Pacers
9 Maceo Baston F 6-10 230 05/26/1976 Michigan 3
6 Marquis Daniels G 6-6 200 01/07/1981 Auburn 5
12 Travis Diener G 6-1 175 03/01/1982 Marquette 3
17 Mike Dunleavy F-G 6-9 230 09/15/1980 Duke 6
5 T.J. Ford G 6-0 165 03/24/1983 Texas 4
10 Jeff Foster C 6-11 250 01/16/1977 Texas State 9
23 Stephen Graham F 6-6 215 06/11/1982 Oklahoma State 3
33 Danny Granger F-G 6-8 228 04/20/1983 New Mexico 3
55 Roy Hibbert C 7-2 278 12/11/1986 Georgetown R
1 Jarrett Jack G 6-3 197 10/28/1983 Georgia Tech 3
32 Josh McRoberts F 6-10 240 02/28/1987 Duke 1
3 Troy Murphy F-C 6-11 245 05/02/1980 Notre Dame 7
8 Rasho Nesterovic C 7-0 255 05/30/1976 Slovenia 10
25 Brandon Rush G 6-6 210 07/07/1985 Kansas R
11 Jamaal Tinsley G 6-3 185 02/28/1978 Iowa State 7

View File

@ -0,0 +1,208 @@
LA Lakers
Kobe Bryant 82 82 36.1 .467 .351 .856 1.10 4.10 5.20 4.9 1.46 .45 2.56 2.30 26.8
Pau Gasol 81 81 37.0 .567 .500 .781 3.20 6.40 9.60 3.5 .64 1.00 1.94 2.10 18.9
Andrew Bynum 50 50 28.9 .560 .000 .707 2.70 5.20 8.00 1.4 .36 1.80 1.70 3.10 14.3
Lamar Odom 78 32 29.7 .492 .320 .623 2.30 5.90 8.20 2.6 .99 1.26 1.77 3.00 11.3
Derek Fisher 82 82 29.8 .424 .397 .846 .30 2.00 2.30 3.2 1.16 .07 .88 2.30 9.9
Trevor Ariza 82 20 24.4 .460 .319 .710 1.40 2.90 4.30 1.8 1.67 .29 1.06 2.00 8.9
Jordan Farmar 65 0 18.3 .391 .336 .584 .30 1.50 1.80 2.4 .88 .15 1.34 1.60 6.4
Sasha Vujacic 80 0 16.2 .387 .363 .921 .20 1.50 1.70 1.4 .96 .09 .44 1.90 5.8
Luke Walton 65 34 17.9 .436 .298 .719 .80 1.90 2.80 2.7 .49 .15 1.06 1.60 5.0
Josh Powell 60 1 11.7 .444 .000 .760 1.20 1.80 2.90 .5 .15 .28 .85 1.60 4.2
Shannon Brown 48 0 9.9 .473 .378 .821 .20 .70 .90 .8 .46 .15 .79 .90 4.2
Didier Ilunga-Mbenga 23 0 7.9 .474 .000 .875 .40 1.00 1.30 .4 .43 1.04 .57 1.40 2.7
Boston Celtics
Paul Pierce 81 81 37.5 .457 .391 .830 .70 5.00 5.60 3.6 .99 .33 2.81 2.70 20.5
Ray Allen 79 79 36.4 .480 .409 .952 .80 2.70 3.50 2.8 .87 .16 1.70 2.00 18.2
Kevin Garnett 57 57 31.1 .531 .250 .841 1.40 7.10 8.50 2.5 1.11 1.19 1.58 2.20 15.8
Rajon Rondo 80 80 33.0 .505 .313 .642 1.30 4.00 5.20 8.2 1.86 .14 2.61 2.40 11.9
Eddie House 81 0 18.3 .445 .444 .792 .10 1.80 1.90 1.1 .75 .09 .68 1.40 8.5
Kendrick Perkins 76 76 29.6 .577 .000 .600 2.70 5.50 8.10 1.3 .29 1.97 2.17 3.30 8.5
Tony Allen 46 2 19.3 .482 .222 .725 .50 1.80 2.30 1.4 1.17 .50 1.67 2.10 7.8
Leon Powe 70 7 17.5 .524 .000 .689 2.10 2.90 4.90 .7 .34 .54 1.09 2.70 7.7
Glen Davis 76 16 21.5 .442 .400 .730 1.60 2.40 4.00 .9 .70 .25 .93 3.00 7.0
Mikki Moore 70 20 17.2 .553 .000 .787 1.10 2.60 3.70 .8 .24 .27 .69 3.00 3.9
Stephon Marbury 23 4 18.0 .342 .240 .462 .10 1.10 1.20 3.3 .43 .13 1.61 1.50 3.8
Brian Scalabrine 39 8 12.9 .421 .393 .889 .20 1.10 1.30 .5 .18 .26 .31 1.90 3.5
Dallas Mavericks
Dirk Nowitzki 81 81 37.7 .479 .359 .890 1.10 7.30 8.40 2.4 .75 .78 1.94 2.20 25.9
Jason Terry 74 11 33.7 .463 .366 .880 .50 1.90 2.40 3.4 1.31 .27 1.61 1.90 19.6
Josh Howard 52 51 32.0 .451 .345 .782 1.10 3.90 5.10 1.6 1.06 .58 1.71 2.60 18.0
Jason Kidd 81 81 35.6 .416 .406 .819 1.00 5.10 6.20 8.7 1.98 .48 2.28 2.10 9.0
Brandon Bass 81 0 19.4 .496 .000 .867 1.60 2.90 4.50 .5 .33 .68 1.06 1.70 8.5
Jose Barea 79 15 20.3 .442 .357 .753 .50 1.80 2.20 3.4 .47 .06 1.33 1.50 7.8
Antoine Wright 65 53 23.9 .415 .302 .747 .50 1.60 2.10 1.2 .71 .42 .83 2.60 7.3
Erick Dampier 80 80 23.0 .650 .000 .638 2.70 4.40 7.10 1.0 .30 1.19 .93 2.40 5.7
James Singleton 62 6 14.3 .529 .325 .859 1.40 2.60 4.00 .3 .42 .45 .58 1.80 5.1
Devean George 43 17 16.5 .380 .289 .773 .60 1.20 1.80 .3 .53 .26 .40 1.30 3.4
Ryan Hollins 45 3 9.9 .532 .000 .597 1.00 1.10 2.20 .2 .16 .71 .53 1.70 3.2
Matt Carroll 55 10 11.2 .380 .245 .840 .10 1.10 1.30 .5 .38 .11 .60 1.20 3.0
New Jersey Nets
Devin Harris 69 69 36.1 .438 .291 .820 .40 2.90 3.30 6.9 1.65 .19 3.07 2.40 21.3
Vince Carter 80 80 36.8 .437 .385 .817 .90 4.20 5.10 4.7 1.03 .48 2.08 2.90 20.8
Brook Lopez 82 75 30.5 .531 .000 .793 2.70 5.40 8.10 1.0 .54 1.84 1.79 3.10 13.0
Keyon Dooling 77 18 26.9 .436 .421 .825 .30 1.70 2.00 3.5 .92 .10 1.36 1.80 9.7
Jarvis Hayes 74 1 24.8 .445 .385 .692 .40 3.20 3.60 .7 .70 .09 .66 2.20 8.7
Yi Jianlian 61 52 23.3 .382 .343 .772 1.10 4.20 5.30 1.0 .48 .59 1.15 2.60 8.6
Bobby Simmons 71 44 24.4 .449 .447 .741 1.00 2.90 3.90 1.3 .70 .14 .87 2.60 7.8
Ryan Anderson 66 30 19.9 .393 .365 .845 1.60 3.10 4.70 .8 .67 .30 .95 2.40 7.4
Chris Douglas-Roberts 44 3 13.3 .460 .250 .823 .30 .80 1.10 1.2 .27 .16 .70 .80 4.9
Josh Boone 62 7 16.0 .528 .000 .376 1.70 2.50 4.20 .5 .35 .77 .50 1.70 4.2
Trenton Hassell 53 31 20.6 .450 .250 .800 .90 1.80 2.80 1.0 .40 .30 .57 1.70 3.7
Eduardo Najera 27 0 11.8 .446 .200 .364 .60 1.90 2.50 .7 .37 .15 .67 1.90 2.9
Houston Rockets
Yao Ming 77 77 33.6 .548 1.000 .866 2.60 7.20 9.90 1.8 .39 1.95 3.04 3.30 19.7
Ron Artest 69 55 35.5 .401 .399 .748 .90 4.30 5.20 3.3 1.52 .35 2.03 2.20 17.1
Tracy McGrady 35 35 33.7 .388 .376 .801 .60 3.80 4.40 5.0 1.20 .43 1.97 1.10 15.6
Luis Scola 82 82 30.3 .531 .000 .760 2.40 6.30 8.80 1.5 .83 .13 1.50 3.20 12.7
Aaron Brooks 80 35 25.0 .404 .366 .866 .40 1.60 2.00 3.0 .58 .10 1.56 1.90 11.2
Von Wafer 63 11 19.4 .447 .390 .752 .30 1.50 1.80 1.1 .63 .13 .94 1.10 9.7
Carl Landry 69 0 21.3 .574 .333 .813 1.80 3.20 5.00 .6 .38 .45 .99 2.40 9.2
Kyle Lowry 77 21 21.8 .435 .255 .801 .30 2.10 2.50 3.6 .90 .22 1.52 1.90 7.6
Shane Battier 60 59 33.9 .410 .384 .821 .90 3.90 4.80 2.3 .80 .90 .82 1.90 7.3
Brent Barry 56 1 15.3 .407 .374 .950 .30 1.40 1.70 1.4 .43 .05 .86 .80 3.7
Brian Cook 30 0 5.7 .368 .433 .833 .20 .80 1.10 .2 .10 .10 .43 .90 2.5
Chuck Hayes 71 1 12.1 .372 .000 .368 1.00 2.50 3.50 .6 .48 .27 .35 1.90 1.3
New York Knicks
Al Harrington 73 56 34.9 .439 .364 .793 1.40 4.90 6.20 1.4 1.21 .30 2.21 3.10 20.1
Nate Robinson 74 11 29.9 .437 .325 .841 1.30 2.60 3.90 4.1 1.28 .08 1.88 2.80 17.2
David Lee 81 74 34.9 .549 .000 .755 3.20 8.60 11.70 2.1 .99 .27 1.85 3.20 16.0
Wilson Chandler 82 70 33.4 .432 .328 .795 1.10 4.30 5.40 2.1 .87 .91 1.70 3.00 14.4
Larry Hughes 55 20 26.9 .402 .389 .807 .30 2.60 2.90 2.2 1.31 .25 1.29 1.70 11.6
Chris Duhon 79 78 36.8 .421 .391 .856 .60 2.50 3.10 7.2 .91 .09 2.80 1.60 11.1
Quentin Richardson 72 51 26.3 .393 .365 .761 1.00 3.40 4.40 1.6 .65 .10 1.03 1.80 10.2
Danilo Gallinari 28 2 14.7 .448 .444 .963 .50 1.50 2.00 .5 .50 .14 .54 1.70 6.1
Chris Wilcox 62 6 16.9 .497 .000 .564 1.50 2.90 4.50 .8 .42 .26 1.21 2.20 7.2
Jared Jeffries 56 36 23.4 .440 .083 .611 2.30 1.80 4.10 1.4 .84 .59 1.16 2.70 5.3
Mouhamed Sene 6 0 4.7 .667 .000 .800 .80 1.50 2.30 .0 .17 .50 .67 .30 3.3
Cheikh Samb 18 0 4.6 .188 .000 .429 .60 .80 1.30 .1 .17 .56 .17 .40 .8
Memphis Grizzlies
Rudy Gay 79 78 37.3 .453 .351 .767 1.40 4.20 5.50 1.7 1.24 .75 2.57 2.80 18.9
OJ Mayo 82 82 38.0 .438 .384 .879 .70 3.10 3.80 3.2 1.11 .16 2.76 2.50 18.5
Marc Gasol 82 75 30.7 .530 .000 .733 2.50 4.90 7.40 1.7 .77 1.10 2.00 3.20 11.9
Hakim Warrick 82 7 24.7 .491 .217 .711 1.60 3.40 5.00 .8 .59 .48 1.20 2.10 11.6
Mike Conley 82 61 30.6 .442 .406 .817 .30 3.10 3.40 4.3 1.10 .10 1.74 1.80 10.9
Darrell Arthur 76 64 19.3 .438 .000 .667 1.40 3.10 4.60 .6 .68 .68 .62 2.70 5.6
Darko Milicic 61 15 17.0 .515 .000 .562 1.40 3.00 4.30 .6 .36 .84 .79 2.20 5.5
Quinton Ross 68 7 17.1 .382 .375 .810 .40 1.40 1.90 .7 .47 .21 .53 1.70 3.9
Darius Miles 34 0 8.8 .485 .167 .742 .60 1.10 1.70 .5 .32 .59 .62 .90 3.5
Marko Jaric 53 0 11.4 .331 .393 .707 .40 .80 1.20 1.4 .55 .21 .92 1.20 2.6
Greg Buckner 63 0 13.9 .384 .255 .800 .50 1.60 2.10 .9 .46 .13 .60 1.70 2.5
Hamed Haddadi 19 0 6.3 .484 .000 .600 .80 1.60 2.50 .4 .05 .63 .47 1.10 2.5
Philadelphia 76ers
Andre Iguodala 82 82 39.9 .473 .307 .724 1.10 4.60 5.70 5.3 1.60 .44 2.71 1.90 18.8
Andre Miller 82 82 36.3 .473 .283 .826 1.50 3.00 4.50 6.5 1.33 .17 2.43 2.40 16.3
Thaddeus Young 75 71 34.4 .495 .341 .735 1.90 3.20 5.00 1.1 1.33 .31 1.57 2.20 15.3
Elton Brand 29 23 31.7 .447 .000 .676 2.70 6.10 8.80 1.3 .59 1.55 2.34 2.70 13.8
Louis Williams 81 0 23.7 .398 .286 .790 .40 1.60 2.00 3.0 1.05 .17 1.86 1.60 12.8
Willie Green 81 60 22.6 .435 .317 .729 .40 1.20 1.60 2.0 .65 .16 .79 1.90 8.5
Marreese Speights 79 2 16.0 .502 .250 .773 1.60 2.20 3.70 .4 .34 .71 .58 2.30 7.7
Samuel Dalembert 82 82 24.8 .498 .000 .734 2.60 5.90 8.50 .2 .40 1.78 1.43 3.00 6.4
Donyell Marshall 25 0 7.6 .452 .455 .500 .20 1.40 1.60 .6 .16 .20 .24 1.00 3.8
Reggie Evans 79 7 14.4 .444 .000 .594 1.70 2.90 4.60 .3 .52 .10 .87 2.00 3.3
Royal Ivey 71 0 12.1 .332 .342 .791 .30 .80 1.10 .6 .51 .10 .32 1.10 3.0
Theo Ratliff 46 0 12.6 .531 .000 .600 1.00 1.80 2.80 .2 .37 1.02 .30 1.70 1.9
New Orleans Hornets
Chris Paul 78 78 38.5 .503 .364 .868 .90 4.70 5.50 11.0 2.77 .13 2.96 2.70 22.8
David West 76 76 39.2 .472 .240 .884 2.10 6.40 8.50 2.3 .64 .89 2.14 2.70 21.0
Predrag Stojakovic 61 59 34.2 .399 .378 .894 .70 3.60 4.30 1.2 .85 .05 .84 1.70 13.3
Rasual Butler 82 74 31.9 .433 .390 .782 .60 2.70 3.30 .9 .62 .74 .72 1.90 11.2
James Posey 75 0 28.5 .412 .369 .822 .50 4.30 4.80 1.1 .77 .28 1.05 2.90 8.9
Tyson Chandler 32 32 31.1 .563 .000 .584 3.50 4.80 8.30 .5 .34 1.38 1.34 3.40 8.8
Devin Brown 63 5 13.8 .355 .289 .780 .50 1.40 1.90 .9 .51 .08 .86 1.30 5.2
Hilton Armstrong 70 29 15.6 .561 .000 .633 1.20 1.60 2.80 .4 .37 .64 1.14 2.60 4.8
Julian Wright 54 19 14.3 .466 .095 .567 .90 2.00 2.80 .8 .65 .35 .80 .90 4.4
Morris Peterson 43 9 12.0 .399 .388 .632 .30 1.70 2.00 .4 .35 .05 .35 1.20 4.4
Antonio Daniels 74 9 13.8 .419 .367 .800 .10 1.00 1.00 2.4 .35 .01 .84 .70 4.1
Sean Marks 60 5 14.0 .485 .200 .682 1.00 2.10 3.10 .2 .12 .55 .58 2.00 3.2
San Antonio Spurs
Tony Parker 72 71 34.1 .506 .292 .782 .40 2.70 3.10 6.9 .93 .06 2.58 1.50 22.0
Tim Duncan 75 75 33.6 .504 .000 .692 2.70 8.00 10.70 3.5 .51 1.68 2.20 2.30 19.3
Manu Ginobili 44 7 26.8 .454 .330 .884 .50 4.00 4.50 3.6 1.45 .36 2.00 2.00 15.5
Roger Mason 82 71 30.4 .425 .421 .890 .20 2.90 3.10 2.1 .49 .15 1.22 2.00 11.8
Drew Gooden 51 28 24.8 .468 .000 .840 2.20 4.90 7.10 .9 .59 .35 1.49 2.80 11.9
Michael Finley 81 77 28.8 .437 .411 .823 .30 3.00 3.30 1.4 .46 .21 .75 1.00 9.7
Matt Bonner 81 67 23.8 .496 .440 .739 1.20 3.60 4.80 1.0 .58 .32 .46 2.30 8.2
George Hill 77 7 16.5 .403 .329 .781 .40 1.70 2.10 1.8 .58 .27 .96 1.90 5.7
Ime Udoka 67 3 15.4 .383 .328 .609 .40 2.40 2.80 .8 .54 .18 .57 1.30 4.3
Kurt Thomas 79 10 17.8 .503 .000 .822 1.70 3.40 5.10 .8 .43 .73 .53 2.20 4.3
Malik Hairston 15 0 10.3 .490 .000 .286 .70 1.10 1.90 .9 .40 .47 .80 1.30 3.3
Bruce Bowen 80 10 18.9 .422 .429 .538 .20 1.60 1.80 .5 .45 .16 .31 1.50 2.7
Chicago Bulls
Ben Gordon 82 76 36.6 .455 .410 .864 .60 2.80 3.50 3.4 .87 .27 2.44 2.20 20.7
John Salmons 79 74 37.5 .472 .417 .830 .70 3.50 4.20 3.2 1.05 .30 2.09 2.30 18.3
Derrick Rose 81 80 37.0 .475 .222 .788 1.20 2.70 3.90 6.3 .81 .22 2.49 1.50 16.8
Luol Deng 49 46 34.0 .448 .400 .796 1.60 4.40 6.00 1.9 1.22 .51 1.47 1.70 14.1
Brad Miller 70 43 30.0 .476 .411 .824 2.10 5.60 7.80 3.3 .74 .51 1.86 3.20 11.9
Tyrus Thomas 79 61 27.5 .451 .333 .783 1.90 4.60 6.40 1.0 1.15 1.91 1.63 2.80 10.8
Kirk Hinrich 51 4 26.3 .437 .408 .791 .30 2.10 2.40 3.9 1.29 .37 1.71 2.50 9.9
Joakim Noah 80 55 24.2 .556 .000 .676 3.10 4.50 7.60 1.3 .61 1.38 1.03 3.00 6.7
Tim Thomas 64 6 19.5 .432 .413 .736 .70 2.50 3.10 1.1 .48 .17 1.09 2.30 8.5
Aaron Gray 56 18 12.8 .485 .000 .576 1.50 2.40 3.90 .8 .25 .32 .71 2.40 3.5
Lindsey Hunter 28 0 9.5 .329 .333 .600 .10 .40 .40 1.3 .71 .04 .68 1.00 2.6
Anthony Roberson 29 0 9.5 .367 .321 1.000 .20 .60 .80 .7 .34 .03 .28 .60 4.1
Denver Nuggets
Carmelo Anthony 66 66 34.5 .443 .371 .793 1.60 5.20 6.80 3.4 1.14 .36 3.02 3.00 22.8
Chauncey Billups 79 79 35.3 .418 .408 .913 .40 2.60 3.00 6.4 1.18 .23 2.24 2.00 17.7
JR Smith 81 18 27.7 .446 .397 .754 .50 3.10 3.70 2.8 .96 .17 1.85 2.30 15.2
Nene Nene 77 76 32.6 .604 .200 .723 2.40 5.40 7.80 1.4 1.23 1.31 1.91 3.60 14.6
Kenyon Martin 66 66 32.0 .491 .368 .604 1.20 4.80 6.00 2.0 1.45 1.12 1.58 3.00 11.7
Linas Kleiza 82 7 22.2 .447 .326 .725 1.10 2.90 4.00 .8 .38 .17 1.00 1.90 9.9
Chris Andersen 71 1 20.6 .548 .200 .718 2.30 3.90 6.20 .4 .58 2.46 .97 2.50 6.4
Dahntay Jones 79 71 18.1 .458 .647 .728 .70 1.40 2.10 1.0 .62 .24 .86 2.50 5.4
Anthony Carter 78 5 22.9 .433 .239 .731 .50 2.10 2.60 4.7 1.23 .17 1.99 1.80 5.3
Renaldo Balkman 53 10 14.7 .558 .286 .646 1.60 2.20 3.80 .6 .89 .43 .66 1.80 5.0
Johan Petro 49 22 11.4 .415 .000 .552 .90 2.40 3.20 .3 .39 .31 .57 2.20 3.3
Jason Hart 39 2 8.9 .319 .000 .783 .30 .80 1.20 1.2 .31 .10 .56 1.00 2.0
Minnesota Timberwolves
Al Jefferson 50 50 36.7 .497 .000 .738 3.40 7.50 11.00 1.6 .78 1.66 1.84 2.80 23.1
Randy Foye 70 61 35.6 .407 .360 .846 .50 2.60 3.10 4.3 1.03 .37 2.14 2.90 16.3
Ryan Gomes 82 76 31.9 .431 .372 .807 1.30 3.50 4.80 1.6 .77 .27 1.56 2.20 13.3
Kevin Love 81 37 25.3 .459 .105 .789 3.40 5.70 9.10 1.0 .43 .62 1.46 2.50 11.1
Craig Smith 74 31 19.7 .562 .000 .677 1.30 2.50 3.80 1.1 .42 .26 1.42 2.50 10.1
Mike Miller 73 47 32.3 .482 .378 .732 1.00 5.60 6.60 4.5 .41 .42 1.99 1.90 9.9
Sebastian Telfair 75 43 27.9 .383 .346 .819 .40 1.30 1.70 4.6 .97 .16 1.95 2.50 9.8
Rodney Carney 67 6 17.9 .416 .350 .758 .50 1.30 1.90 .4 .67 .43 .64 1.40 7.2
Corey Brewer 15 8 20.5 .411 .417 .737 1.20 2.10 3.30 1.7 1.00 .20 .87 2.50 6.2
Bobby Brown 68 2 13.7 .392 .346 .791 .20 .60 .80 1.7 .31 .04 .93 1.40 5.3
Kevin Ollie 50 21 17.0 .407 .000 .833 .30 1.20 1.50 2.3 .38 .08 .68 1.60 4.0
Brian Cardinal 64 4 14.2 .385 .326 .857 .60 1.60 2.20 1.2 .58 .20 .75 2.10 3.0
Detroit Pistons
Richard Hamilton 67 51 34.0 .447 .368 .848 .70 2.40 3.10 4.4 .60 .06 1.99 2.60 18.3
Allen Iverson 57 53 36.7 .417 .283 .781 .50 2.50 3.00 5.0 1.54 .11 2.56 1.50 17.5
Tayshaun Prince 82 82 37.3 .450 .397 .778 1.60 4.20 5.80 3.1 .54 .62 1.23 1.30 14.2
Rodney Stuckey 79 65 31.9 .439 .295 .803 .90 2.60 3.50 4.9 .99 .14 2.19 2.70 13.4
Rasheed Wallace 66 63 32.2 .419 .354 .772 .80 6.60 7.40 1.4 .94 1.30 .89 3.00 12.0
Antonio McDyess 62 30 30.1 .510 .000 .698 3.00 6.80 9.80 1.3 .66 .81 .82 3.10 9.6
Will Bynum 57 1 14.1 .456 .158 .798 .30 1.00 1.30 2.8 .60 .04 1.33 1.50 7.2
Jason Maxiell 78 4 18.1 .575 .000 .532 2.20 2.00 4.20 .3 .32 .81 .58 2.00 5.8
Arron Afflalo 74 8 16.7 .437 .402 .817 .40 1.40 1.80 .6 .38 .18 .58 1.90 4.9
Kwame Brown 58 30 17.2 .533 .000 .516 1.60 3.40 5.00 .6 .41 .41 .86 2.40 4.2
Walter Herrmann 59 0 10.7 .396 .342 .760 .50 1.30 1.80 .4 .12 .07 .29 .70 3.8
Amir Johnson 62 24 14.7 .595 .000 .657 1.60 2.10 3.70 .3 .32 .97 .53 2.80 3.5
Portland Trail Blazers
Brandon Roy 78 78 37.2 .480 .377 .824 1.30 3.40 4.70 5.1 1.13 .28 1.95 1.60 22.6
LaMarcus Aldridge 81 81 37.1 .484 .250 .781 2.90 4.60 7.50 1.9 .95 .95 1.49 2.60 18.1
Travis Outlaw 81 6 27.7 .453 .377 .723 .90 3.20 4.10 1.0 .58 .70 1.16 2.10 12.8
Steve Blake 69 69 31.7 .428 .427 .840 .40 2.10 2.50 5.0 1.00 .06 1.57 1.80 11.0
Rudy Fernandez 78 4 25.6 .425 .399 .839 .60 2.10 2.70 2.0 .88 .15 1.10 1.40 10.4
Greg Oden 61 39 21.5 .564 .000 .637 2.80 4.20 7.00 .5 .41 1.13 1.43 3.90 8.9
Joel Przybilla 82 43 23.8 .625 .000 .663 2.50 6.30 8.70 .3 .41 1.18 .95 2.60 5.5
Nicolas Batum 79 76 18.4 .446 .369 .808 1.10 1.70 2.80 .9 .63 .51 .63 1.80 5.4
Sergio Rodriguez 80 13 15.3 .392 .325 .792 .50 1.10 1.60 3.6 .68 .03 1.49 1.70 4.5
Jerryd Bayless 53 0 12.4 .365 .259 .806 .20 .90 1.10 1.5 .30 .04 1.06 1.50 4.3
Channing Frye 63 1 11.8 .423 .333 .722 .70 1.60 2.20 .4 .27 .25 .46 1.70 4.2
Shavlik Randolph 10 0 3.7 .615 1.000 .250 1.00 .80 1.80 .0 .00 .10 .60 .40 1.8
Indiana Pacers
Danny Granger 67 66 36.2 .447 .404 .878 .70 4.40 5.10 2.7 1.03 1.45 2.46 3.10 25.8
Mike Dunleavy 18 14 27.5 .401 .356 .815 .80 3.00 3.80 2.4 .67 .50 2.11 2.00 15.1
T.J. Ford 74 49 30.5 .452 .337 .872 .80 2.70 3.50 5.3 1.20 .22 2.43 2.40 14.9
Troy Murphy 73 73 34.0 .475 .450 .826 2.00 9.80 11.80 2.4 .79 .47 1.56 3.10 14.3
Marquis Daniels 54 43 31.5 .451 .200 .721 1.50 3.10 4.60 2.1 1.15 .48 1.74 2.20 13.6
Jarrett Jack 82 53 33.1 .453 .353 .852 .50 2.80 3.40 4.1 1.07 .21 2.24 2.20 13.1
Brandon Rush 75 19 24.0 .423 .373 .697 .50 2.70 3.10 .9 .51 .49 1.00 1.70 8.1
Roy Hibbert 70 42 14.4 .471 .000 .667 1.60 1.80 3.50 .7 .29 1.09 .79 3.10 7.1
Rasho Nesterovic 70 19 17.3 .513 .000 .781 1.30 2.10 3.40 1.6 .43 .54 .90 2.40 6.8
Jeff Foster 74 26 24.7 .501 .286 .658 2.90 4.00 6.90 1.8 .72 .66 1.19 3.10 6.1
Stephen Graham 52 6 13.2 .414 .303 .806 .40 1.40 1.80 .6 .19 .08 .87 1.60 5.4
Travis Diener 55 0 13.1 .413 .390 .800 .10 1.50 1.60 2.2 .47 .09 .38 .80 3.7

3
apps/nba/data/readme Executable file
View File

@ -0,0 +1,3 @@
Run 'import_data.sh' in current directory to import the data to the database.
Before running the script, please make sure that your database server is ready to accept connections.

329
apps/nba/web_pages/fitness.php Executable file
View File

@ -0,0 +1,329 @@
<html>
<head>
<title>Fitness Prediction</title>
<link rel="stylesheet" type="text/css" href="style1.css" media="screen" />
</head>
<body>
<?php
// Connect the database
$dbconn = pg_connect("host=localhost port=5432 dbname=nba");
// The names of the team and current player
$name = $_GET['player'];
$team = $_GET['team'];
// Get the fitness information for the current player
$query = "select fitness from Fitness where player='$name'";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
$line = pg_fetch_array($result, null, PGSQL_ASSOC);
$current_fit = $line['fitness'];
echo
"<div>
<table>
<tr>
<td width='800'><h5><a href='main.html'>Main Page</a> > <a href='manage.php?team=$team'>Team Page</a> > <a href='player.php?player=$name&team=$team'>Player Page</a><h5></td>
<td><h5>powered by:</h5></td>
<td><h5><img src='img/maybms_logo.jpg' width='70' height='30'/></h5></td>
</tr>
</table>
</div>";
echo "<div class='node sticky'>";
echo "<table>
<tr>
<td width='250'><a href='player.php?player=$name&team=$team'> <h4>Player: <b>" . $name . "</b><h4></a></td>
<td><h4>Team: <b><a href='manage.php?team=$team'>$team</a><b><h4></td>
<td>&nbsp&nbsp<a href='manage.php?team=$team'><img src='img/logos/$team.gif'/></a></td>
</tr>
<tr>
<td colspan=2><h4>Current Fitness: <b>$current_fit </b></h4></td>
</tr>
</table><br>";
?>
<?php
// This function fetches all entries in a transition matrix
function output_transition($result)
{
while ($line = pg_fetch_array($result, null, PGSQL_NUM))
{
if ($line[0] == "Fit for Match" && $line[1] == "Fit for Match")
$fit_fit = $line[2];
else if ($line[0] == "Fit for Match" && $line[1] == "Seriously Injured")
$fit_se = $line[2];
else if ($line[0] == "Fit for Match" && $line[1] == "Slightly Injured")
$fit_sl = $line[2];
else if ($line[0] == "Seriously Injured" && $line[1] == "Fit for Match")
$se_fit = $line[2];
else if ($line[0] == "Seriously Injured" && $line[1] == "Seriously Injured")
$se_se = $line[2];
else if ($line[0] == "Seriously Injured" && $line[1] == "Slightly Injured")
$se_sl = $line[2];
else if ($line[0] == "Slightly Injured" && $line[1] == "Fit for Match")
$sl_fit = $line[2];
else if ($line[0] == "Slightly Injured" && $line[1] == "Seriously Injured")
$sl_se = $line[2];
else if ($line[0] == "Slightly Injured" && $line[1] == "Slightly Injured")
$sl_sl = $line[2];
}
// Print the transition matrix as a table
echo "<tr>
<td>Fit for Match</td>
<td><center>$fit_fit</td>
<td><center>$fit_se</td>
<td><center>$fit_sl</td>
</tr>
<tr>
<td>Seriously Injured</td>
<td><center>$se_fit</td>
<td><center>$se_se</td>
<td><center>$se_sl</td>
</tr>
<tr>
<td>Slightly Injured</td>
<td><center>$sl_fit</td>
<td><center>$sl_se</td>
<td><center>$sl_sl</td>
</tr>";
echo "</table>";
}
// This function exams whether a game is checked in the last page
function checked($array, $game)
{
for ($i=0; $i<count($array); $i++)
{
if ($game == $array[$i])
return True;
}
return False;
}
// Get the transition matrix for a non-match day
$query = "select InitState, FinalState, p from FitnessTransition where player='$name' and play_a_match='N'";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
echo "<div class='node sticky'>
<table>
<tr>
<td align='center'>";
echo "<b>Fitness Matrix for a Non-Match Day (A player tends to get fit):<b><br>";
echo "<table border=1>
<tr>
<td>&nbsp</td>
<td>Fit for Match</td>
<td>Seriously Injured</td>
<td>Slightly Injured</td>
</tr>";
output_transition($result);
echo "</td><td align='center' width='500'>";
// Get the transition matrix for a match day
$query = "select InitState, FinalState, p from FitnessTransition where player='$name' and play_a_match='Y'";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
echo "<b>Fitness Matrix for a Match Day (A player tends to get injured):</b><br>";
echo "<table border=1>
<tr>
<td>&nbsp</td>
<td>Fit for Match</td>
<td>Seriously Injured</td>
<td>Slightly Injured</td>
</tr>";
output_transition($result);
echo "</td></tr></table></div>";
// Create a temporary relation representing a match-day transition with repair-key
$query = "create table one_step_with_match as
repair key InitState in (select InitState, FinalState, p from FitnessTransition where player = '$name' and play_a_match = 'Y') weight by p";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
// Create a temporary relation representing a non-match-day transition with repair-key
$query = "create table one_step_without_match as
repair key InitState in (select InitState, FinalState, p from FitnessTransition where player = '$name' and play_a_match = 'N') weight by p";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
$query = "select team2 from Matches M where M.team1 = '$team'";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
echo "<div class='node sticky'><form name='myForm' method='post' action=$PHP_SELF>";
echo "<h4><b>Fitness Prediction:</b><br></h4>";
echo "<table border=1>
<tr>
<td rowspan=2>Play</td>
<td rowspan=2><center>Match</td>
<td colspan=3 align=center><b>Fitness before the Match</b></td>
</tr>
<tr>
<td>Fit for Match</td>
<td>Seriously Injured</td>
<td>Slightly Injured</td>
</tr>";
$count = 0; // Count the games
$fit; // The probability that a player is fit before a match
$serious; // The probability that a player is seriously injured before a match
$slight; // The probability that a player is slightly injured before a match
$step; // A match-day transition or a non-match-day transition
$previous_row_is_checked; // If the previous row is checked, then the previous day is a match-day; otherwise, it is a non-match day
$rows = pg_num_rows($result); // The number of matches
// Loop over all matches
while ($line = pg_fetch_array($result, null, PGSQL_NUM)) {
$count++;
$has_been_checked = checked($_POST['games'], $line[0]);
if ($has_been_checked)
echo "<tr>
<td><center><input type='checkbox' name='games[]' value='$line[0]' 'CHECKED'></td>";
else
echo "<tr>
<td><center><input type='checkbox' name='games[]' value='$line[0]'></td>";
// If the previous day is a match-day, use the match-day transition;
// otherwise, use the non-match-day transition
if ($previous_row_is_checked)
$step = "one_step_with_match";
else
$step = "one_step_without_match";
$previous_row_is_checked = $has_been_checked;
echo "<td>$team $line[0]</td>";
// If this is the first match, use the current fitness information. No
// random walk is needed
if ($count == 1)
{
if ($current_fit == "Fit for Match")
echo "<td><center>1</td>
<td><center>0</td>
<td><center>0</td>
</tr>";
else if ($current_fit == "Seriously Injured")
echo "<td><center>0</td>
<td><center>1</td>
<td><center>0</td>
</tr>";
else
echo "<td><center>0</td>
<td><center>0</td>
<td><center>1</td>
</tr>";
continue;
}
// The second match
else if ($count == 2)
{
// Compute the probabilities of different states on top of a one-step random walk
$FT_query = "select FinalState as State, conf() as p from $step where InitState = '$current_fit' group by FinalState";
$FT_result = pg_query($FT_query) or die('Query failed: ' . pg_last_error());
// Create a temporary relation representing the transition matrix of a one-step random walk
$FT_query = "create table current_fitness as
select InitState, FinalState, conf() as p from $step group by InitState, FinalState";
pg_query($FT_query) or die('Query failed: ' . pg_last_error());
}
// Other matches
else
{
// Compute the probabilities of different states on top of a more-than-one-step random walk
$FT_query = "select S.FinalState, conf() as p
from $step S, ( repair key InitState in current_fitness weight by p ) R
where R.FinalState = S.InitState and R.InitState = '$current_fit' group by S.FinalState";
$FT_result = pg_query($FT_query) or die('Query failed: ' . pg_last_error());
// Create a temporary relation representing the transition matrix of
// random walks from the first match to current match
$FT_query = "create table current_fitness_temp as
select R.InitState, S.FinalState, conf() as p
from $step S, ( repair key InitState in current_fitness weight by p ) R
where R.FinalState = S.InitState group by R.InitState, S.FinalState;";
// Rename the temporary ralation
$FT_query .= "drop table current_fitness;";
$FT_query .= "alter table current_fitness_temp rename to current_fitness";
pg_query($FT_query) or die('Query failed: ' . pg_last_error());
}
// Initialize all probabilities to 0s
$fit = 0;
$serious = 0;
$slight = 0;
// Store the probabilities to the proper variables
while ($FT_line = pg_fetch_array($FT_result, null, PGSQL_NUM))
{
if ($FT_line[0] == "Fit for Match")
$fit = $FT_line[1];
else if ($FT_line[0] == "Seriously Injured")
$serious = $FT_line[1];
else
$slight = $FT_line[1];
}
// Print the probabilites
echo "<td><center>$fit</td>
<td><center>$serious</td>
<td><center>$slight</td>
</tr>";
// Delete the temporary random walk relation if all the matches have been iterated
if ($count == $rows)
{
$FT_query = "drop table current_fitness";
$FT_result = pg_query($FT_query) or die('Query failed: ' . pg_last_error());
}
}
echo "</table>";
echo "<br><input type='submit' name='update' value='Update'>";
echo "</form></div>";
// Delete the temporary one-step random walk relations
$query = "drop table one_step_with_match";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
$query = "drop table one_step_without_match";
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
// Free resultset
pg_free_result($result);
// Closing connection
pg_close($dbconn);
?>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Some files were not shown because too many files have changed in this diff Show More