- 1、本文档共34页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
Chapter13File
Structures
Understandthefileaccessmethods.Describethecharacteristicsofasequentialfile.Afterreadingthischapter,thereadershould
beableto:OBJECTIVESDescribethecharacteristicsofanindexedfile.Describethecharacteristicsofahashedfile.Distinguishbetweenatextfileandabinaryfile.
afileisanexternalcollectionofrelateddatatreatedasaunit.filesarestoredinauxiliaryorsecondarystoragedevices(tapeanddisk).
ACCESSMETHODS13.1
whenyoudesignafile,thequestionisnothowyoucanretrievetheinformation(aspecificrecord)fromthefile.sequentiallyorrandomly
sequentialaccess:toaccessafilesequentially(oneafteranother,frombeginningtoend).randomaccess:toaccessonespecificrecordwithouthavingtoretrieveallrecordsbeforeit.theindexedfileandthehashedfile.
Figure13-1Taxonomyoffilestructures
SEQUENTIALFILES13.2
Figure13-2SequentialfilethereisanEOF(endoffile)markerafterthelastrecord.theoperatingsystemhasnoinformationabouttherecordaddresses.
WhileNotEOF{ Readthenextrecord
Processtherecord}Program13.1Processingrecordsinasequentialfilealoopusedtoreadandprocessrecordsonebyone.becauseyouhavetoprocesseachrecord,sequentialaccessismoreefficientandeasierthanrandomaccess.
UpdatingSequentialFilesfourfilesassociatedwithanupdateprogramnewmasterfile:containsthemostcurrentdataoldmasterfile:thefileshouldbeupdateandkeptforreferencetransactionfile:add,deleteandchangethreetransactions.Akeyisneededtoidentifythedatainfile.errorreportfile:containsalistingofallerrorsdiscoveredduringtheupdateprocessandusedforcorrection
Figure13-3Updatingasequentialfile
ProcessAllfilesaresortedonthesamekey.Tocomparethekeyonthetransactionandmasterfiles,followoneofthreeactions:Ifthetransactionfilekeyislessthenthemasterfilekey…Ifequalandifgreaterthan…
Figure1
您可能关注的文档
- 技术与组织四下tao topic.pptx
- 初步设计模块业务流程.pptx
- 八课今天几号上册.pptx
- 数学共享课程讲解简易方程课件.pptx
- 中惠熙元历史投资案例下广告.pptx
- 【重点报告】农行2023年社会责任报告.pptx
- 【重点报告】2024上海原油期货和期权市场发展报告.docx
- 【重点报告】2024休闲游戏行业报告.docx
- 【重点报告】小微电动市场发展研究报告(2023).pptx
- 【重点报告】锂离子电池健康评估与故障诊断报告(2024.3).pptx
- 【重点报告】新康养研究院+-中国各区域康养产业具体发展情况2024.pptx
- 【重点报告】2023年园区基础设施公募REITs市场概况与展望.docx
- 【重点报告】2023年建造成本手册+-+中国内地及香港地区.docx
- 【重点报告】大湾区住宅市场及商业物业投资市场 2023回顾及2024展望.pptx
- 【重点报告】清华大学-大模型工具学习(中英文)-2024.pptx
- 【重点报告】2024年4月全国地表水水质月报.docx
- 【重点报告】创新引领用户“换新生活”——AWE2024趋势报告(精简版).pptx
- 【重点报告】始于住宿但不止于住宿.pptx
- 医院宣传办公室工作制度.docx
- 【重点报告】2024小红书教育营销习题册.docx
文档评论(0)