| Based on mature database technology and in view of the features of embedded devices,embedded database realizes the data's storage,organization and management on mobile devices and embedded devices.Taking database as a middleware of embedded system to process data can reduce the cost and shorten the cycle of development.In this way,developers can put more energy on the logic processing of services rather than spending more money and energy on data processing,which is also frugal to the society's resources.Carrying out explorations and researches on the data management in embedded systemand based on traditional database and actual needs,this paper puts forward a Flat-File database(FFDB) in the system ofμC/OS-Ⅱ,which contributes to the establishment,utilization and maintaining of information in the Total Station System.The content is as follows:(1) Based on researching traditional embedded database technology,condidering the limited resources,the shortcoming of direct using file system,and increasing software developing efficiency,this paper proposes the principle of designing a database.(2) Set up the overall framework of Flat-File database,including the establishment of primary function of FFDB,the building of software and hardware environment, architecture,organizational forms,and running process design of FFDB based on message queue communication mechanism ofμC/OS-Ⅱ.(3) Introduce the detailed design process of system,including the definitions of core some data structures and important macro,operation of table and record level. Maintenance service of FFDB guarantees security and integrity of database,and perform a defra in the database,to deal with the fragmentations formed due to frequent operation of database.(4) The actual application of FFDB in the total station system,the comparison between FFDB and related embedded database in resource and coding,and analysis the performace of security management policy demonstrate advantages and reliability of FFDB,which increases software developing efficiency and has good extensibility. |