Can form entries from a WordPress form go to a database

WordPress supports Custom Post types, because this isn’t just about the form, but about displaying the data and making it searchable by other users – https://codex.wordpress.org/Post_Types

I would recommend you look up http://pods.io/ which would help create these custom post types also build relationships between two post types (or Pods as they call it). Also there is an option for visitors to enter the data using frontend forms.