Uses of Class
edu.caltech.nanodb.relations.Schema
-
Packages that use Schema Package Description edu.caltech.nanodb.client This package contains classes that allow NanoDB to be used from multiple concurrent clients, to maintain client session state, and so forth.edu.caltech.nanodb.commands This package contains the classes that represent the commands that the NanoSQL database recognizes.edu.caltech.nanodb.expressions This package contains classes for representing and evaluating arithmetic and logical expressions.edu.caltech.nanodb.functions This package contains the abstractions for supporting simple functions, aggregate functions, and table-returning functions in NanoDB.edu.caltech.nanodb.indexes edu.caltech.nanodb.plannodes This package contains classes for representing query execution plans, as well as analyzing their costs.edu.caltech.nanodb.queryast edu.caltech.nanodb.queryeval This package contains the query-evaluation components of the database.edu.caltech.nanodb.relations This package contains the basic data-types for representing relations in NanoDB.edu.caltech.nanodb.server edu.caltech.nanodb.storage This package contains the classes for the Storage Manager, which is responsible for how data is stored in and retrieved from database files.edu.caltech.nanodb.storage.heapfile This package provides a naive implementation of the heap file organization for NanoDB. -
-
Uses of Schema in edu.caltech.nanodb.client
Fields in edu.caltech.nanodb.client declared as Schema Modifier and Type Field Description private Schema
SharedClientState. schema
-
Uses of Schema in edu.caltech.nanodb.commands
Fields in edu.caltech.nanodb.commands declared as Schema Modifier and Type Field Description private Schema
UpdateCommand.TupleUpdater. schema
The schema of the input tuples produced by the query evaluation.Methods in edu.caltech.nanodb.commands with parameters of type Schema Modifier and Type Method Description private void
CreateTableCommand. initTableConstraints(StorageManager storageManager, Schema schema, java.util.HashMap<java.lang.String,TableInfo> referencedTables)
static ForeignKeyColumnRefs
DDLUtils. makeForeignKey(Schema tableSchema, TableInfo refTableInfo, ConstraintDecl constraintDecl)
This method constructs aForeignKeyColumnRefs
object that includes the columns named in the input list, as well as the referenced table and column names.void
DeleteCommand.TupleRemover. setSchema(Schema schema)
This tuple-processor implementation doesn't care about the schema.void
DumpCommand.TupleExporter. setSchema(Schema schema)
The exporter can output the schema to the dump file.void
InsertCommand.TupleInserter. setSchema(Schema schema)
This implementation ignores the schema of the results, since we just don't care.void
UpdateCommand.TupleUpdater. setSchema(Schema schema)
Stores the schema that will be produced during result evaluation. -
Uses of Schema in edu.caltech.nanodb.expressions
Fields in edu.caltech.nanodb.expressions declared as Schema Modifier and Type Field Description private Schema
TupleComparator. schema
The schema of the tuples that will be compared by this comparator object.Fields in edu.caltech.nanodb.expressions with type parameters of type Schema Modifier and Type Field Description private java.util.ArrayList<Schema>
Environment. currentSchemas
A list of the schemas being considered by the environment.Methods in edu.caltech.nanodb.expressions with parameters of type Schema Modifier and Type Method Description void
Environment. addTuple(Schema schema, Tuple tuple)
Adds a tuple to the environment with the given schema.static void
PredicateUtils. findExprsUsingSchemas(java.util.Collection<Expression> srcExprs, boolean remove, java.util.Collection<Expression> dstExprs, Schema... schemas)
This method takes a collection of expressions, and finds those expressions that can be evaluated solely against the provided schemas.ColumnInfo
ArithmeticOperator. getColumnInfo(Schema schema)
ColumnInfo
BooleanOperator. getColumnInfo(Schema schema)
ColumnInfo
ColumnValue. getColumnInfo(Schema schema)
ColumnInfo
CompareOperator. getColumnInfo(Schema schema)
ColumnInfo
ExistsOperator. getColumnInfo(Schema schema)
abstract ColumnInfo
Expression. getColumnInfo(Schema schema)
Returns aColumnInfo
object describing the type (and possibly the name) of the expression's result.ColumnInfo
FunctionCall. getColumnInfo(Schema schema)
ColumnInfo
InSubqueryOperator. getColumnInfo(Schema schema)
ColumnInfo
InValuesOperator. getColumnInfo(Schema schema)
ColumnInfo
IsNullOperator. getColumnInfo(Schema schema)
ColumnInfo
LiteralValue. getColumnInfo(Schema schema)
ColumnInfo
NegateOperator. getColumnInfo(Schema schema)
ColumnInfo
ScalarSubquery. getColumnInfo(Schema schema)
ColumnInfo
StringMatchOperator. getColumnInfo(Schema schema)
Constructors in edu.caltech.nanodb.expressions with parameters of type Schema Constructor Description TupleComparator(Schema schema, java.util.List<OrderByExpression> orderSpec)
Construct a new tuple-comparator with the given ordering specification. -
Uses of Schema in edu.caltech.nanodb.functions
Methods in edu.caltech.nanodb.functions that return Schema Modifier and Type Method Description abstract Schema
TableFunction. getSchema()
Returns the schema of the results that this node produces.Methods in edu.caltech.nanodb.functions with parameters of type Schema Modifier and Type Method Description ColumnType
Abs. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
ArcCos. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
ArcSin. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
ArcTan. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
ArcTan2. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Ceil. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Coalesce. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Concat. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Cos. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
CountAggregate. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
CountStar. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Floor. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Greatest. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
If. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
IfNull. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Least. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
MinMaxAggregate. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
NullIf. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Pow. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
ReadPerfCounter. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
ResetPerfCounter. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Round. getReturnType(java.util.List<Expression> args, Schema schema)
abstract ColumnType
ScalarFunction. getReturnType(java.util.List<Expression> args, Schema schema)
Returns the column type of the resulting column after applying the function.ColumnType
Sin. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Sqrt. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
StdDevVarAggregate. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
SumAvgAggregate. getReturnType(java.util.List<Expression> args, Schema schema)
ColumnType
Tan. getReturnType(java.util.List<Expression> args, Schema schema)
-
Uses of Schema in edu.caltech.nanodb.indexes
Methods in edu.caltech.nanodb.indexes that return Schema Modifier and Type Method Description Schema
IndexInfo. getSchema()
static Schema
IndexUtils. makeIndexSchema(Schema tableSchema, ColumnRefs indexDesc)
This method takes the schema of a table, and a description of an index, and it builds the schema that the index should have.Methods in edu.caltech.nanodb.indexes with parameters of type Schema Modifier and Type Method Description private void
IndexInfo. initIndexDetails(Schema schema, java.lang.String indexName)
static Schema
IndexUtils. makeIndexSchema(Schema tableSchema, ColumnRefs indexDesc)
This method takes the schema of a table, and a description of an index, and it builds the schema that the index should have. -
Uses of Schema in edu.caltech.nanodb.plannodes
Fields in edu.caltech.nanodb.plannodes declared as Schema Modifier and Type Field Description protected Schema
GroupAggregateNode. inputSchema
The schema of the plan-node feeding this grouping/aggregate node.private Schema
ProjectNode. inputSchema
The schema of tuples produced by the subplan.protected Schema
ThetaJoinNode. leftSchema
The cached schema of the left subplan, used for join-predicate evaluation.protected Schema
ThetaJoinNode. rightSchema
The cached schema of the right subplan, used for join-predicate evaluation.protected Schema
PlanNode. schema
The schema of the results produced by this plan-node.Methods in edu.caltech.nanodb.plannodes that return Schema Modifier and Type Method Description Schema
PlanNode. getSchema()
Returns the schema of the results that this node produces.Methods in edu.caltech.nanodb.plannodes with parameters of type Schema Modifier and Type Method Description protected void
ProjectNode. prepareSchemaStats(Schema inputSchema, java.util.ArrayList<ColumnStats> inputStats)
This helper function computes the schema of the project plan-node, based on the schema of its child-plan, and also the expressions specified in the project operation.Constructors in edu.caltech.nanodb.plannodes with parameters of type Schema Constructor Description TupleBagNode(Schema schema)
-
Uses of Schema in edu.caltech.nanodb.queryast
Fields in edu.caltech.nanodb.queryast declared as Schema Modifier and Type Field Description private Schema
FromClause. computedSchema
This value is filled in with the schema of the data that this FROM clause produces, when theFromClause.computeSchema(edu.caltech.nanodb.storage.TableManager)
method is called.private Schema
SelectClause. fromSchema
When preparing SQL commands for execution, this value is filled in with the schema that this query's FROM clause produces.private Schema
SelectClause. resultSchema
When preparing SQL commands for execution, this value is filled in with the schema that this SELECT clause produces.Methods in edu.caltech.nanodb.queryast that return Schema Modifier and Type Method Description private Schema
FromClause. buildJoinSchema(java.lang.String context, Schema leftSchema, Schema rightSchema, java.util.Set<java.lang.String> commonCols)
This helper function handles a NATURAL join or a join with a USING clause, determining what columns to use in the join, computing the join predicate to use, and computing the schema of the join result.Schema
FromClause. computeSchema(TableManager tableManager)
This function prepares the from-clause for use by the planner to generate an actual execution plan from the clause.Schema
SelectClause. computeSchema(TableManager tableManager, SelectClause parentSelect)
This method computes the resulting schema from this query, and in the process it performs various semantic checks as well.Schema
SelectClause. getFromSchema()
Returns the schema of the data produced by the FROM clause of this query.Schema
FromClause. getSchema()
Schema
SelectClause. getSchema()
Returns the schema for this select clause, ornull
if theSelectClause.computeSchema(edu.caltech.nanodb.storage.TableManager, edu.caltech.nanodb.queryast.SelectClause)
method hasn't yet been called on this clause.Methods in edu.caltech.nanodb.queryast with parameters of type Schema Modifier and Type Method Description private Schema
FromClause. buildJoinSchema(java.lang.String context, Schema leftSchema, Schema rightSchema, java.util.Set<java.lang.String> commonCols)
This helper function handles a NATURAL join or a join with a USING clause, determining what columns to use in the join, computing the join predicate to use, and computing the schema of the join result.private void
FromClause. checkJoinColumn(java.lang.String context, java.lang.String side, Schema schema, java.lang.String colName)
java.util.List<ColumnInfo>
SelectValue. getColumnInfos(Schema inputSchema, Schema resultSchema)
This function returns the column-details of all results that will be produced by this select-value.private void
SelectClause. resolveColumnRef(java.lang.String desc, Expression expr, ColumnName colName, Schema s, boolean checkParentQueries)
This helper function attempts to resolve a specific column-name against a query's schema.private void
SelectClause. resolveExpressionRefs(java.lang.String desc, Expression expr, Schema s, boolean checkParentQueries)
This helper function goes through the expression and verifies that every symbol-reference corresponds to an actual value produced by the FROM-clause of the SELECT query. -
Uses of Schema in edu.caltech.nanodb.queryeval
Methods in edu.caltech.nanodb.queryeval with parameters of type Schema Modifier and Type Method Description static float
SelectivityEstimator. estimateBoolOperSelectivity(BooleanOperator bool, Schema exprSchema, java.util.ArrayList<ColumnStats> stats)
This function computes a selectivity estimate for a general Boolean expression that may be comprised of one or more components.private static float
SelectivityEstimator. estimateCompareColumnColumn(CompareOperator.Type compType, ColumnValue columnOne, ColumnValue columnTwo, Schema exprSchema, java.util.ArrayList<ColumnStats> stats)
This helper function computes a selectivity estimate for a comparison between two columns.private static float
SelectivityEstimator. estimateCompareColumnValue(CompareOperator.Type compType, ColumnValue columnValue, LiteralValue literalValue, Schema exprSchema, java.util.ArrayList<ColumnStats> stats)
This helper function computes a selectivity estimate for a comparison between a column and a literal value.static float
SelectivityEstimator. estimateCompareSelectivity(CompareOperator comp, Schema exprSchema, java.util.ArrayList<ColumnStats> stats)
This function computes a selectivity estimate for a general comparison operation.static float
SelectivityEstimator. estimateSelectivity(Expression expr, Schema exprSchema, java.util.ArrayList<ColumnStats> stats)
This function computes the selectivity of a selection predicate, using table statistics and other estimates to make an educated guess.void
PrettyTuplePrinter. setSchema(Schema schema)
void
TuplePrinter. setSchema(Schema schema)
void
TupleProcessor. setSchema(Schema schema)
This method is called once by the query evaluator before any tuples are passed to theTupleProcessor.process(edu.caltech.nanodb.relations.Tuple)
method, so that the tuple-processor knows what the expected tuple-schema will be.private static void
StatisticsUpdater. updateCompareStats(CompareOperator comp, Schema schema, java.util.List<ColumnStats> stats)
Try to update the column-statistics based on the passed-in comparison operation.static java.util.ArrayList<ColumnStats>
StatisticsUpdater. updateStats(Expression expr, Schema schema, java.util.List<ColumnStats> inputStats)
This static helper takes a selection predicate, a schema the predicate is evaluated against, and input column-statistics, and produces output column-statistics that reflect the input arguments. -
Uses of Schema in edu.caltech.nanodb.relations
Methods in edu.caltech.nanodb.relations that return Schema Modifier and Type Method Description Schema
TableInfo. getSchema()
A helper function to simplify retrieving the table's schema.Methods in edu.caltech.nanodb.relations with parameters of type Schema Modifier and Type Method Description void
Schema. append(Schema s)
Append another schema to this schema.static Tuple
TupleUtils. coerceToSchema(Tuple input, Schema schema)
java.util.Set<java.lang.String>
Schema. getCommonColumnNames(Schema s)
Returns the names of columns that are common between this schema and the specified schema.java.util.Set<java.lang.String>
Schema. getCommonTableNames(Schema s)
This helper method returns the names of all tables that appear in both this schema and the specified schema.private CompareOperator
DatabaseConstraintEnforcer. makeEqualityComparison(Schema schema, int iSchema, Tuple tuple, int iTuple)
private Expression
DatabaseConstraintEnforcer. makeEqualityPredicate(Schema schema, int[] schemaIndexes, Tuple tuple, int[] tupleIndexes)
Constructors in edu.caltech.nanodb.relations with parameters of type Schema Constructor Description Schema(Schema... schemas)
Create a schema that is the concatenation of one or more other schemas. -
Uses of Schema in edu.caltech.nanodb.server
Fields in edu.caltech.nanodb.server declared as Schema Modifier and Type Field Description private Schema
CommandResult. schema
If the command was a SELECT query and the results are to be kept, this will be the schema of the results as computed by the database.Methods in edu.caltech.nanodb.server that return Schema Modifier and Type Method Description Schema
CommandResult. getSchema()
Methods in edu.caltech.nanodb.server with parameters of type Schema Modifier and Type Method Description void
CommandResult.ResultCollector. setSchema(Schema s)
void
TupleSender. setSchema(Schema schema)
-
Uses of Schema in edu.caltech.nanodb.storage
Fields in edu.caltech.nanodb.storage declared as Schema Modifier and Type Field Description private Schema
PageTuple. schema
The schema of the tuple.Methods in edu.caltech.nanodb.storage that return Schema Modifier and Type Method Description Schema
PageTuple. getSchema()
Schema
TupleFile. getSchema()
Returns the schema of tuples stored in this tuple file.Schema
SchemaWriter. readSchema(PageReader pgReader)
This method opens the data file corresponding to the specified table name and reads in the table's schema.Methods in edu.caltech.nanodb.storage with parameters of type Schema Modifier and Type Method Description TableInfo
IndexedTableManager. createTable(java.lang.String tableName, Schema schema, CommandProperties properties)
TableInfo
TableManager. createTable(java.lang.String tableName, Schema schema, CommandProperties properties)
Creates a new table file with the table-name and schema specified in the passed-inTableInfo
object.TupleFile
TupleFileManager. createTupleFile(DBFile dbFile, Schema schema)
Initialize the specifiedDBFile
to be a new empty table with the specified schema.static int
PageTuple. getTupleStorageSize(Schema schema, Tuple tuple)
This helper function takes a tuple (from an arbitrary source) and computes how much space it would require to be stored in a heap table file with the specified schema.protected void
SchemaWriter. readColumnInfos(PageReader pgReader, Schema schema)
protected void
SchemaWriter. readIndexes(PageReader pgReader, Schema schema)
protected void
SchemaWriter. readKeyConstraints(PageReader pgReader, Schema schema)
protected void
SchemaWriter. readNotNullConstraints(PageReader pgReader, Schema schema)
protected void
SchemaWriter. readReferencingTables(PageReader pgReader, Schema schema)
static TableStats
StatsWriter. readTableStats(PageReader pgReader, Schema schema)
Reads the table-statistics from the specified data file.static int
PageTuple. storeTuple(DBPage dbPage, int pageOffset, Schema schema, Tuple tuple)
protected void
SchemaWriter. writeColumnInfos(Schema schema, PageWriter pgWriter)
This helper writes out the column details of the schema.protected void
SchemaWriter. writeIndexes(Schema schema, PageWriter pgWriter)
protected void
SchemaWriter. writeKeyConstraints(Schema schema, PageWriter pgWriter)
protected void
SchemaWriter. writeNotNullConstraints(Schema schema, PageWriter pgWriter)
protected void
SchemaWriter. writeReferencingTables(Schema schema, PageWriter pgWriter)
void
SchemaWriter. writeSchema(Schema schema, PageWriter pgWriter)
static void
StatsWriter. writeTableStats(Schema schema, TableStats stats, PageWriter pgWriter)
Writes the specified table-statistics to a data file.Constructors in edu.caltech.nanodb.storage with parameters of type Schema Constructor Description PageTuple(DBPage dbPage, int pageOffset, Schema schema)
Construct a new tuple object that is backed by the data in the database page. -
Uses of Schema in edu.caltech.nanodb.storage.heapfile
Fields in edu.caltech.nanodb.storage.heapfile declared as Schema Modifier and Type Field Description private Schema
HeapTupleFile. schema
The schema of tuples in this tuple file.Methods in edu.caltech.nanodb.storage.heapfile that return Schema Modifier and Type Method Description Schema
HeapTupleFile. getSchema()
Methods in edu.caltech.nanodb.storage.heapfile with parameters of type Schema Modifier and Type Method Description TupleFile
HeapTupleFileManager. createTupleFile(DBFile dbFile, Schema schema)
static HeapFilePageTuple
HeapFilePageTuple. storeNewTuple(Schema schema, DBPage dbPage, int slot, int pageOffset, Tuple tuple)
Constructors in edu.caltech.nanodb.storage.heapfile with parameters of type Schema Constructor Description HeapFilePageTuple(Schema schema, DBPage dbPage, int slot, int pageOffset)
Construct a new tuple object that is backed by the data in the database page.HeapTupleFile(StorageManager storageManager, HeapTupleFileManager heapFileManager, DBFile dbFile, Schema schema, TableStats stats)
-