In the 'settings' command (i.e. which invokes cmd command) there are 3 namespaces
What are these and why are some features on one rather than another?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
The Android developers pages give the answers to both your questions.
System settings, containing miscellaneous system preferences.
Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications.
Global system settings, containing preferences that always apply identically to all defined users. Applications can read these but are not allowed to write; like the "Secure" settings, these are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values.
Each link also states when the settings were first introduced and provides a list of variables, functions that can be accessed programmatically (not just through adb), if they are deprecated, etc.