As far as I know, there is no relationship between number of ArcGIS Server cores licenses and the Enterprise Geodatabase server cores. So yes, the RDBMS could have 8 or 16 cores to make the geodatabase performant to the needs of your organization.
I always recommend following the RDBMS system requirements / guidance for performance.
I think about a situation that a customer already equipped a database server with 8 cores legally (SQL Server or Oracle). Then he got ArcGIS Server license with 4 cores.
And how about if he got ArcGIS Server Basic ?
As I could understand from Licensing ArcGIS Enterprise Deployments in Virtualized and Cloud Environments (esri.com)
If these components (ArcGIS Enterprise and RDBMS) are installed in separate physical/ virtual machines, then a "4 core" license should be fine.
The Number of cores is for the machine hosting the ArcGIS Enterprise only.
If an 8-core physical machine is virtualized so that there are equivalent to two (2) 4-core virtual machines, a 4-core ArcGIS Enterprise license could be installed on one of the virtual machines, leaving the other 4-core VM for other uses.
If "the number of cores is for the machine hosting the ArcGIS Enterprise only", can you explain why ArcGIS Server Basic is sold by core also, while it mostly used for enterprise geodatabase?
The basic license of ArcGIS Server is about more than just managing Enterprise Geodatabase.
It has the ability to publish (but not edit) feature services for map visualization and query. You also get the geometry service and the ability to publish geodata services.