BadgerDB
Classes | Typedefs | Enumerations | Functions | Variables
badgerdb Namespace Reference

Classes

class  RIDKeyPair
class  PageKeyPair
struct  IndexMetaInfo
struct  NonLeafNodeInt
struct  NonLeafNodeDouble
struct  NonLeafNodeString
struct  LeafNodeInt
struct  LeafNodeDouble
struct  LeafNodeString
class  BTreeIndex
class  BufDesc
 Class for maintaining information about buffer pool frames. More...
struct  BufStats
 Class to maintain statistics of buffer usage. More...
class  BufMgr
 The central class which manages the buffer pool including frame allocation and deallocation to pages in the file. More...
struct  hashBucket
 Declarations for buffer pool hash table. More...
class  BufHashTbl
 Hash table class to keep track of pages in the buffer pool. More...
struct  RelDesc
 Schema of relation catalog. More...
struct  attrInfo
 Description of an attribute. This structure is produced by the SQL parser and is used in two cases: In the "create relation" command to send to the catalogs the name and type of the parsed attribute, and in the "insert into" command to send to the insert command the value of the attribute (using the attrValue field). More...
class  RelCatalog
 The class implementing the Relation Catalogs. Inherited from the FileScan class. More...
struct  AttrDesc
 Schema of attribute catalog. More...
class  AttrCatalog
 The class implementing the Attribute Catalogs. Inherited from FileScan class. More...
class  AttributeNotFoundException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  BadBufferException
 An exception that is thrown when a buffer is found whose valid is false but other variables in BufDesc are assigned valid values. More...
class  BadIndexInfoException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  BadOpcodesException
 An exception that is thrown when some unexpected error occurs in the hash table. More...
class  BadParamException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  BadScanParamException
 An exception that is thrown when some unexpected error occurs in the hash table. More...
class  BadScanrangeException
 An exception that is thrown when some unexpected error occurs in the hash table. More...
class  BadgerDbException
 Base class for all BadgerDB-specific exceptions. More...
class  BufferExceededException
 An exception that is thrown when buffer capacity is exceeded. More...
class  DirectoryOverflowException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  DuplicateAttributeException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  DuplicateInsertionException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  EndOfFileException
 An exception that is thrown when some unexpected error occurs in the hash table. More...
class  FileExistsException
 An exception that is thrown when a file creation is requested for a filename that already exists. More...
class  FileNotFoundException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  FileOpenException
 An exception that is thrown when a file deletion is requested for a filename that's currently open. More...
class  HashAlreadyPresentException
 An exception that is thrown when a new entry to be inserted in the hash table is already present in it. More...
class  HashNotFoundException
 An exception that is thrown when an entry being looked up in the hash table is not present in it. More...
class  HashTableException
 An exception that is thrown when some unexpected error occurs in the hash table. More...
class  IndexAlreadyExistsException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  IndexNotFoundException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  IndexScanCompletedException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  InsufficientSpaceException
 An exception that is thrown when a record is attempted to be inserted into a page that doesn't have space for it. More...
class  InvalidPageException
 An exception that is thrown when an attempt is made to access an invalid page in a file. More...
class  InvalidRecordException
 An exception that is thrown when a record is requested from a page that has a bad record ID. More...
class  InvalidSlotException
 An exception that is thrown when a slot that doesn't have data is requested from a page. More...
class  NoMoreRecordsException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  NoSuchKeyFoundException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  PageNotPinnedException
 An exception that is thrown when a page which is expected to be pinned in the buffer pool is found to be not pinned. More...
class  PagePinnedException
 An exception that is thrown when a page which is not expected to be pinned in the buffer pool is found to be pinned. More...
class  RecordNotFoundException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  RelationAlreadyExistsException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  RelationNotFoundException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  ScanNotInitializedException
 An exception that is thrown when a file operation is requested for a filename that doesn't exist. More...
class  SlotInUseException
 An exception that is thrown when a record is attempted to be inserted into a slot that is already in use. More...
struct  FileHeader
 Header metadata for files on disk which contain pages. More...
class  File
 Class which represents a file in the filesystem containing database pages. More...
class  PageFile
class  BlobFile
class  FileIterator
 Iterator for iterating over the pages in a file. More...
class  FileScan
struct  iHeaderPage
struct  Bucket
class  Index
 Extendible Hash Implementation. The index has limited capacity, so don't insert entries to the order of millions. String keys are not supported, so index can only be built over INTEGER and DOUBLE attributes. More...
struct  PageHeader
 Header metadata in a page. More...
struct  PageSlot
 Slot metadata that tracks where a record is in the data space. More...
class  Page
 Class which represents a fixed-size database page containing records. More...
class  PageIterator
 Iterator for iterating over the records in a page. More...
class  Operators
 Class for all supported DBMS operations on relations. More...
struct  SORTREC
class  SortedFile
 Interface for sorted PageFile. This class generates multiple sorted runs pageFile records and retrieves records in sorted order. More...
struct  RecordId
 Identifier for a record in a page. More...
class  Updates
 The class encapsulating the insert and delete operators. More...
class  Utilities
 Class for general utility functions. More...

Typedefs

typedef std::uint32_t PageId
 Identifier for a page in a file.
typedef std::uint16_t SlotId
 Identifier for a slot in a page.
typedef std::uint32_t FrameId
 Identifier for a frame in buffer pool.

Enumerations

enum  Datatype { INTEGER = 0, DOUBLE = 1, STRING = 2 }
 Identifier for datattype of attribute. More...
enum  Operator {
  LT, LTE, EQ, GTE,
  GT, NE, NOTSET
}
 Identifier for operator. More...

Functions

static int attrCmp (const void *a1, const void *a2)
template<>
RIDKeyPair< std::string > BTreeIndex::copyRecordToRidKeyPair< std::string > (std::string rec, RecordId rid, const int attrByteOffset)
template<>
std::string BTreeIndex::getHighLowVal< std::string > (bool high)
template<>
void BTreeIndex::copyKey< std::string > (std::string key, Page *nodePagePtr, int index, bool leaf)
template<>
std::string BTreeIndex::extractKey< std::string > (std::string &value, Page *nodePagePtr, int index, bool leaf)
template<class T >
bool operator< (const RIDKeyPair< T > &r1, const RIDKeyPair< T > &r2)
 static_assert (Page::SIZE > sizeof(PageHeader),"Page size must be large enough to hold header and data.")
 static_assert (Page::DATA_SIZE > 0,"Page must have some space to hold data.")
static int reccmp (char *p1, char *p2, int p1Len, int p2Len, Datatype type)
static int intcmp (const void *p1, const void *p2)
static int floatcmp (const void *p1, const void *p2)
static int stringcmp (const void *p1, const void *p2)
void UT_computeWidth (int attrCnt, AttrDesc attrs[], int *&attrWidth)
void UT_printRec (int attrCnt, AttrDesc attrs[], int *attrWidth, const std::string &rec)

Variables

const int STRINGSIZE = 10
const int INTARRAYLEAFSIZE = ( Page::SIZE - sizeof( PageId ) ) / ( sizeof( int ) + sizeof( RecordId ) )
const int DOUBLEARRAYLEAFSIZE = ( Page::SIZE - sizeof( PageId ) ) / ( sizeof( double ) + sizeof( RecordId ) )
const int STRINGARRAYLEAFSIZE = ( Page::SIZE - sizeof( PageId ) ) / ( 10 * sizeof(char) + sizeof( RecordId ) )
const int INTARRAYNONLEAFSIZE = ( Page::SIZE - sizeof( int ) - sizeof( PageId ) ) / ( sizeof( int ) + sizeof( PageId ) )
const int DOUBLEARRAYNONLEAFSIZE = (( Page::SIZE - sizeof( int ) - sizeof( PageId ) ) / ( sizeof( double ) + sizeof( PageId ) ))-1
const int STRINGARRAYNONLEAFSIZE = ( Page::SIZE - sizeof( int ) - sizeof( PageId ) ) / ( 10 * sizeof(char) + sizeof( PageId ) )
const int DIRSIZE = (Page::SIZE - MAXNAMESIZE - 4*sizeof(int) - sizeof(Datatype)) / sizeof(PageId)
const int UNIQUE = 1
const int NONUNIQUE = 0

Detailed Description

Author:
See Contributors.txt for code contributors and overview of BadgerDB.

LICENSE

Copyright (c) 2012 Database Group, Computer Sciences Department, University of Wisconsin-Madison.


Typedef Documentation

typedef std::uint32_t badgerdb::FrameId

Identifier for a frame in buffer pool.

Definition at line 44 of file types.h.

typedef std::uint32_t badgerdb::PageId

Identifier for a page in a file.

Definition at line 34 of file types.h.

typedef std::uint16_t badgerdb::SlotId

Identifier for a slot in a page.

Definition at line 39 of file types.h.


Enumeration Type Documentation

Identifier for datattype of attribute.

Definition at line 15 of file types.h.

{
  INTEGER = 0,
  DOUBLE = 1,
  STRING = 2
};

Identifier for operator.

Definition at line 25 of file types.h.

{ 
  LT, LTE, EQ, GTE, GT, NE, NOTSET
} Operator;
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends