Hello!
> Suppose you have it. What would you do with it? > What's the use case?
> --> Igor Tandetnik
The COMMENTs can be used to store any information for interchanging
with application and external systems. As example, ORM (object
relational mappers) may need some additional metainfo for all mapped
columns.
My web-apps use metainfo like to:
user
{
username TITLE
login KEY
password PASSWORD
roles LIST:role
note HIDDEN
modified TIMESTAMP
author ID:user
isactive ACTUAL
}
Where
user - table name
username, login,... - table fields
TITLE, KEY, PASSWORD - definition for rules to process tables fields
in web application and in console (import/export utils). The database
schema (including tables, indicies, FTS indicies tables, etc.) is
generated by this metainfo too. So I have the high-level domain
specific data definition language and low-level application file
format as SQLite database. Of course, it's usefull to have auto
generated schema with records versioning for all tables, fast search
for all key/title fields using FTS extension (my patches add snowball
tokenizers support), fast search for lists of identifiers (using FTS
extension too), import/export utilities, JSON routes, etc.
Unfortunately, now we need additional external [plain-text] file with
metainfo or additional table with non-trivial and non-standard mapping
between database objects and own metainfo table records.
> SQLite saves comments in table/view/index/trigger definitions:
>
> sqlite> create table t(x /* :-) */); > sqlite> .schema > CREATE TABLE t(x
/* :-) */);
>
> Regards, > Clemens
Bad idea. The schema definition can't be modified!
--
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users