The database connection method is usually selected based on factors such as security, performance, scalability, and implementation complexity. For details, see Table 1.
Table 1 Connection Methods
Connection Method |
Advantage |
Disadvantage |
Selection Principle |
Non-encrypted |
- This method is easy to implement and does not require additional encryption and decryption operations.
- It features high performance because no encryption or decryption operation is required, which reduces the overhead of data transmission.
|
- It provides low security and data is easily intercepted or tampered with during transmission.
- It is not suitable for sensitive data transmission and may violate privacy protection laws and regulations.
|
It applies only to internal networks or environments that have low security requirements. |
SSL |
- It provides encrypted transmission. Data is protected during transmission, ensuring high security.
- It supports client/server identity authentication, which enhances security.
|
- It is complex in configuration and management, and certificates need to be issued and updated.
- Some performance overhead may be added, especially when it is used for encrypting and decrypting large amounts of data.
|
It applies to environments that require high data transmission security, such as finance and healthcare industries. |
UDS |
- It applies to local communication without passing through the network, featuring a high transmission speed.
- No extra network overhead is required, and it is not vulnerable to network attacks.
|
- It is used only for the communication between processes on the same host but cannot be used for remote connections.
|
It applies to local communication scenarios, for example, data exchange between local services and applications. |
SM-based TLS |
- It supports the ShangMi (SM) cryptographic algorithm, which complies with the legal requirements for encryption algorithms in China.
- It provides as good security as the standard TLS and applies to scenarios that have special requirements on encryption standards.
|
- It may be restricted in other countries because other countries may not support the SM cryptographic algorithm.
- Performance overhead may be added because the SM cryptographic algorithm may be more complex than traditional encryption algorithms.
|
It applies to specific industries in China, such as government and finance, where legal requirements are posed on encryption standards in China. |