Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我研究了各种保存数据的方法。我有一个“产品”类,它具有 ID、名称和价格等属性。当新产品添加到应用程序中时,保存这些数据的最佳方法是什么?我应该查看数据库、数组或两者兼而有之,还是其他?
临时:数组,带有模型的字典。
永久:Plist、CoreData-SQLite、服务器(前 Java)-数据库(MySQL、Oracle ...)。
即使是永久的,您也需要模型的数组/字典。
现在选择是你的,你想如何进行。