读文件数据入库设计

2年前的一个文件入库处理设计方法,记录下。

当时的入库使用的是sqlldr方法,用一个程序去专门生成控制文件,效率不错

 

A Data Store Process
oOriginal data is transmitted from other process constantly
oOne row of the data is such as 20110622~13100~3001~comment~
oThe 3rd field 3001 is a key field, with this  identifier we can know which table should this data row be  stored.
oThe function classifies the data rows by the key field of each row at first

 

 

oTo deal with each group that has been classified from the mass data flow, a buffer in the memory has been set to store it
oWhen the buffer  is full, flush the data into the disk file, which is a temporary file

 

 

 

oWhen the temporary file achieve the appointed size, rename it so that the data store  process can deal with it safely
oAt last, data store process put the data of the files into Oracle database.
oThe data store process can call the sqlldr command that supported by Oracle or call the oci functions to do it.

 

 

 

 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值