#SZ4 Why do I need to drop "sqlite_sequence" from .tables display?

Task #3 requires to print names of all tables in a database. From the previous task we know that the number of tables in sample.db is 3.

I do as the task says and extract 3 records (cells) with 3 names: “apples”, “sqlite_sequence”, “oranges”.

However, the task requires that I only display 2 of them: “apples” and “oranges”. Okay, I dropped the second one, but why is that? I can’t find in the instructions, what are the criteria for needing to discard this field?

Hey @sleep-paralysis-daemon, the sqlite_sequence table is a special system table, not one of the user-defined tables.

You’ll see the same behavior in official SQLite too:

Yeah I’ve figured it’s something related to inner workings of sqlite. I just wonder if there supposed to be a “proper” way to know to throw it out? Or is it that task creators just forgot to include it.?

Looks like the official SQLite filters out any tables whose names start with sqlite_.

Thanks, that explains it. Wish this was explained in the task.

@sleep-paralysis-daemon I’ll check with the team on how we can explain it more clearly.

Right now, the instructions are already quite packed, and the test.db we use doesn’t include sqlite_sequence.

Maybe this stage should be split up. Parsing VarInt feels like a stage onto itself. This stage marked as “hard”, but I don’t think it’s necessarily super hard, just long and requires to wrap your head around a lot of stuff .

1 Like

Good point! :+1:

We’ll revisit this stage once stage-splitting is possible (something we don’t currently support).

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.