Excel/数据的入库/ 数据的标准化/按照指定的字段压缩/导入数据库(以中汽研的数据为例) -1


摘要说明:


商用车车型库历来都是兵家必争之地,但是目前市面上可以真正可以使用的商用车数据库寥寥可数,本项目结合中汽研的商用车的原始的数据进行处理和入库(按照本项目设计的数据库),来说明excel数据如何自动化处理入库



  数据的样例:




英文的标头数本项目的数据库设计的字段的名称

中文的标头和数据是中汽研交付的数据(轻型客车为例)


本项目的轻型客车的数据库的表的设计:

CREATE TABLE `certificate_qxkc` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `mfgr_name_full` varchar(20) DEFAULT NULL COMMENT '车辆制造企业名称',
  `xbx_seq_id` bigint(25) DEFAULT NULL,
  `vehicle_category` varchar(20) DEFAULT NULL,
  `vehicle_category_certificate` varchar(20) DEFAULT NULL,
  `brand_name` varchar(20) DEFAULT NULL,
  `gb_code` varchar(50) DEFAULT NULL,
  `gb_code_fn` varchar(50) DEFAULT NULL,
  `chassis_acm_model` varchar(50) DEFAULT NULL,
  `engine_type` varchar(50) DEFAULT NULL,
  `fuel_type` varchar(50) DEFAULT NULL,
  `emission_standard` varchar(50) DEFAULT NULL,
  `displacement_ML` int(10) DEFAULT '-1',
  `power_max` varchar(50) DEFAULT NULL,
  `wheelspan_front` int(10) DEFAULT NULL,
  `wheelspan_rear` int(10) DEFAULT NULL,
  `tyre_specification_drive` varchar(50) DEFAULT NULL,
  `spring_number` varchar(20) DEFAULT NULL,
  `wheelbase` int(10) DEFAULT NULL,
  `axle_load` varchar(20) DEFAULT NULL,
  `axle_num` int(5) DEFAULT NULL,
  `vehicle_length` int(20) DEFAULT NULL,
  `vehicle_width` int(20) DEFAULT NULL,
  `vehicle_height` int(20) DEFAULT NULL,
  `container_length` int(20) DEFAULT NULL,
  `container_width` int(20) DEFAULT NULL,
  `container_height` int(20) DEFAULT NULL,
  `weight_total` float(8,2) DEFAULT NULL,
  `weight_rated_load` float(8,2) DEFAULT NULL,
  `weight_curb` float(8,2) DEFAULT NULL,
  `coefficient` float(8,4) DEFAULT NULL,
  `tow_weight` varchar(20) DEFAULT NULL,
  `capacity_rated` varchar(50) DEFAULT NULL,
  `weight_semitrailer` int(10) DEFAULT NULL,
  `passenger_num_max` varchar(20) DEFAULT NULL,
  `speed_max` varchar(20) DEFAULT NULL,
  `ex_factory_time` varchar(20) DEFAULT NULL,
  `remarks` varchar(200) DEFAULT NULL,
  `fuel_consumption` varchar(20) DEFAULT NULL,
  `gb_code_batch_num` varchar(5) DEFAULT NULL,
  `drive_form` varchar(20) DEFAULT NULL,
  `catarc_card_id` bigint(20) DEFAULT NULL,
  `catarc_card_ref_ids` text,
  `CLSBDH` varchar(50) DEFAULT NULL,
  `quantity_section` varchar(50) DEFAULT NULL,
  `cylinder_num` varchar(2) DEFAULT '',
  `e_company` varchar(50) DEFAULT '',
  `vehicle_category_use` varchar(50) DEFAULT '',
  `source_brand` varchar(50) DEFAULT NULL,
  `source_series` varchar(20) DEFAULT NULL,
  `certificate_status` int(2) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `status` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_gc` (`gb_code`) USING BTREE,
  KEY `index_et` (`engine_type`) USING BTREE,
  KEY `index_es` (`emission_standard`) USING BTREE,
  KEY `index_pm` (`power_max`) USING BTREE,
  KEY `index_dm` (`displacement_ML`) USING BTREE,
  KEY `index_vl` (`vehicle_length`) USING BTREE,
  KEY `index_vw` (`vehicle_width`) USING BTREE,
  KEY `index_vh` (`vehicle_height`) USING BTREE,
  KEY `index_cl` (`container_length`) USING BTREE,
  KEY `index_cw` (`container_width`) USING BTREE,
  KEY `index_ch` (`container_height`) USING BTREE,
  KEY `index_wc` (`weight_curb`) USING BTREE,
  KEY `index_eft` (`ex_factory_time`) USING BTREE,
  KEY `index_df` (`drive_form`) USING BTREE,
  KEY `index_gcbn` (`gb_code_batch_num`) USING BTREE,
  KEY `index_ut` (`update_time`) USING BTREE,
  KEY `index_w` (`wheelbase`) USING BTREE,
  KEY `index_cr` (`capacity_rated`) USING BTREE

) ENGINE=InnoDB AUTO_INCREMENT=32768 DEFAULT CHARSET=utf8;












  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值