Any suggestions on how to achieve that?
Unfortunately WordPress is designed in such a way that unique IDs are created for each post, regardless of post type. There's not a good way to overcome this feature of WordPress that I'm aware of. The core functionality of the WordPress system is built around unique IDs for each post, regardless of post type. You're going to have to do some extra work to accomplish what you want, and it will require custom code. The only way I can think of is to apply a custom post field to all post types that stores an "ID" number, separate from the actual WordPress post ID. How you populate that "ID" number for each post is the problem. It seems like the ideal way would be programmatic. When a new post is created, the system queries all the other posts in that post type for their "ID" number, and returns the highest one. Then it increments that number and assigns that number to the new post as "ID" number, automatically. Then you can filter Views by that custom field to retrieve information about a specific post.
If all posts are created by CRED, then you can use a cred_save_data hook to perform these processes:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
If posts are created in wp-admin as well, then you probably need to look into the WordPress save_post() API: https://codex.wordpress.org/Plugin_API/Action_Reference/save_posthttps://codex.wordpress.org/Plugin_API/Action_Reference/save_post
ID separation would make the database management easier in the future in case I would like to export it to separate SQL databases in the future for use with external clients.
WordPress stores all posts in the same wp_posts table in the database, regardless of post type. It stores a Post Type identifier along with each post (in the same row in the wp_posts table, no joins are necessary), so you would be able to filter the query and retrieve WordPress IDs by post type very easily.
Meanwhile, I'd also like to be able to refer to the ID field of database entries in separate posts in order to extract information about them...For that purpose the separate IDs are also crucial
Well then I would think that unique IDs across all posts would be preferable here. Otherwise, you need two filters instead of just one to query each "linked" post. You need to know the type of post as well as the "ID" number. If the IDs are unique across all posts, then you only need one filter.
Other well known databases in the field such as anidb.net , vndb.net and myanimelist.net all separate their entries IDs by category, so I thought I'd do the same. Hope that makes sense.
Okay sure, I can understand the desire to be similar to the rest of the ecosystem. Just want to be sure you're aware of the limitations I've mentioned here and the extra work that will need to be undertaken to pull this off.
It looks like you marked this ticket resolved, so I will reopen it. We can continue discussion if you'd like, or you can mark the ticket as resolved if you have the information you need.