如何 read/interpret json 文件定义 mysql 架构
how to read/interpret json file to define mysql schema
我的任务是将 json 文件映射到 mysql 数据库,我正在尝试定义适当的模式 json 文件的示例在
"configurationItems":[
{
"ARN":"",
"availabilityZone":"",
"awsAccountId":"hidden from sight ",
"awsRegion":"",
"configuration":{
"amiLaunchIndex":,
"architecture":"",
"blockDeviceMappings":[
{
"deviceName":"",
"ebs":{
"attachTime":"",
"deleteOnTermination":true,
"status":"attached",
"volumeId":""
}
}
],
"clientToken":"",
"ebsOptimized":,
"hypervisor":"",
"imageId":"",
"instanceId":"",
"instanceType":"",
"kernelId":"aki-",
"keyName":"",
"launchTime":"",
"monitoring":{
"state":""
},
"networkInterfaces":[
{ etc
我认为这样做是否正确,基本上只要有括号/子元素,就会有一个新的 table 例如;向下到 aws 区域的配置项将在 table 中,然后通过体系结构进行配置,然后是块设备映射等,如果是这种情况,那么通过 lanch time 的客户端令牌属于哪里?非常感谢大家
这当然是一种使用方式。
它为设置提供了更多的父子关系方法。
例如
"blockDeviceMappings":[
{
"deviceName":"/dev/sda1",
"ebs":{
"attachTime":"2014-01-06T10:37:40.000Z",
"deleteOnTermination":是的,
"status":"attached",
"volumeId":""
}
}
]
可能会有多个设备,所以它是一对多的关系。
我的任务是将 json 文件映射到 mysql 数据库,我正在尝试定义适当的模式 json 文件的示例在
"configurationItems":[
{
"ARN":"",
"availabilityZone":"",
"awsAccountId":"hidden from sight ",
"awsRegion":"",
"configuration":{
"amiLaunchIndex":,
"architecture":"",
"blockDeviceMappings":[
{
"deviceName":"",
"ebs":{
"attachTime":"",
"deleteOnTermination":true,
"status":"attached",
"volumeId":""
}
}
],
"clientToken":"",
"ebsOptimized":,
"hypervisor":"",
"imageId":"",
"instanceId":"",
"instanceType":"",
"kernelId":"aki-",
"keyName":"",
"launchTime":"",
"monitoring":{
"state":""
},
"networkInterfaces":[
{ etc
我认为这样做是否正确,基本上只要有括号/子元素,就会有一个新的 table 例如;向下到 aws 区域的配置项将在 table 中,然后通过体系结构进行配置,然后是块设备映射等,如果是这种情况,那么通过 lanch time 的客户端令牌属于哪里?非常感谢大家
这当然是一种使用方式。
它为设置提供了更多的父子关系方法。
例如
"blockDeviceMappings":[
{
"deviceName":"/dev/sda1",
"ebs":{
"attachTime":"2014-01-06T10:37:40.000Z",
"deleteOnTermination":是的,
"status":"attached",
"volumeId":""
}
}
]
可能会有多个设备,所以它是一对多的关系。