# Scope of Derby properties

A property in Derby can have system-wide scope, database-wide scope, or both.

- system-wide

  System-wide properties apply to an entire system, including all its databases and tables if applicable.

  - Set programmatically

    System-wide properties set programmatically have precedence over database-wide properties and system-wide properties set in the derby.properties file.

  - Set in the derby.properties file

    The derby.properties file is an optional file that can be created to set properties at the system level when the Derby driver is loaded. Derby looks for this file in the directory defined by the derby.system.home property. Any property except derby.system.home can be set by including it in the derby.properties file.

- database-wide

  A database-wide property is stored in a database and is valid for that specific database only.

Note: Database-wide properties are stored in the database and are simpler and safer for deployment. System-wide properties can be more practical during the development process.

For more information about scopes, precedence, and persistence, see "Properties overview" in the Derby Developer's Guide.

Parent topic: Derby property reference
Related concepts
Dynamic and static properties
Derby properties