Re: (no subject)
Yannick Heinrich <[email protected]> Thu, 28 Jan 2016 23:34:57 +0100
| Newsgroups | gmane.comp.db.mdb-tools.devel |
|---|---|
| Message-ID | <CACXNKuvO+5a+07RsM5SYN9z+6V_bwYo_7P9CSdv=S9y7JhnBSw@mail.gmail.com> |
--===============0638699313733118499== Content-Type: multipart/alternative; boundary=001a1142505867fd3e052a6c88aa --001a1142505867fd3e052a6c88aa Content-Type: text/plain; charset=UTF-8 This helps me to understand the process :) May be you can give me some more explanations about usage maps. In the HACKING file of the mdv-tools directory, it describes the different pages type in the file. 0x05 is for "Page Usage Bitmaps". But how is the link done with the others pages (data and table definition) ? Inside the descriptions of these pages, the document refers to "usage bit mask". What is the difference between Page Usage Bitmaps and usage bit mask ? There is also two types of Page Usage (0x00 and 0x01). Are those types present after the page usage bitmaps header ? Regards Yannick 2016-01-12 22:23 GMT+01:00 Jakob Egger <[email protected]>: > MSysObjects just tells you the name, type, etc. of the table. You can > ignore it if you just want to read the data. > > If you want to read the records, you need information from the tdef page. > The tdef pages tell you how what fields are in a table, what types they > have, and so on. You need that information to read the data pages. > > What does a data page look like? Well, it has a header that tells you what > table it belongs to (table id = index of the tdef page). Then it is filled > with records, starting from the end. The header stores the offsets of the > records. > > What do records look like? > Each record has all the fixed length fields in the front (use info from > tdef page to parse). All the variable length fields are at the end, > starting from the back. You could actually parse variable length fields > without the info from the tdef page (at least text columns). The NULL map > (which fields are NULL) is also stored at the end of the record. > > How do you find data pages for a specific table? > 1) Look at the page usage bitmap for the table (complicated) > 2) Just loop through all pages in the file and look at the table id (easy, > fast enough for all but the largest databases) > > Hope this helps a little. Reading MDB files is unfortunately not trivial. > > Jakob > > > On 12 Jan 2016, at 13:16, Yannick Heinrich <[email protected]> > wrote: > > Hello again :) > > I'm moving forward with my go library and I have arrived at the point > where I need to read the records from the > data pages. > > From what I understood by reading the source code of libmdb, all the > secrets are contained in the MSysObjects table. > > Is there a good reference or description of the MSysObjects table and > object ? What is the basic approach ? > > > Regards > Yannick Heinrich > > > > 2015-12-14 13:34 GMT+01:00 Yannick Heinrich <[email protected]>: > >> Hello, >> >> I'm currently trying to create a small Go tool that could deal with mdb >> files. >> >> I'm currently reading the HACKING file at >> https://github.com/brianb/mdbtools/blob/master/HACKING to be able to >> decode a Jet4 file for now. >> >> I don't really understand the definition of tdef_pg in the data page >> section. >> >> Is it the index of the page within the whole file ? Is it an offset >> relative to the beginning of the file ? >> >> I fall on this page speaking about tdef_pg on sourceforge : >> http://sourceforge.net/p/mdbtools/mailman/message/3267842/ >> >> I created a small program printing all the headers of the data pages and >> I did not get the offset mentionned in this page. >> Moreover, on this page, a page_id is mentioned but no trace in the >> HACKING file. >> >> Could someone give me more information about the tdef_pg pointer and >> more generally, >> how is a data definition page found from the data page header ? >> >> Yannick >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> mdbtools-dev mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mdbtools-dev >> >> > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________ > mdbtools-dev mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev > > > --001a1142505867fd3e052a6c88aa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">This helps me to understand the process :)=C2=A0<div><br><= /div><div>May be you can give me some more explanations about usage maps.</= div><div><br></div><div>In the HACKING file of the mdv-tools directory, it = describes the different pages type in the file. 0x05 is for "Page Usag= e Bitmaps".</div><div><br></div><div>But how is the link done with the= others pages (data and table definition) ? Inside the descriptions of thes= e pages, the document refers =C2=A0to "usage bit mask".=C2=A0</di= v><div><br></div><div>What is the difference between Page Usage Bitmaps and= usage bit mask ?</div><div><br></div><div>There is also two types of Page = Usage (0x00 and 0x01). Are those types present after the page usage bitmaps= header ?</div><div><br></div><div>Regards</div><div>Yannick</div><div clas= s=3D"gmail_extra"><br><div class=3D"gmail_quote">2016-01-12 22:23 GMT+01:00= Jakob Egger <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" t= arget=3D"_blank">[email protected]</a>></span>:<br><blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex"><div style=3D"word-wrap:break-word">MSysObjects just tells yo= u the name, type, etc. of the table. You can ignore it if you just want to = read the data.=C2=A0<div><div><br></div><div>If you want to read the record= s, you need information from the tdef page. The tdef pages tell you how wha= t fields are in a table, what types they have, and so on. You need that inf= ormation to read the data pages.</div><div><br></div><div>What does a data = page look like? Well, it has a header that tells you what table it belongs = to (table id =3D index of the tdef page). Then it is filled with records, s= tarting from the end. The header stores the offsets of the records.</div><d= iv><br></div><div>What do records look like?</div><div>Each record has all = the fixed length fields in the front (use info from tdef page to parse). Al= l the variable length fields are at the end, starting from the back. You co= uld actually parse variable length fields without the info from the tdef pa= ge (at least text columns). The NULL map (which fields are NULL) is also st= ored at the end of the record.</div><div><br></div><div>How do you find dat= a pages for a specific table?</div><div>1) Look at the page usage bitmap fo= r the table (complicated)</div><div>2) Just loop through all pages in the f= ile and look at the table id (easy, fast enough for all but the largest dat= abases)</div><div><br></div><div>Hope this helps a little. Reading MDB file= s is unfortunately not trivial.</div><div><br></div><div>Jakob</div><div><b= r></div><div><br><div><blockquote type=3D"cite"><div><div><div>On 12 Jan 20= 16, at 13:16, Yannick Heinrich <<a href=3D"mailto:yannick.heinrich@gmail= .com" target=3D"_blank">[email protected]</a>> wrote:</div><br>= </div></div><div><div><div><div dir=3D"ltr">Hello again :)<div><br></div><d= iv>I'm moving forward with my go library and I have arrived at the poin= t where I need to read the records from the=C2=A0</div><div>data pages.</di= v><div><br></div><div>From what I understood by reading the source code of = libmdb, all the secrets are contained in the MSysObjects table.</div><div><= br></div><div>Is there a good reference or description of the MSysObjects t= able and object ? What is the basic approach ?</div><div><br></div><div><br= ></div><div>Regards</div><div>Yannick Heinrich</div><div><br></div><div><br= ></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">2015= -12-14 13:34 GMT+01:00 Yannick Heinrich <span dir=3D"ltr"><<a href=3D"ma= ilto:[email protected]" target=3D"_blank">[email protected]= om</a>></span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0= 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span= style=3D"font-size:12.8px">Hello,</span><div style=3D"font-size:12.8px"><b= r></div><div style=3D"font-size:12.8px">I'm currently trying to create = a small Go tool that could deal with mdb files.</div><div style=3D"font-siz= e:12.8px"><br></div><div style=3D"font-size:12.8px">I'm currently readi= ng the HACKING file at=C2=A0<a href=3D"https://github.com/brianb/mdbtools/b= lob/master/HACKING" target=3D"_blank">https://github.com/brianb/mdbtools/bl= ob/master/HACKING</a>=C2=A0to be able to decode a Jet4 file for now.</div><= div style=3D"font-size:12.8px"><br></div><div style=3D"font-size:12.8px">I = don't really understand the definition of tdef_pg in the data page sect= ion.</div><div style=3D"font-size:12.8px"><br></div><div style=3D"font-size= :12.8px">Is it the index of the page within the whole file ? Is it an offse= t relative to the beginning of the file ?</div><div style=3D"font-size:12.8= px"><br></div><div style=3D"font-size:12.8px">I fall on this page speaking = about tdef_pg on sourceforge :=C2=A0<a href=3D"http://sourceforge.net/p/mdb= tools/mailman/message/3267842/" target=3D"_blank">http://sourceforge.net/p/= mdbtools/mailman/message/3267842/</a></div><div style=3D"font-size:12.8px">= <br></div><div style=3D"font-size:12.8px">I created a small program printin= g all the headers of the data pages and I did not get the offset mentionned= in this page.</div><div style=3D"font-size:12.8px">Moreover, on this page,= a page_id is mentioned but no trace in the HACKING file.</div><div style= =3D"font-size:12.8px"><br></div><div style=3D"font-size:12.8px">Could someo= ne give me more information about the=C2=A0<span style=3D"font-size:12.8px"= >tdef_pg pointer and more generally,=C2=A0</span></div><div style=3D"font-s= ize:12.8px"><span style=3D"font-size:12.8px">how is a data definition page = found from the data page header ?</span></div><span><font color=3D"#888888"= ><div style=3D"font-size:12.8px"><span style=3D"font-size:12.8px"><br></spa= n></div><div style=3D"font-size:12.8px">Yannick</div><div style=3D"font-siz= e:12.8px"><br></div><div style=3D"font-size:12.8px"><span style=3D"font-siz= e:12.8px"><br></span></div><div style=3D"font-size:12.8px"><span style=3D"f= ont-size:12.8px"><br></span></div></font></span></div> <br>-----------------------------------------------------------------------= -------<br> <br>_______________________________________________<br> mdbtools-dev mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">mdb= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/mdbtools-dev" rel= =3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listi= nfo/mdbtools-dev</a><br> <br></blockquote></div><br></div></div></div> ---------------------------------------------------------------------------= ---<br>Site24x7 APM Insight: Get Deep Visibility into Application Performan= ce<br>APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month<br>= Monitor end-to-end web transactions and take corrective actions now<br>Trou= bleshoot faster and improve end-user experience. Signup Now!<br><a href=3D"= http://pubads.g.doubleclick.net/gampad/clk?id=3D267308311&iu=3D/4140___= ____________________________________________" target=3D"_blank">http://puba= ds.g.doubleclick.net/gampad/clk?id=3D267308311&iu=3D/4140______________= _________________________________</a><span><br>mdbtools-dev mailing list<br= ><a href=3D"mailto:[email protected]" target=3D"_blank">md= [email protected]</a><br><a href=3D"https://lists.sourceforg= e.net/lists/listinfo/mdbtools-dev" target=3D"_blank">https://lists.sourcefo= rge.net/lists/listinfo/mdbtools-dev</a><br></span></div></blockquote></div>= <br></div></div></div></blockquote></div><br></div></div> --001a1142505867fd3e052a6c88aa-- --===============0638699313733118499== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 --===============0638699313733118499== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ mdbtools-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mdbtools-dev --===============0638699313733118499==--