Hi, Simon,

On Sat, Mar 12, 2016 at 1:18 PM, Simon Slavin <slavins at bigfraud.org> wrote:
>
> On 12 Mar 2016, at 6:07pm, Igor Korot <ikorot01 at gmail.com> wrote:
>
>> There is a notion of system table vs. user table in the DBMS.
>>
>> The SQLite has at least 1 system table that is well-known: sqlite_master.
>
> There are other tables too: the ones made by ANALYZE which have names which 
> start with 'sqlite_stat' .  And there's 'sqlite_user' which is maintained by 
> the user authentication routines.  Would you call those "system tables" too ?
>
> So I see it as the developers of sqlite reserving table names which start 
> with 'sqlite' for themselves.  You should stay away from those names in case 
> your table clashes with something SQLite does internally.

That's why I wrote "at least".

>
>> My question is: what should I do if I want to create a system table?
>
> What would you want to be special about it because it's a system table ?  How 
> are system tables different from user tables ?

sqlite> select tbl_name from sqlite_master;
leagues
owners
positions
positionsforleague
scorehits
scorepitch
scorehitsforleague
scorepitchforleague
teams
teamsforleague
playerposition
playerscorehits
playerscorepitches
targetshits
targetspitches
playerdraft
playerpositioninleague
players
playersinleague
playersinleague
leaguescorehitter
leaguescorepitcher
playerposition
leagues
playerdraft
playerpositioninleague
teams
playerscorehits
playerscorepitches
playerpositioninleague
leaguescorehitter
leaguescorepitcher
players
players
playersinleague
abc?

I don't sqq here neither sqlite_master, nor sqlite_stat.

So is this enough to call the table "sqlite_<smth>" to make it a system table?

Also, generally speaking, system table is the one that is used by DBMS
internally
and is not exposed to the user. It can be viewed only with some
special tool/means.

The best example is sqlite_master: you as a user don't have access to
it, unless you have
some special tool/means or you know its name.

Thank you.

>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to