CS186-proj2
2016-11-19 01:15:33 0 举报
Cs186-proj2的tuple的uml
作者其他创作
大纲/内容
Entry(private)
- Dbfile file- String name- String pkey
HeapFileIterator
- TransactionId _tid- int _tableId- int _numpages- BufferPool _bufferPool- int _pageNo-Heappage _page- Iterator _tuples_ boolean _isOpen;
+ open()已经实现+ hasNext()已经实现+ next()已经实现+ rewind()已经实现+ close()已经实现
Field
HeapPageId
- int _tableId- int _pageNumber
+ getTableId()+pageNumber()
JoinPredicate
Predicate.Op opint field1int field2
Operator
- Tuple next- boolean open- int estimatedCardinality
+ open()+ hasNext()+ next()+ fetchNext()+ close()+ open()+ getChildren()+ setChildren+ getTupleDesc()+ getEstimatedCardinality()* setEstimatedCardinality()
Dbfile
TdItem(private)
* Type fieldType* String fieldName
DbFileIterator
Page
Op这是一个枚举类型EQUALSGREATER_THANLESS_THAN_OR_EQGREATER_THAN_OR_EQLIKENOT_EQUALS
BufferPool
+ getPage()+ realsePage()//TODO+ transactionComplete//TODO+ holdsLock:boolean//TODO+ transactionComplete//TODO+ insertTuple()+ deleteTuple()+ flushAllPages()+ discardPage()+ flushPage()+ flushPages()+ evictPage()
Predicate
int fieldOp opField operand
+ getField()+ getOp()+ getOperand()+ filter()
TupleDesc
- List _items
HeapFile
- File file-TupleDesc _td
+ readPage()+ writePage()+numPages()+deleteTuple()
HeapPage
- HeapPageId pid- TupleDesc td;- byte []header;- Tuple []tuples;- int numSlots;- byte []oldData
+ getNumTuples()+ getBeforeImage()+ getHeaderSize()+ setBeforeImage()+ getId():HeapPageId- readNextTuple:Tuple+ getPageData():byte[]+ createEmptyPageData():byte[]+ deleteTuple()//还没写完+ insertTuple()//还没写完+ markDirty() //还没写完+ isDirty():TransactionId//还没写完+ getNumEmptySlots():int //TODO+ isSlotUsed:boolean//TODO-markSlotUsed() //TODO+ iterator():Iterator
DbIterator
Join
JoinPredicate pDbIterator child1DbIterator child2TupleDesc tupleDescTuple tuple1Tuple tuple2
+ getJoinPredicate()+ getJoinField2Name()+ getJoinField1Name()+ getTupleDesc()+ open()+ close()+ rewind()+ fetchNext()+ getChildren()+ setChildren()
Tuple
- TupleDesc _tupleDesc- Field[] fields-RecordId _recordId
IntField
- int value
+ getValue()+ getType()
PageId
StringField
- String value- int maxSize
RecordId
- PageId _pageId- int _tupleNo
getPageId()
TupleIterator
Iterator iTupleDesc tdIterable tuple
+ open()+ hasNext()+ next()+ rewind()+close()
Filter
+ Predicate p+ DbIterator child
+ getPredicate()+ getTupleDesc()+ open()+ close()+ rewind()+fetchNext()
Catalog
收藏
收藏
0 条评论
下一页