最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
SQLite’s sqlite3 Command is used to create a new SQLite database. You do not need any special permissions to create a data. The basic syntax of the sqlite3 command is as follows: In general, database names should be unique within RDBMS. We can also use .open to create a new database file: The above command creates the database file test.db, which is located in the same directory as the sqlite3 command. The. Open command is also used to open an existing database. If the above command test.db If it exists, it will be opened directly, and if it does not exist, create it. If you want to create a new database < testDB.db >, the SQLITE3 statement looks like this: The above command will create a file in the current directory testDB.db . This file will be used as a database by the SQLite engine. If you have noticed that after the sqlite3 command successfully creates the database file, it provides a sqlite> Prompt. Once the database is created, you can use SQLite’s .databases Command to check if it is in the database list, as follows: You can use SQLite .quit The command exits the sqlite prompt, as follows: You can use SQLite from a command prompt .dump Click the command to export the complete database in a text file, as follows: The above command will convert the entire testDB.db Put the contents of the database into the statement of SQLite and dump it to the ASCII text file testDB.sql Medium. You can recover from the generated testDB.sql in a simple way, as follows: At this time, the database is empty, once there are tables and data in the database, you can try the above two programs. Now, let’s move on to the next chapter. 1.7.1. Grammar ¶
$ sqlite3 DatabaseName.db
sqlite>.open test.db
1.7.2. Example ¶
$ sqlite3 testDB.db SQLite version 3.7.15.2 2013-01-09 11:53:05 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite>
sqlite>.databases seq name file --- --------------- ---------------------- 0 main /home/sqlite/testDB.db
sqlite>.quit $
1.7.3. .dump command ¶
$sqlite3 testDB.db .dump > testDB.sql
$sqlite3 testDB.db < testDB.sql