rs232 - DB9 male or female Connector in Board - Electrical Engineering Stack Exchange
These male and female DB9-MAX232 adapters have exactly the same pcboard layout
Using a DB9 male to female cable to transfer USB signals?
Better DB-9 to RJ-45 solutions?
What is a DB9 connector?
How does a DB9 connector differ from other connectors?
What are the typical applications of DB9 connectors?
Videos
Use Db9 female connector in your board, since PC have DB9 male connector , or if your PC dont have DB9 then you may need to used RS232 to USB converter cable, which has male DB9 port.
The original plan when the D-sub connector family was introduced was that equipment would always have female connectors and cables would always have male connectors. The idea was that pins are easily damaged, and it's usually easier to replace a cable than to replace a connector on a piece of equipment. Designations such as "DCE" (data communications equipment) and "DTE" (data terminal equipment) would indicate whether signals such as TXD and RXD were inputs or outputs on the equipment.
However, when the IBM PC came along, they decided to use D-sub connectors for a number of different purposes, so in order to reduce confusion for users, they used a female connector for the printer port and a male connector for the COM (UART) port.
As a result, it has become common to use a male connector on DTE and a female connector on DCE. If you want to connect your device to a PC, you should put a female connector on it so that you can use a straight-through male-to-female cable to plug it in.
And just to be pedantic, the correct designation is "DE-9". "DB" refers to the larger shell used for the 25-pin connector.