About
The scope is a (depth|level) of a hierarchical namespace.
As namespace, the scope groups name but at a hierarchical level.
Articles Related
Example
- the global scope of a linux file system is /
- the local scope for a file is the directory where it's located.
Type
Global
The global scope is the root of the namespace.
Example:
- the root directory for a file system
- the root catalog for a database system
Local
The local scope is the namespace attached to a primary element (entity or relationship)
Example:
- a directory for a file
- a table for a column
- a ldap domain for a user
- a object class for field
Uniqueness
In a specific scope, only one primary element with the same primary key can exist.
Example:
- In a file system, in a specific directory, you can't have two file with the same name.
- In a table, you can't have two rows with the same primary key.
Quality
As with each group functionality, the less you have in your scope, the beter.
You should follow the magical number (seven +-2)
The code quality / maintainability will increase, your test will be more isolated