The idea is that multiple users using the same database can cleanly
separate their tables, views (stored procs, etc) by prefixing them with
their login, so jack's jack.importantTable is distinct from jill's
jill.importantTable. There are
administrative benefits ('Jack left and we don't like his work; can we kill
everything he did?' Ans: 'Yes, let
drop his schema..', with aliases, jill.importantTable can be made available to
'importantTable', permissions can be hung off schemas). The common notation
would map to databasename.tablename in the current sqlite arrangement.
This doesn't really make a lot of sense for an embedded database.
I could use this. Im trying to use sqlite as a 'fake database'
that i can use in testing suite. For sqlite to be a good 'fake' of
something like Oracle it would help a lot if it had the ability to do stuff
like 'select * from blah.PERSON'. In this case the 'blah' is the schema name.
PERSON is the table name.
Another example: 'select zipcode from blorg.ADDRESS'. blorg is the schema
name, ADDRESS is the
right now it is giving 'no such database as blah' or 'no such database as
blorg'. i try to 'create database blah' but of cousre that doesnt work either.
at the very least, it could accept table names that have a '.' in them. this would fake schemas good enough for me. right now it doesnt seem to allow it.
You can fake this syntax if you split the "schemas" off into seperate
files, then do an ATTACH
DATABASE blorg.db AS blorg; SELECT zipcode FROM blorg.address;