Question: Complete the TODO in below java code: @Override public boolean insert ( Tuple rec ) { / / check primary key if ( schema .

Complete the TODO in below java code: @Override
public boolean insert(Tuple rec){
// check primary key
if (schema.getKey()!=null){
Tuple t = lookup(rec.getKey());
if (t != null){
return false; // duplicate primary key
}
}
// TODO
// find empty space for row
// write the tuple to the file
// set space occupied in the bitmap
for (int i =0; i < indexes.length; i++){
if (indexes[i]!= null){
// TODO in lab14.
}
}
return true;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!