简体   繁体   English

我应该使用哪个 aws 数据库?

[英]Which aws database should I use?

I have a legacy project that I like to migrate piece by piece.我有一个遗留项目,我喜欢逐个迁移。 Now, the data is tightly connected.现在,数据紧密相连。

For example:例如:

  • Flight information航班信息
  • Crew info船员信息
  • Passengers info乘客信息
  • Airports机场
  • Flights can have many airports too航班也可以有多个机场

I also would like to have the database that is scaleable and flexible in changing structure.我还希望拥有可扩展且可灵活更改结构的数据库。 I'm using AWS.我正在使用 AWS。

I had a look at DynamoDB, it has the flexibility that I'm looking for but when I found it's hard to query a particular single item in 1-to-many for example.我查看了 DynamoDB,它具有我正在寻找的灵活性,但是当我发现很难以一对多的方式查询特定的单个项目时。

I also know how inflexible it is to change structure or schema in RDS.我也知道在 RDS 中更改结构或架构是多么不灵活。

Any suggestions?有什么建议?

The decision is whether to use a NoSQL database or a Relational Database that uses SQL .决定是使用NoSQL数据库还是使用 SQL关系数据库

In situations where you will be querying information across many types of data (eg "How many flights from LAX with more than 100 passengers departed more than 15 minutes late" ), a relational database makes things much easier.在您将查询多种类型数据的信息的情况下(例如“有多少从洛杉矶国际机场起飞的超过 100 名乘客的航班晚点超过 15 分钟” ),关系数据库使事情变得更加容易。

They can be slower, but queries are much easier to write.它们可能更慢,但查询更容易编写。 (For example, the above question could be done in one query.) (例如,上述问题可以在一个查询中完成。)

A NoSQL database is excellent when you need predictable performance (reads per second), but cannot join information across tables.当您需要可预测的性能(每秒读取数)但无法跨表连接信息时,NoSQL 数据库非常出色。

Once you have picked your database type, then you can choose the database engine .选择数据库类型后,您可以选择数据库引擎 Amazon Relational Database Service (RDS) offers: Amazon Relational Database Service (RDS) 提供:

  • MySQL (Open-source, low cost) MySQL(开源,低成本)
  • Aurora (Cloud version of MySQL, much more performant) Aurora(MySQL 的云版本,性能更高)
  • MariaDB玛丽亚数据库
  • Microsoft SQL Server (higher cost) Microsoft SQL Server(成本较高)
  • Oracle (higher cost)甲骨文(成本较高)

If in doubt, go with Aurora since it is more cloud-native and is fully compatible with MySQL.如果有疑问,请使用Aurora,因为它更适合云原生并且与 MySQL 完全兼容。 There is now a serverless version of Aurora that can automatically scale and even turn off when unused to lower costs.现在有一个无服务器版本的 Aurora ,它可以自动扩展,甚至在不使用时关闭以降低成本。

As to flexibility of schemas, all SQL databases basically offer the same flexibility via ALTER TABLE .至于模式的灵活性,所有 SQL 数据库基本上都通过ALTER TABLE提供相同的灵活性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM