| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Detailed oracle concepts...!!! ANy DBA can help
For curiosity's sake, I'd like to see the source code (fat chance I know). Therefore, as an exercise in reverse engineering, how would one go about updating a dbf file?
SELECT Scenario
Selects, updates and deletes would first require a file seek function. I
quess you'd have to do a string search first to find the rowid.
UPDATE Scenario
Well I guess you'd open the dbf with file read, write flags set.
Then you'd search thru the file sequentially, probably moving your file
pointer every <block size> until you found your table from the table dir
then row from row dir. Then delete <ROWID> from block, (then maybe) move all
data in block after the deletion up to where the rowid before the deleted
one ends. finally, write your updated row at the end of the last row in the
block.
INSERT Scenario
Say a new row is to be inserted into the table.Is it going to be inserted at
the END of block (which?) assigned for the Table. What will happen if the
Block is consumed and a new block is going to be created. Where the new
block is going to be created and how it will effect the performance when the
blocks are split across separated by different blocks.
DELETE Scenario:
Same as update without the write function at the end.
Received on Mon Nov 13 2000 - 22:27:41 CST
![]() |
![]() |