News for hackers. Stuff that matters.
Re:Why is a registry file called a “hive”? (2003) by assttoasstmgr on Tuesday May 10, 2022 @10:30PM (#31335201)
Because the registry is a database. Why would you put comments in a database?

Regedit is a table editor of that database. So again, would you insert random records into a database as comments?

Now if you're asking "why aren't there comments in .REG files" the answer is there are, prefix it with a semicolon (not well documented):

https://docs.microsoft.com/en-us/previous-versions/windows/e...

Probably wouldn't have been difficult to guess though, since they follow the .INI file syntax (which ironically is now used by SystemD)

Re:Why is a registry file called a “hive”? (2003) by dragonwriter on Tuesday May 10, 2022 @10:38PM (#31335270)
> Because the registry is a database. Why would you put comments in a database?

A database stores whatever data is necessary for the application. If comments for application records are needed, that includes comments.

A self-documenting registry where applications registered user information about keys that they used (whether or not the application populated them) as well as apps populating data for keys, so that navigating to a key in the UI would provide you with the documentation from any app or apps concerned with that key as well as the ability to review and edit the data value would be awesome.

Re:Why is a registry file called a “hive”? (2003) by Pxtl on Tuesday May 10, 2022 @10:37PM (#31335260)
The registry is as much a database as it is a very large config file, and config files, as you've rightly observed, have comments.
Re:Why is a registry file called a “hive”? (2003) by chasil on Tuesday May 10, 2022 @11:52PM (#31335668)
Oracle has user/all/dba_tab_comments and user/all/dba_col_comments.

The only places in my legacy databases where these are populated emerged from the Erwin data modeler. We are lazy in not populating them with new tables.

I wonder if SQLite has something similar.

Re:Why is a registry file called a “hive”? (2003) by Pxtl on Wednesday May 11, 2022 @12:18AM (#31335801)
Ms SQL has extended properties, particularly the ms_description one that is exposed in ssms. But that's comments on database columns and objects, not data points.

Which highlights the difference between the registry and an rdbms. In an rdbms you can absolutely comment the columns and tables, just not the rows and individual data points.

In the registry, the data isn't tabular. Every data point has a corresponding field name. That name absolutely would support a comment in sql.