Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Good DBA please give some technical understanding....
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.
"Barbara Kennedy" <barbken_at_teleport.com> wrote in message
news:D61Q5.10839$au.438196_at_nntp3.onemain.com...
> If you are just looking for it conceptually the manual (available in Html
> format on the CD ) Oracle Concepts manual. If you are asking so you can
get
> at the data directly then don't do it! If you need to get at the data
> directly (by scanning the file directly) write your own dbms; don't use a
> commercial dbms and try to subvert it. You will only cause yourself great
> pain. The manuals don't go into enough details to reverse engineer it.
> Jim
> "Pravesh Godiyal" <namia_at_hotmail.com> wrote in message
> news:Sj0Q5.31459$SF5.549328_at_ozemail.com.au...
> > Is there any one aware or could share the knowledge as how oracle store
the
> > table-reocrds into dbf files.
> > How it access the data in the dbf files.
> >
> > Cheers
> > Namia
> >
> >
>
>
Received on Mon Nov 13 2000 - 22:27:07 CST