当前位置:网站首页>IOS development - Database - Introduction to basic knowledge (01)
IOS development - Database - Introduction to basic knowledge (01)
2022-04-22 09:45:00 【PGzxc】
One summary
- IOS How to store data in
- SQLite database
- Use Navicat Perform table operations
Two IOS How to store data in
- Plist(NSArray\NSDictionary): Only data and dictionaries can be stored
- Preference( preferences \NSUserDefaults): System comes with , Deposit in Preference One in the directory is named after this application package plist file
- NSCoding(NSKeyedArchiver\NSkeyedUnarchiver): follow NSCoding agreement , Write objects to and parse objects from files
- SQLite3: database , pure C Language , Lightweight
- Core Data: database , be based on SQLite3,OC edition , huge , heavyweight
3、 ... and SQLite database
3.1 SQLite
What is a database
- database (Database) It's organized according to the data structure 、 Warehouse for storing and managing data
- The database can be divided into 2 Types : Relational database and non relational database
What is? SQLite database
- SQLite Is a lightweight embedded database
- It takes up very low resources , In embedded devices , It may take only a few hundred K That's enough memory
- It's faster than Mysql、PostgreSQL These two famous databases are fast
Common relational databases
- PC End :Oracle、MySQL、SQL Server、Access、DB2、Sybase
- The embedded \ Mobile client :SQLite
3.2 How to store data
How does a database store data
The storage structure of the database and excel It's like , By table (table) In units of
The steps of storing data in database
- Create a new table (table)
- Add multiple fields (column, Column , attribute )
- Add multiple lines of records (row,record, Each line holds the values corresponding to multiple fields )
Four Use Navicat Perform table operations
4.1 Software inventory
- Navicat
4.2 establish SQLite file
open Navicat, Click on the top left Connection, Choose... From the drop-down list SQLite

Set up Connection Name, choice Type by New SQLite 3, stay Database File Choose Save SQLite file name

After successful creation SQLite The structure is as follows

4.3 Create a table
stay Tables Right click on the or click on the... On the right + Number , Execute create table

Add table fields (Type Yes 4 An option ),id Set to Auto Increment( The primary key increases automatically )

Click the save button , Set table name

4.4 Add data
Select the table to add data , Click on the bottom + Add data

The view after adding data is as follows

版权声明
本文为[PGzxc]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220923445125.html
边栏推荐
猜你喜欢

内存管理-

Development of esp-01s in Arduino (1)

matplotlib教程04---绘制常用的图形

辐射度量学基本概念

Deep learning remote sensing scene classification data set sorting

source_insight新建工程以及在整个文档中搜索某个变量或者函数的方法

Basic concepts of radiometry

超越iTerm! 号称下一代终端神器,功能贼强大!
![Aardio - [library] webp picture conversion](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
Aardio - [library] webp picture conversion

leapftp:425 failed to establish connection解决方法
随机推荐
深度优先搜索(一):二叉树的中序遍历(力扣)
GS waveform analysis of depth resolved MOS transistor Kia MOS transistor
L2-033 简单计算器 (25 分)
L2-032 rainbow bottle (25 points) (stack)
LC301. 删除无效的括号
L2-033 simple calculator (25 points)
Heap overflow of kernel PWN basic tutorial
辐射度量学基本概念
Tensorflow Experiment 4 -- Boston house price forecast
L3-004 tumor diagnosis (30 points) (3D BFS)
Glide设置圆角图片(支持自定义圆角位置)
Text justify, orientation, combine text attributes
L3-007 ladder map (30 points) (condition DIJ)
The VirtualBox virtual machine uses virtio net to run dpdk + VPP and cannot receive VLAN messages
【Go】程序流程控制
Writing to remember the ~ goal and
杰理之通常影响CPU性能测试结果的因素有:【篇】
source_ Insight is a method to create a new project and search for a variable or function in the whole document
杰理之AI Server【篇】
拜登宣布再向乌克兰提供8亿美元安全援助