Every time I create a derby database there are several schemas including the APP schema and a schema with the same name of the USERNAME. Which schema should i be using, the APP or the USERNAME schema? Why is the APP schema introduced if the USERNAME schema is set as the default schema. Hopefully this is a quick question for a derby pro. :)
Asked
Active
Viewed 5,617 times
1 Answers
2
You can use any schema you want. If you don't explicitly specify a schema, Derby picks a default schema for you. http://db.apache.org/derby/docs/10.8/ref/rrefsqlj32268.html. I'm not sure why you are getting a schema with the same name as your database; are you setting that schema intentionally?

Bryan Pendleton
- 16,128
- 3
- 32
- 56
-
hi brian actually i was mistaken it was the name of the username supplied when i created the db in netbean Services tab. It appears the username schema is also being set as the default schema which i'm not sure if it should be this way... – simgineer Jun 15 '12 at 03:39
-
Yes, your username establishes a default schema if you do not explicitly use the SET SCHEMA statement. – Bryan Pendleton Jun 16 '12 at 14:35