A B C D E F G H I L M N O P R S T U V W _

A

ABORT_RECORD - Static variable in class simpledb.LogFile
 
AbstractDbIterator - Class in simpledb
Helper for implementing DbIterators.
AbstractDbIterator() - Constructor for class simpledb.AbstractDbIterator
 
addTable(DbFile, TupleDesc, String) - Method in class simpledb.Catalog
Add a new table to the catalog.
addTable(DbFile, TupleDesc) - Method in class simpledb.Catalog
Add a new table to the catalog.
addTuple(TransactionId, Tuple) - Method in interface simpledb.DbFile
Adds the specified tuple to the file on behalf of transaction.
addTuple(TransactionId, Tuple) - Method in class simpledb.HeapFile
Adds the specified tuple to the table under the specified TransactionId.
addTuple(Tuple) - Method in class simpledb.HeapPage
Adds the specified tuple to the page.

B

BEGIN_RECORD - Static variable in class simpledb.LogFile
 
BufferPool - Class in simpledb
BufferPool manages the reading and writing of pages into memory from disk.
BufferPool(int) - Constructor for class simpledb.BufferPool
Constructor.
bytesPerPage() - Method in class simpledb.HeapFile
 

C

Catalog - Class in simpledb
The Catalog keeps track of all available tables in the database and their associated schemas.
Catalog() - Constructor for class simpledb.Catalog
Constructor.
CHECKPOINT_RECORD - Static variable in class simpledb.LogFile
 
clear() - Method in class simpledb.Catalog
Delete all tables from the catalog
close() - Method in class simpledb.AbstractDbIterator
If subclasses override this, they should call super.close().
close() - Method in interface simpledb.DbFileIterator
Closes the iterator.
close() - Method in interface simpledb.DbIterator
Closes the iterator.
close() - Method in class simpledb.SeqScan
Closes the sequential scan.
close() - Method in class simpledb.TupleIterator
 
combine(TupleDesc, TupleDesc) - Static method in class simpledb.TupleDesc
Merge two TupleDescs into one, with td1.numFields + td2.numFields fields, with the first td1.numFields coming from td1 and the remaining from td2.
COMMIT_RECORD - Static variable in class simpledb.LogFile
 
compare(Predicate.Op, Field) - Method in interface simpledb.Field
Compare the value of this field object to the passed in value.
compare(Predicate.Op, Field) - Method in class simpledb.IntField
Compare the specified field to the value of this Field.
compare(Predicate.Op, Field) - Method in class simpledb.StringField
Compare the specified field to the value of this Field.
convert(ArrayList<ArrayList<Integer>>, File, int, int) - Static method in class simpledb.HeapFileEncoder
Convert the specified tuple list (with only integer fields) into a binary page file.
convert(File, File, int, int) - Static method in class simpledb.HeapFileEncoder
 
convert(File, File, int, int, Type[]) - Static method in class simpledb.HeapFileEncoder
Convert the specified input text file into a binary page file.
counter - Static variable in class simpledb.TransactionId
 
createEmptyHeapFile(String, int) - Static method in class simpledb.Utility
A utility method to create a new HeapFile with a single empty page, assuming the path does not already exist.
createEmptyPageData(int) - Static method in class simpledb.HeapPage
Static method to generate a byte array corresponding to an empty HeapPage.

D

Database - Class in simpledb
Database is a class that initializes several static variables used by the database system (the catalog, the buffer pool, and the log files, in particular.)
Database() - Constructor for class simpledb.Database
 
DbException - Exception in simpledb
Generic database exception class
DbException(String) - Constructor for exception simpledb.DbException
 
DbFile - Interface in simpledb
The interface for database files on disk .
DbFileIterator - Interface in simpledb
DbFileIterator is the iterator interface that all SimpleDB Dbfile should implement.
DbIterator - Interface in simpledb
DbIterator is the iterator interface that all SimpleDB operators should implement.
Debug - Class in simpledb
Debug is a utility class that wraps println statements and allows more or less command line output to be turned on.
Debug() - Constructor for class simpledb.Debug
 
DEBUG_LEVEL - Static variable in class simpledb.Debug
 
DEFAULT_LEVEL - Static variable in class simpledb.Debug
 
DEFAULT_PAGES - Static variable in class simpledb.BufferPool
 
deleteTuple(TransactionId, Tuple) - Method in class simpledb.BufferPool
Remove the specified tuple from the buffer pool.
deleteTuple(TransactionId, Tuple) - Method in interface simpledb.DbFile
Removes the specifed tuple from the file on behalf of the specified transaction.
deleteTuple(TransactionId, Tuple) - Method in class simpledb.HeapFile
Deletes the specified tuple from the table, under the specified TransactionId.
deleteTuple(Tuple) - Method in class simpledb.HeapPage
Delete the specified tuple from the page.
discardPage(PageId) - Method in class simpledb.BufferPool
Remove the specific page id from the buffer pool.

E

equals(Object) - Method in interface simpledb.Field
 
equals(Object) - Method in class simpledb.HeapPageId
Compares one PageId to another.
equals(Object) - Method in class simpledb.IntField
 
equals(Object) - Method in interface simpledb.PageId
Compares one PageId to another.
equals(Object) - Method in class simpledb.StringField
 
equals(Object) - Method in class simpledb.TransactionId
 
equals(Object) - Method in class simpledb.TupleDesc
Compares the specified object with this TupleDesc for equality.
equals(Type) - Method in class simpledb.Type
 
evictPage() - Method in class simpledb.BufferPool
Discards a page from the buffer pool.

F

Field - Interface in simpledb
Interface for values of fields in tuples in SimpleDB.
filter(Tuple) - Method in class simpledb.Predicate
Compares the field number of t specified in the constructor to the operand field specified in the constructor using the operator specific in the constructor.
flushAllPages() - Method in class simpledb.BufferPool
Flush all dirty pages to disk.
flushPage(PageId) - Method in class simpledb.BufferPool
Flushes a certain page to disk
flushPages(TransactionId) - Method in class simpledb.BufferPool
Write all pages of the specified transaction to disk.
force() - Method in class simpledb.LogFile
 

G

getBeforeImage() - Method in class simpledb.HeapPage
Return a view of this page before it was modified -- used by recovery
getBeforeImage() - Method in interface simpledb.Page
Provide a representation of this page before any modifications were made to it.
getBufferPool() - Static method in class simpledb.Database
Return the static instance of the buffer pool
getCatalog() - Static method in class simpledb.Database
Return the static instance of the catalog
getDbFile(int) - Method in class simpledb.Catalog
Returns the DbFile that can be used to read the contents of the specified table.
getField(int) - Method in class simpledb.Tuple
 
getFieldName(int) - Method in class simpledb.TupleDesc
Gets the (possibly null) field name of the ith field of this TupleDesc.
getFile() - Method in class simpledb.HeapFile
Return a Java File corresponding to the data from this HeapFile on disk.
getHeapTuple(int) - Static method in class simpledb.Utility
 
getHeapTuple(int[]) - Static method in class simpledb.Utility
 
getHeapTuple(int, int) - Static method in class simpledb.Utility
 
getId() - Method in class simpledb.TransactionId
 
getLen() - Method in class simpledb.Type
 
getNumEmptySlots() - Method in class simpledb.HeapPage
Returns the number of empty slots on this page.
getOp(String) - Static method in enum simpledb.Predicate.Op
Interface to access operations by a string containing an integer index for command-line convenience.
getOp(int) - Static method in enum simpledb.Predicate.Op
Interface to access operations by integer value for command-line convenience.
getPage(TransactionId, PageId, Permissions) - Method in class simpledb.BufferPool
Retrieve the specified page with the associated permissions.
getPageData() - Method in class simpledb.HeapPage
Generates a byte array representing the contents of this page.
getPageData() - Method in interface simpledb.Page
Generates a byte array representing the contents of this page.
getRecordID() - Method in class simpledb.Tuple
 
getSize() - Method in class simpledb.TupleDesc
 
getSlot(int) - Method in class simpledb.HeapPage
Returns true if associated slot on this page is filled.
getStrings(int, String) - Static method in class simpledb.Utility
 
getTableId(String) - Method in class simpledb.Catalog
Return the id of the table with a specified name,
getTuple(int[], int) - Static method in class simpledb.Utility
 
getTupleDesc(int) - Method in class simpledb.Catalog
Returns the tuple descriptor (schema) of the specified table
getTupleDesc() - Method in interface simpledb.DbIterator
Returns the TupleDesc associated with this DbIterator.
getTupleDesc() - Method in class simpledb.SeqScan
Implementation of DbIterator.getTupleDesc method.
getTupleDesc() - Method in class simpledb.Tuple
 
getTupleDesc() - Method in class simpledb.TupleIterator
 
getTupleDesc(int, String) - Static method in class simpledb.Utility
 
getTupleDesc(int) - Static method in class simpledb.Utility
 
getType(int) - Method in class simpledb.TupleDesc
Gets the type of the ith field of this TupleDesc.
getTypes(int) - Static method in class simpledb.Utility
 
getValue() - Method in class simpledb.IntField
 
getValue() - Method in class simpledb.StringField
 

H

hashCode() - Method in interface simpledb.Field
Hash code.
hashCode() - Method in class simpledb.HeapPageId
 
hashCode() - Method in class simpledb.IntField
 
hashCode() - Method in interface simpledb.PageId
 
hashCode() - Method in class simpledb.StringField
 
hashCode() - Method in class simpledb.TransactionId
 
hashCode() - Method in class simpledb.TupleDesc
 
hasNext() - Method in class simpledb.AbstractDbIterator
 
hasNext() - Method in interface simpledb.DbFileIterator
 
hasNext() - Method in interface simpledb.DbIterator
 
hasNext() - Method in class simpledb.SeqScan
 
hasNext() - Method in class simpledb.TupleIterator
 
header - Variable in class simpledb.HeapPage
 
HeapFile - Class in simpledb
HeapFile is an implementation of a DbFile that stores a collection of tuples in no particular order.
HeapFile(File) - Constructor for class simpledb.HeapFile
Constructor.
HeapFileEncoder - Class in simpledb
HeapFileEncoder reads a comma delimited text file or accepts an array of tuples and converts it to pages of binary data in the appropriate format for simpledb heap pages Pages are padded out to a specified length, and written consecutive in a data file.
HeapFileEncoder() - Constructor for class simpledb.HeapFileEncoder
 
HeapPage - Class in simpledb
HeapPage stores pages of HeapFiles and implements the Page interface that is used by BufferPool.
HeapPage(HeapPageId, byte[]) - Constructor for class simpledb.HeapPage
Create a HeapPage from a set of bytes of data read from disk.
HeapPageId - Class in simpledb
Unique identifier for HeapPage objects.
HeapPageId(int, int) - Constructor for class simpledb.HeapPageId
Constructor.
holdsLock(TransactionId, PageId) - Method in class simpledb.BufferPool
Return true if the specified transaction has a lock on the specified page

I

i - Variable in class simpledb.TupleIterator
 
id() - Method in interface simpledb.DbFile
 
id() - Method in class simpledb.HeapFile
 
id() - Method in class simpledb.HeapPage
 
id() - Method in interface simpledb.Page
Return the id of this page.
insertTuple(TransactionId, int, Tuple) - Method in class simpledb.BufferPool
Add a tuple to the specified table behalf of transaction tid.
INT_ID - Static variable in class simpledb.Type
 
INT_SIZE - Static variable in class simpledb.HeapFileEncoder
 
INT_SIZE - Static variable in class simpledb.LogFile
 
INT_TYPE - Static variable in class simpledb.Type
Type object representing integers and strings (the only types currently supported by SimpleDB)
IntField - Class in simpledb
Instance of Field that stores a single integer.
IntField(int) - Constructor for class simpledb.IntField
Constructor.
isDirty() - Method in class simpledb.HeapPage
Returns the tid of the transaction that last dirtied this page, or null if the page is not dirty
isDirty() - Method in interface simpledb.Page
Returns true if this page is dirty.
isEnabled(int) - Static method in class simpledb.Debug
 
isEnabled() - Static method in class simpledb.Debug
 
iterator(TransactionId) - Method in interface simpledb.DbFile
 
iterator(TransactionId) - Method in class simpledb.HeapFile
An iterator over all tuples on this file, over all pages.
iterator() - Method in class simpledb.HeapPage
 

L

len - Variable in class simpledb.Type
 
listToString(ArrayList<Integer>) - Static method in class simpledb.Utility
 
log(int, String, Object...) - Static method in class simpledb.Debug
Log message if the log level >= level.
log(String, Object...) - Static method in class simpledb.Debug
Logs message at the default log level.
logAbort(TransactionId) - Method in class simpledb.LogFile
Write an abort record to the log for the specified tid, force the log to disk, and perform a rollback
logCheckpoint() - Method in class simpledb.LogFile
Checkpoint the log and write a checkpoint record.
logCommit(TransactionId) - Method in class simpledb.LogFile
Write a commit record to disk for the specified tid, and force the log to disk.
LogFile - Class in simpledb
LogFile implements the recovery subsystem of SimpleDb.
LogFile(File, boolean) - Constructor for class simpledb.LogFile
Constructor.
logFile - Variable in class simpledb.LogFile
 
logTruncate() - Method in class simpledb.LogFile
Truncate any unneeded portion of the log to reduce its space consumption
logWrite(TransactionId, Page, Page) - Method in class simpledb.LogFile
Write an UPDATE record to disk for the specified tid and page (with provided before and after images.)
logXactionBegin(TransactionId) - Method in class simpledb.LogFile
Write a BEGIN record for the specified transaction
LONG_SIZE - Static variable in class simpledb.LogFile
 

M

markDirty(boolean, TransactionId) - Method in class simpledb.HeapPage
Marks this page as dirty/not dirty and record that transaction that did the dirtying
markDirty(boolean, TransactionId) - Method in interface simpledb.Page
Set the dirty state of this page as dirtied by a particular transaction
maxSize - Variable in class simpledb.StringField
 
myid - Variable in class simpledb.TransactionId
 

N

nameToId(String) - Method in class simpledb.TupleDesc
Find the index of the field with a given name.
next - Variable in class simpledb.AbstractDbIterator
 
next() - Method in class simpledb.AbstractDbIterator
 
next() - Method in interface simpledb.DbFileIterator
Gets the next tuple from the operator (typically implementing by reading from a child operator or an access method).
next() - Method in interface simpledb.DbIterator
Gets the next tuple from the operator (typically implementing by reading from a child operator or an access method).
next() - Method in class simpledb.SeqScan
Implementation of DbIterator.getNext method.
next() - Method in class simpledb.TupleIterator
 
NO_CHECKPOINT_ID - Static variable in class simpledb.LogFile
 
numFields() - Method in class simpledb.TupleDesc
 
numPages() - Method in class simpledb.HeapFile
Returns the number of pages in this HeapFile.
numSlots - Variable in class simpledb.HeapPage
 

O

open() - Method in interface simpledb.DbFileIterator
Opens the iterator.
open() - Method in interface simpledb.DbIterator
Opens the iterator.
open() - Method in class simpledb.SeqScan
Opens this sequential scan.
open() - Method in class simpledb.TupleIterator
 
openHeapFile(int, File) - Static method in class simpledb.Utility
Opens a HeapFile and adds it to the catalog.

P

Page - Interface in simpledb
Page is the interface used to represent pages that are resident in the BufferPool.
PAGE_SIZE - Static variable in class simpledb.BufferPool
Bytes per page, excluding header.
PageId - Interface in simpledb
PageId is an interface to a specific page of a specific table.
pageid() - Method in class simpledb.RecordID
 
pageno() - Method in class simpledb.HeapPageId
 
pageno() - Method in interface simpledb.PageId
 
parse(DataInputStream) - Method in class simpledb.Type
 
Permissions - Class in simpledb
Class representing requested permissions to a relation/file.
Permissions(int) - Constructor for class simpledb.Permissions
 
permLevel - Variable in class simpledb.Permissions
 
pid - Variable in class simpledb.HeapPage
 
Predicate - Class in simpledb
Predicate compares tuples to a specified Field value.
Predicate(int, Predicate.Op, Field) - Constructor for class simpledb.Predicate
Constructor.
Predicate.Op - Enum in simpledb
Constants used for return codes in Field.compare
Predicate.Op() - Constructor for enum simpledb.Predicate.Op
 
print() - Method in class simpledb.LogFile
Print out a human readable represenation of the log

R

raf - Variable in class simpledb.LogFile
 
READ_ONLY - Static variable in class simpledb.Permissions
 
READ_WRITE - Static variable in class simpledb.Permissions
 
readNext() - Method in class simpledb.AbstractDbIterator
 
readNextTuple(DataInputStream, int) - Method in class simpledb.HeapPage
Suck up tuples from the source file.
readPage(PageId) - Method in interface simpledb.DbFile
Read the specified page from disk.
readPage(PageId) - Method in class simpledb.HeapFile
Returns a Page from the file.
RecordID - Class in simpledb
A RecordID is a reference to a specific tuple on a specific page of a specific table.
RecordID(PageId, int) - Constructor for class simpledb.RecordID
Constructor.
recover() - Method in class simpledb.LogFile
Recover the database system by ensuring that the updates of committed transactions are installed and that the updates of uncommitted transactions are not installed.
releasePage(TransactionId, PageId) - Method in class simpledb.BufferPool
Releases the lock on a page.
resetBufferPool(int) - Static method in class simpledb.Database
Method used for testing -- create a new instance of the buffer pool and return it
resetLogFile() - Static method in class simpledb.Database
 
rewind() - Method in interface simpledb.DbFileIterator
Resets the iterator to the start.
rewind() - Method in interface simpledb.DbIterator
Resets the iterator to the start.
rewind() - Method in class simpledb.SeqScan
Rewinds the sequential back to the first record.
rewind() - Method in class simpledb.TupleIterator
 
rollback(TransactionId) - Method in class simpledb.LogFile
Rollback the specified transaction, setting the state of any of pages it updated to their pre-updated state.

S

SeqScan - Class in simpledb
SeqScan is an implementation of a sequential scan access method that reads each tuple of a table in no particular order (e.g., as they are laid out on disk).
SeqScan(TransactionId, int, String) - Constructor for class simpledb.SeqScan
Constructor.
serialize(DataOutputStream) - Method in interface simpledb.Field
Write the bytes representing this field to the specified DataOutputStream.
serialize() - Method in class simpledb.HeapPageId
Return a representation of this object as an array of integers, for writing to disk.
serialize(DataOutputStream) - Method in class simpledb.IntField
 
serialize() - Method in interface simpledb.PageId
Return a representation of this page id object as a collection of integers (used for logging) This class MUST have a constructor that accepts n integer parameters, where n is the number of integers returned in the array from serialize.
serialize(DataOutputStream) - Method in class simpledb.StringField
Write this string to dos.
serialVersionUID - Static variable in exception simpledb.DbException
 
serialVersionUID - Static variable in exception simpledb.TransactionAbortedException
 
setField(int, Field) - Method in class simpledb.Tuple
Change the value of the ith field of this tuple.
setRecordID(RecordID) - Method in class simpledb.Tuple
Set the RecordID information for this tuple.
setSlot(int, boolean) - Method in class simpledb.HeapPage
Abstraction to fill a slot on this page.
shutdown() - Method in class simpledb.LogFile
Shutdown the logging system, writing out whatever state is necessary so that start up can happen quickly (without extensive recovery.)
simpledb - package simpledb
 
STRING_ID - Static variable in class simpledb.Type
 
STRING_LEN - Static variable in class simpledb.Type
 
STRING_TYPE - Static variable in class simpledb.Type
 
StringField - Class in simpledb
Instance of Field that stores a single String of a fixed length.
StringField(String, int) - Constructor for class simpledb.StringField
Constructor.

T

tableid() - Method in class simpledb.HeapPageId
 
tableid() - Method in interface simpledb.PageId
 
td - Variable in class simpledb.HeapPage
 
td - Variable in class simpledb.TupleIterator
 
toString() - Method in interface simpledb.Field
 
toString() - Method in class simpledb.IntField
 
toString() - Method in class simpledb.Permissions
 
toString() - Method in class simpledb.Predicate
 
toString() - Method in class simpledb.StringField
 
toString() - Method in class simpledb.Tuple
Returns the contents of this Tuple as a string.
toString() - Method in class simpledb.TupleDesc
Returns a String describing this descriptor.
toString() - Method in class simpledb.Type
 
TransactionAbortedException - Exception in simpledb
Exception that is thrown when a transaction has aborted.
TransactionAbortedException() - Constructor for exception simpledb.TransactionAbortedException
 
transactionComplete(TransactionId) - Method in class simpledb.BufferPool
Release all locks associated with a given transaction.
transactionComplete(TransactionId, boolean) - Method in class simpledb.BufferPool
Commit or abort a given transaction; release all locks associated to the transaction.
TransactionId - Class in simpledb
TransactionId is a class that contains the identifier of a transaction.
TransactionId() - Constructor for class simpledb.TransactionId
 
Tuple - Class in simpledb
Tuple maintains information about the contents of a tuple.
Tuple(TupleDesc) - Constructor for class simpledb.Tuple
Create a new tuple with the specified schema (type).
TupleDesc - Class in simpledb
TupleDesc describes the schema of a tuple.
TupleDesc(Type[], String[]) - Constructor for class simpledb.TupleDesc
Constructor.
TupleDesc(Type[]) - Constructor for class simpledb.TupleDesc
Constructor.
TupleIterator - Class in simpledb
Implements a DbIterator by wrapping an Iterable.
TupleIterator(TupleDesc, Iterable<Tuple>) - Constructor for class simpledb.TupleIterator
Constructs an iterator from the specified Iterable, and the specified descriptor.
tupleno() - Method in class simpledb.RecordID
 
tuples - Variable in class simpledb.HeapPage
 
tuples - Variable in class simpledb.TupleIterator
 
Type - Class in simpledb
Class representing a type in SimpleDB.
Type(int) - Constructor for class simpledb.Type
 
typeId - Variable in class simpledb.Type
 

U

UPDATE_RECORD - Static variable in class simpledb.LogFile
 
Utility - Class in simpledb
Helper methods used for testing and implementing random features.
Utility() - Constructor for class simpledb.Utility
 

V

value - Variable in class simpledb.IntField
 
value - Variable in class simpledb.StringField
 
valueOf(String) - Static method in enum simpledb.Predicate.Op
Returns the enum constant of this type with the specified name.
values() - Static method in enum simpledb.Predicate.Op
Returns an array containing the constants of this enum type, in the order they are declared.

W

writePage(Page) - Method in interface simpledb.DbFile
Push the specified page to disk.
writePage(Page) - Method in class simpledb.HeapFile
Writes the given page to the appropriate location in the file.

_

_bufferpool - Static variable in class simpledb.Database
 
_catalog - Static variable in class simpledb.Database
 

A B C D E F G H I L M N O P R S T U V W _