Richard Hipp, on Thursday, August 15, 2019 09:45 AM, wrote...
>
> On 8/15/19, Jose Isaias Cabrera, on
> > I have no idea
> > what that means, but the question I have is, will that number ever change?
> > Thanks.
>
> Yes. Root page numbers will change, for example when you run VACUUM.
Yep, you're right. I just ran vacuum, and it jumped from 560 to 11.
Interesting.
> An SQLite database consists of a "forest" of b-trees. Each table and
> each index is a separate b-tree. Each b-tree has a root page. All
> other pages of the b-tree are descended from the root page. The
> sqlite_master table identifies the page number of the root of each
> b-tree. The sqlite_master table itself is also a b-tree which is
> always rooted on page 1.
Thanks for this. What I am looking for is an unique ID that I can use to call
that table. Does that exists in the internal of SQLite? I know I can create a
table myself keep track of them myself, but I am trying to see if it exists. ;-)
One last question... Take a look at this command...
sqlite> SELECT * FROM sqlite_master WHERE type='table' AND name='PMOTitles';
type|name|tbl_name|rootpage|sql
table|PMOTitles|PMOTitles|11|CREATE TABLE PMOTitles
(
TitleKey PRIMARY KEY,
Titles
)
What is the difference in the name and tbl_name headers, above? Can I rename
any of those two without damaging the DB? Thanks.
josé
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users