Correct option:
Host the application servers in the public subnet of the VPC and database in the private subnet. The public subnet will connect to the internet using an Internet Gateway configured with the VPC. Database in the private subnet will use Network Address Translation (NAT) gateway, present in the public subnet, to connect to internet
For a multi-tier website, with the application servers in a public subnet and the database servers in a private subnet, you can set up security and routing so that the application servers can communicate with the database servers.
The instances in the public subnet can send outbound traffic directly to the Internet, whereas the instances in the private subnet can't. Instead, the instances in the private subnet can access the Internet by using a network address translation (NAT) gateway that resides in the public subnet. The database servers can connect to the Internet for software updates using the NAT gateway, but the Internet cannot establish connections to the database servers.
Diagramatic representation of the above solution:
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html
Incorrect options:
Host the application servers in the public subnet and database in the private subnet of the VPC. Configure Network Address Translation (NAT) gateway to provide access to the internet for both the subnets. The route table of both the subnets will have an entry to NAT gateway - NAT gateway is needed for instances in the private subnet to connect to the internet. NAT gateway is not used in public subnets, that have access to Internet Gateway.
Host the application servers in the public subnet and database in the private subnet of the VPC. The public subnet will connect to the internet using an Internet Gateway configured with the VPC. Use VPC-peering between the private and public subnets to open internet access for the database in private subnet - A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. It is a communication channel between VPCs, not between subnets of a VPC.
Host the application servers in the public subnet and database in the private subnet of the VPC. The public subnet will connect to the internet using an Internet Gateway configured with the VPC. The private subnet can connect to the internet if they are configured using IPv6 protocol - IPv6, like IPV4 is an internet protocol, used for communication over the internet. IPV6 does not provide internet access, if your instances use IPV6 for communication, you need to configure egress-only Internet gateway to connect to the internet.
Reference:
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html