1 //2 //VIEWCONTROLLER.M3 //01-Attribute list Use4 //5 //Created by Mac on 01/1/3.6 //copyright©2001 Year Mac. All rights reserved.7 //8 9 /**Ten One table: A complete data sheet for recording data A field: An element in a data table or a piece of data that can be understood - data: A specific piece of data stored in a database - the */ - //////////////////////////////////////////////////////////////////////////// - /** - * Persistence of data + * - * Database: Databases + A * Oracle (commonly used in Java), MSSQLSERVER,DB2, MySQL (open source free, for small data volume) at - * Apache: Server Software - - - * Client----Server (Network database access)-------1. To establish a connection 2. Start Operation 3. Get results 4. Close the connection------database - in * * iOS development is generally as follows: - Local Database Access:sqlite-<----->-Client to + * @param 1. Property List - * @return 2. Object Archive the * 3. SQLite database * * 4. CoreData $ */Panax Notoginseng #import "ViewController.h" - the @interfaceViewcontroller () + A @end the + @implementationViewcontroller - $- (void) Viewdidload { $ [Super Viewdidload]; - - the[Self Savevalue:@"1234"Forkey:@"Password"]; - WuyiNSLog (@"==%@", [Self Readvalueforkey:@"Password"]); the -NSLog (@"===%@", Nshomedirectory ()); Wu } - About- (void) Savevalue: (ID) Password Forkey: (NSString *) Username { $ - //The system's configuration local persistence class is used to store some simple user configurations -Nsuserdefaults *user =[Nsuserdefaults standarduserdefaults]; - //nsuserdefaults *userdefaults = [[Nsuserdefaults alloc] init]; A + [user Setobject:password forkey:username]; the } - $-(Instancetype) Readvalueforkey: (NSString *) Username { the theNsuserdefaults *user =[Nsuserdefaults standarduserdefaults]; the the return[user Objectforkey:username]; - } in the @end
01-Attribute list using-sqlite