All Classes and Interfaces
Class
Description
Implementation of the ABS(x) SQL function, computes the absolute
value of a single argument.
This class provides the general abstraction for aggregate functions, which
consume a sequence of values one by one, and produce a single aggregate
result based on that input sequence.
This Command class represents the ANALYZE SQL command, which
analyzes a table's internal data and updates its cached statistics to be as
up-to-date as possible.
This class takes a predicate or a collection of conjuncts and analyzes it
into a "range" component and an "other" component.
Records the starting and ending points of a range comparison on one
column of a query predicate.
Implementation of the ACOS(x) SQL function, computes the
arc-cosine of a single argument.
Implementation of the ASIN(x) SQL function, computes the
arc-sine of a single argument.
Implementation of the ATAN(x) SQL function, computes the
arc-tangent of a single argument.
Implementation of the ATAN2(y, x) SQL function, computes the
arc-tangent of two arguments.
This class implements simple binary arithmetic operations.
This enum specifies the arithmetic operations that this class can provide.
Some helpful utility operations for working with arrays.
Implementation of the AVG(x) SQL aggregate function, computes the
average of its inputs.
Implementation of the AVG(DISTINCT x) SQL aggregate function,
computes the average of its inputs, with duplicates eliminated.
This class represents a command that starts a transaction, such as
BEGIN, BEGIN WORK, or START TRANSACTION.
This validator handles properties that are Boolean flags.
This class provides the standard Boolean logical operators AND, OR, and NOT,
for two or more terms (or exactly one term, in the case of NOT).
This enumeration specifies the different kinds of Boolean operators that
this class can implement.
This class uses the PageTuple class functionality to access and
manipulate keys stored in a B+ tree tuple file.
This class provides some simple verification operations for B+
tree tuple files.
This helper class is used to keep track of details of pages within the
B+ tree file.
This runtime exception class is used to abort the verification scan.
This interface specifies the page-type values that may appear within the
B+ Tree implementation.
This class, along with a handful of helper classes in this package,
provides support for B+ tree tuple files.
This class represents errors that occur while manipulating B+
tree tuple files.
This class provides high-level operations on B+ tree tuple files.
The buffer manager reduces the number of disk IO operations by managing an
in-memory cache of data pages.
This helper class records the pin-count of a data buffer as imposed by
a given session, so that we can forcibly release the session's pins
after each command the session completes.
This interface allows other classes to respond to operations performed by
the
BufferManager.
Implementation of the CEIL(x) / CEILING(x) SQL function,
computes the smallest whole number larger than the argument.
This class handles a connection from a single client to the database
server.
Implementation of the COALESCE(a, b, ...) SQL function, returns
the first non-NULL argument.
Basic information about a table column, including its name and SQL type.
This class represents a column name that appears in an SQL expression.
This class represents a set of columns in a schema by specifying the
indexes of the columns in the set.
This class holds some useful statistics for a specific column.
This class facilitates the collection of statistics for a single column of a
table being analyzed by the
TableManager.analyzeTable(edu.caltech.nanodb.relations.TableInfo)
method.The type of a single column in a relation.
This expression class represents the value of a tuple column.
Abstract base-class for all commands that NanoDB supports.
Commands are either Data-Definition Language (DDL), Data-Manipulation
Language (DML), or utility commands.
This interface can be implemented by components that need to do processing
before and/or after a command is executed.
This class holds properties that might contain additional details for a
command.
This class represents the result of executing a command against the
database.
This class represents a command that commits a transaction, such as
COMMIT or COMMIT WORK.
This class implements simple binary comparison operations.
This enumeration specifies the types of comparisons that can be
performed.
Implementation of the CONCAT(s1, s2, ...) SQL function,
concatenates two or more arguments as strings.
The concurrency-control subsystem in the Transaction Manager implements
this interface so that it can maintain isolation of transactions during
execution.
Constraints may be specified at the table level, or they may be specified
on individual columns.
This exception is used to signal when a database constraint is violated.
Implementation of the COS(x) SQL function, computes the cosine of
a single argument.
Implementation of the COUNT(x) SQL aggregate function, computes
the count of its inputs.
This aggregate function can be used to compute both COUNT(...) and
COUNT(DISTINCT ...) aggregate functions.
Implementation of the COUNT(DISTINCT x) SQL aggregate function,
computes the count of its inputs, with duplicates eliminated.
Implementation of the COUNT(*) SQL aggregate function, computes
the count of the input rows.
This command "crashes" the database by shutting it down immediately without
any proper cleanup or flushing of caches.
This command-class represents the CREATE INDEX DDL command.
This command handles the CREATE TABLE DDL operation.
This command-class represents the CREATE VIEW DDL command.
This class enforces all database constraints on the database schema,
including NOT NULL constraints, primary key/unique constraints,
and foreign key constraints.
This class represents runtime issues with data files not being in the
proper format, or other such issues occurring.
Created with IntelliJ IDEA.
This class provides the constants and operations necessary for manipulating
a data page within a heap file.
Provides a number of utility operations for working with dates, times and
timestamps.
This class provides page-level access to a database file, which contains
some kind of data utilized in a database system.
This class provides the basic abilty to read a
DBFile as a single
sequential file, obscuring the fact that it is actually broken into pages.This enumeration specifies the different types of data file that the
database knows about.
A subclass of
DBFileReader, this class provides the basic ability
to read and write a DBFile as a single sequential file, obscuring
the fact that it is actually broken into pages.This class represents a single page in a database file.
A class representing the unique identity of a
DBPage, used as
a key for tracking pages in maps.
This class requests locks on the Lock Manager before read or write
operations are performed on a
DBPage object.This interface allows other classes to observe operations performed on
DBPage objects.This helper class provides some useful functions for constructing keys and
indexes and other details for tables that are being initialized.
This exception is thrown when a deadlock is detected by the lock manager.
This class holds expression aliases and view definitions during query
planning.
This command object represents a top-level DELETE command issued
against the database.
An implementation of the tuple processor interface used by the
DeleteCommand to delete each tuple.This exception is thrown when an expression would cause a divide by zero.
This command-class represents the DROP INDEX DDL command.
This Command class represents the DROP TABLE SQL command.
An abstract base-class that holds the common implementation of the various
kinds of dump commands.
A tuple processor implementation used to dump each tuple.
This command object represents a DUMP INDEX command issued against
the database.
This command object represents a DUMP TABLE command issued against
the database.
This class holds the environment for evaluating expressions that include
symbols.
This class holds statistics generated from a query evaluation operation,
such as the number of rows fetched and the total time to perform the
evaluation.
The event dispatcher notifies listeners when specific events occur within
the database, related to command execution and row processing operations.
This class is used for starting the NanoDB database in "exclusive mode,"
where only a single client interacts directly with the database system.
This exception is thrown when a fatal error occurs during command
execution.
This class implements the EXISTS (subquery) operator.
This Command class represents the EXIT or QUIT SQL
commands.
This Command class represents the EXPLAIN SQL command, which prints
out details of how SQL DML statements will be evaluated.
This is the base type of all arithmetic and logical expressions that can be
represented in SQL commands.
This
ExpressionProcessor implementation traverses an expression
and finds all symbols that appear within the expression.This exception is thrown when there is an error during the evaluation of an
expression.
This interface is used to implement scans or transformations of expression
trees by specifying what to do when entering or leaving each expression
node.
Implementation of the EXTRACT(temporal, unit) SQL function,
extracts the specified unit from the temporal argument.
This interface specifies all operations that file managers must provide.
The File Manager provides unbuffered, low-level operations for working with
paged data files.
This class provides file-level operations for the B+ tree
implementation, such as acquiring a new data page or releasing a data page.
This class represents a pointer to a location within a database file.
A select plan-node that scans a tuple file, checking the optional predicate
against each tuple in the file.
This class represents errors that occur while opening, closing and
manipulating files.
Implementation of the FLOOR(x) SQL function, computes the largest
whole number smaller than the argument.
This command flushes all unwritten data from the buffer manager to disk.
This class represents a foreign key constraint between two tables in the
database.
An enumeration specifying the options allowed for ON DELETE and
ON UPDATE actions for foreign keys.
This class is a simple output-stream that can be used by a
PrintStream to buffer up printed output.This class represents a hierarchy of one or more base and derived relations
that produce the rows considered by SELECT clauses.
This enumeration specifies the overall type of the FROM
clause.
For FROM clauses that contain join expressions, this enumeration
specifies the kind of join-condition for each join expression.
This is the root class of all kinds of functions in NanoDB.
This class represents all kinds of function-call expressions, including
simple function calls, aggregate function calls, and table-returning
function calls.
This class is a directory of all functions recognized within NanoDB,
including simple functions, aggregate functions and table functions.
Implementation of the GREATEST(a, b, ...) SQL function, returns
the greatest value of all arguments.
This class provides the common functionality necessary for grouping and
aggregation.
Implements grouping and aggregation by using hashing as a method to
identify groups.
This interface extends the
TupleFile interface, adding operations
that can be provided on files of tuples that are hashed on a specific key.This class manipulates the header page for a B+ tree index file.
This class contains constants and basic functionality for accessing and
manipulating the contents of the header page of a heap table-file.
This class implements the TupleFile interface for heap files.
This class provides high-level operations on heap tuple files.
This class implements a "uniquely identifiable" byte array for use within
the Buffer Manager.
Implementation of the IF(cond, expr1, expr2) SQL function,
if the first argument is TRUE then expr1 is evaluated
and returned; otherwise expr2 is evaluated and returned.
Implementation of the IFNULL(expr1, expr2) SQL function, if
expr1 is NULL then expr2 is evaluated and
returned; otherwise the value of expr1 is returned.
This class records that there is an index built on a particular set of
columns.
This class provides an implementation of the
TableManager interface
for tables that can have indexes and constraints on them.This class represents errors that occur while manipulating indexes.
This class is used to hold information about a single index in the
database.
This interface specifies all operations that are necessary for supporting
indexes in NanoDB.
This class represents endpoint information relative to a specific
index.
This enumeration represents the different kinds of indexes that NanoDB
supports, since different kinds of indexes facilitate different kinds of
lookups with different performance characteristics.
This class implements the
RowEventListener interface to make sure
that all indexes on an updated table are kept up to date.This class provides a number of very useful utility operations that make it
easier to create and work with indexes.
This class wraps a
DBPage object that is an inner page in the
B+ tree file implementation, to provide some of the basic
inner-page-management operations necessary for the file structure.This class provides high-level B+ tree management operations
performed on inner nodes.
This command object represents a top-level INSERT command issued
against the database.
An implementation of the tuple processor interface used by the
InsertCommand to insert tuples into a table, when the command is
of the form INSERT ...This class implements the expr IN (subquery) operator.
An integer counter that can be used to count occurrences of things.
Validates an integer property value using a predicate; if the value cannot
be cast to an integer or the predicate returns false, then the specified
error message will be reported.
This abstract class implements the basic functionality necessary for
providing an interactive SQL client.
This exception class can be thrown when a file-pointer is discovered to be
invalid for some reason.
This exception is used to signal when a SQL query contains a semantic error
that prevents its evaluation.
This class implements the expr IN (values) operator.
General Java platform utilities.
An enumeration specifying the different types of join operation.
This class represents a primary key or other unique key, specifying the
indexes of the columns in the key.
This class wraps a
DBPage object that is a leaf page in the
B+ tree file implementation, to provide some of the basic
leaf-management operations necessary for the file structure.This class provides high-level B+ tree management operations
performed on leaf nodes.
Implementation of the LEAST(a, b, ...) SQL function, returns
the smallest value of all arguments.
This expression class represents literal values.
This class provides lock-based concurrency control in the Transaction
Manager.
This class represents an entity that is currently locked in some lock
mode specified by the
LockMode class.Created by donnie on 10/28/14.
The Lock Manager allows concurrency-control constraints to be imposed
within the database by providing a locking abstraction that can be used to
govern access to tables, table pages, indexes, and so forth.
This enumeration specifies the locking modes available on lockable items in
the database.
This class represents a request for a lock on an entity that is currently
held by some other owner, and the lock-request cannot be granted yet
(e.g.
This enumeration is used to inform waiting requesters as to the outcome
of their lock request.
This class represents a Log Sequence Number (LSN) in the write-ahead log.
An implementation of the page-buffer replacement policy that evicts the
Least Recently Used (LRU) page-buffer.
Implementation of the MAX(x) SQL aggregate function, computes the
maximum of its inputs.
Implementation of the MIN(x) SQL aggregate function, computes the
minimum of its inputs.
This aggregate function can be used to compute either the minimum or the
maximum of a collection of values.
This is the base-class of all exceptions specific to NanoDB functionality.
This class provides the entry-point operations for managing the database
server, and executing commands against it.
This class provides an empty implementation of
NanoSQLListener,
which can be extended to create a listener which only needs to handle a subset
of the available methods.This class provides an empty implementation of
NanoSQLVisitor,
which can be extended to create a visitor which only needs to handle a subset
of the available methods.This interface defines a complete listener for a parse tree produced by
NanoSQLParser.This class translates NanoSQL parse trees generated by the ANTLR4 grammar
into the corresponding hierarchy of
Command and Expression
objects used by the server for command execution.This interface defines a complete generic visitor for a parse tree produced
by
NanoSQLParser.This class implements unary negation.
This plan node implements a nested-loop join operation, which can support
arbitrary join conditions but is also the slowest join implementation.
This class is a simple extension of Java's
ByteArrayOutputStream that
exposes the internal buffer without having to make a copy of it via the
normal ByteArrayOutputStream.toByteArray() method.This class provides a type to associate with NULL literal values.
Implementation of the NULLIF(cond, expr) SQL function, if
cond is TRUE then NULL is returned; otherwise
expr2 is evaluated and returned.
This Command class represents the OPTIMIZE SQL command, which
optimizes a table's representation (along with any indexes) to improve access
performance and space utilization.
This class represents an expression that results are ordered by, as well as
whether the order is ascending or descending.
This class facilitates sequences of read operations against a single
DBPage object, by providing "position" state that is also updated
after each read is performed.
An interface specifying operations that must be provided by Buffer Manager
page replacement policy implementations.
This class extends the
PageReader class to provide write operations
as well as read operations.A simple read-only wrapper-class for holding two values.
This helper class parses a string into a SQL operation using the NanoSQL
parser.
This class provides a basic performance-counter mechanism that can be used
concurrently from many different threads.
This interface specifies the basic "pin" and "unpin" operations that all
pinnable objects need to provide.
This class holds a collection of values that represent the cost of an
operation against the database.
This interface specifies the common entry-point for all query
planner/optimizer implementations.
This class validates the query-planner class name by making sure the
specified class actually derives from
Planner, and that it may
be instantiated via a no-argument constructor.The base class of all query execution plan nodes.
A collection of helpful utilities that can be used for generating,
analyzing and manipulating query execution plans.
Implementation of the POW(x, y) SQL function, computes the
result of raising the first argument to the second argument's power.
A collection of helpful utilities that can be used for generating,
analyzing and manipulating predicates.
Various methods to use for pretty-printing, such as delimiters, padding, and
such.
This implementation of the tuple-processor interface prints out the schema
and the tuples produced by the SELECT statement in a cooler,
prettier fashion.
PlanNode representing the SELECT clause in a SQL query.
This exception is thrown when an attempt is made to write to a read-only
property.
An interface that components can implement to be notified of changes to
property-values during system operation.
This class provides helper operations for reading typed properties out of
Java
Properties files, or out of the Java environment.This is the central location where all properties exposed by the database
can be registered and accessed.
This class represents all SQL query commands, including SELECT,
INSERT, UPDATE, and DELETE.
Typesafe enumeration of query-command types.
Returns the current value of the specified performance counter.
This class holds information necessary for the
WALManager to perform
recovery processing, such as the LSNs to scan for redo/undo processing, and
the set of incomplete transactions.This class provides a simple regex-based file filter for use with
File.listFiles(java.io.FileFilter).This plan-node implements the Rename relational algebra operation, for
either renaming a table in a query, or assigning a table-name to a derived
relation.
Resets the specified performance counter, and returns the old value.
This class represents a command that rolls back a transaction, such as
ROLLBACK or ROLLBACK WORK.
Implementation of the ROUND(x) SQL function, computes the whole
number closest to the argument (0.5 is rounded up).
This interface can be implemented by components that need to do processing
before and/or after a row is inserted, updated, or deleted.
This class represents functions that return one scalar value as their
result.
This class represents a scalar subquery embedded in another query's
predicate.
A schema is an ordered collection of column names and associated types.
This helper class is used for the internal hashed column structure, so
that we can do fast lookups based on table names and column names.
This exception is thrown when there are any schema name issues, such as
duplicate column names, duplicate table names, ambiguous or invalid names,
and so forth.
This class contains a general purpose implementation for reading and
writing a table schema into a data page.
This class represents a single SELECT ... statement or clause.
This command object represents a top-level SELECT command issued
against the database.
This utility class is used to estimate the selectivity of predicates that
appear on Select and Theta-Join plan-nodes.
PlanNode representing the WHERE clause in a SELECT
operation.
This class represents a single expression in a SELECT clause.
This interface extends the
TupleFile interface, adding operations
that can be provided on files of tuples that are stored in a specific
sequential order.This class holds all session state associated with a particular client
accessing the database.
Implements the "SET VARIABLE ..." command.
This class implements a "shared" database server that listens for incoming
connections on a socket, so that the database can have multiple concurrent
clients connected at the same time.
This class implements a client the can connect to the NanoDB
shared server and
send/receive commands and data.Implements the "SHOW VARIABLES" command.
Implements the "SHOW [system] STATS" command.
Implements the "SHOW TABLES" command.
Implements the "SHOW TABLE t STATS" command.
This select plan node implements a simple filter of a subplan based on a
predicate.
This class provides the general abstraction for simple scalar functions,
which take zero or more arguments, and produce a single scalar result
based on these inputs.
This class generates execution plans for very simple SQL
SELECT * FROM tbl [WHERE P] queries.
Implementation of the SIN(x) SQL function, computes the sine of a
single argument.
Implements grouping and aggregation by using sorting as a method to find
groups.
This class implements the basic sort-merge join algorithm for use in join
evaluation.
This plan node provides a simple in-memory sort operation for use in
ORDER BY clauses.
An enumeration of the SQL data-types that are supported by NanoDB.
Implementation of the SQRT(x) SQL function, computes the
square-root of a single argument.
This helper class provides basic functionality for updating column
statistics based on a selection predicate.
This class encapsulates the operations of reading and writing
table-statistics to a data file.
Implementation of the STDDEV(x) SQL aggregate function, computes
the standard deviation of its inputs.
This aggregate function can be used to compute either the standard
deviation or the variance of a collection of values.
This class and its subclasses represent general storage errors that can be
encountered when manipulating the various data files that comprise the
database.
The Storage Manager provides facilities for managing files of tuples,
including in-memory buffering of data pages and support for transactions.
Validates a string property value against a collection of valid values; if
the value cannot be cast to a string or the value doesn't appear in the
collection of valid values, then an error will be reported.
This class implements string matching operations.
This enumeration specifies the types of matching that can be performed.
Validates a string property value; if the value cannot be cast to a string
then an error will be reported.
This class is the superclass of all expressions that can hold subqueries,
such as the IN operator, the EXISTS operator, and scalar
subqueries.
This expression-processor implementation looks for subqueries within an
expression, and calls the
SelectClause.computeSchema(edu.caltech.nanodb.storage.TableManager, edu.caltech.nanodb.queryast.SelectClause) method on them.Implementation of the SUBSTRING(s, index, count) SQL function,
extracts a substring from s starting with the (1-based)
index, and extracting count characters.
Implementation of the SUM(x) SQL aggregate function, computes the
sum of its inputs.
This aggregate function can be used to compute both SUM and
AVERAGE functions.
Implementation of the SUM(DISTINCT x) SQL aggregate function,
computes the sum of its inputs, with duplicates eliminated.
This class represents a single column declaration within a CREATE
TABLE command.
An enumeration specifying the constraint types allowed on tables.
This class represents errors that occur while manipulating tables.
This is the base-class for all table-returning functions.
A select plan-node that produces the output of a specific table-returning
function, checking the optional predicate against each tuple.
This class represents a single table in the database, including the table's
name, and the tuple file that holds the table's data.
This interface specifies the operations performed specifically on table
files.
This class is a simple wrapper for table-file statistics.
Created by donnie on 7/16/17.
Implementation of the TAN(x) SQL function, computes the tangent of
a single argument.
PlanNode representing the FROM clause in a SELECT
operation.
This class represents errors that occur as part of transaction processing.
The Transaction Manager handles all aspects of transaction processing
within the database, including concurrency control, write-ahead logging,
and recovery processing.
This class manages the transaction state associated with every client
session.
This class wraps the transaction-state page to provide basic operations
necessary for reading and storing essential values.
This implementation of the
CommandEventListener interface manages
the transaction state enclosing each command executed by the database.This exception is a specific subtype of the type-cast exception that is
thrown when a type-conversion would cause a truncation of a value.
This interface provides the operations that can be performed with a tuple.
This plan-node returns tuples from a collection specified on the node
before it is prepared.
This class allows us to sort and compare tuples based on an order-by
specification.
This enumeration specifies available comparison modes that the
TupleComparator is able to use when comparing tuples.This interface defines the most basic operations that all files storing
tuples must support.
This class represents errors that occur while manipulating tuple files.
This interface defines the operations that can be performed on
TupleFiles, but that are at a higher level of implementation than
the tuple file itself.A simple implementation of the
Tuple interface for storing literal
tuple values.This implementation of the tuple-processor interface simply prints out
the schema and tuples produced by the SELECT statement.
This interface allows us to decouple the implementation of the query
evaluation loop from the operations performed on each tuple generated by the
evaluator.
This implementation of the tuple-processor interface sends the schema and
tuples produced by the SELECT statement over an
ObjectOutputStream.This exception is thrown when the
TypeConverter tries to cast
a value from one type to another incompatible type.This class provides a whole bunch of helper functions for performing type
conversions on values produced by various expressions.
This command object represents a top-level UPDATE command issued
against the database.
An implementation of the tuple processor interface used by the
UpdateCommand to update each tuple.This class represents a single column-name/expression pair in an
UPDATE statement's SET clause.
Implementation of the VARIANCE(x) SQL aggregate function, computes
the variance of its inputs.
This Command class represents the VERIFY SQL command, which
verifies a table's representation (along with any indexes) to ensure that
all structural details are valid.
This exception class represents issues with write-ahead log files, when they
contain corrupt or invalid information in some way.
This class manages the write-ahead logs of the database.
This enumeration specifies the various types of records that can appear in
the write-ahead log, along with their numeric values that actually appear
within the write-ahead log.