How can I set relation when I input the data into realm?
There was menu for importing on CSV or Excel files only, but for relation
How can I make it if I need to bring it with data joined.
I created a db file using the realm browser and imported a xlsx file, but it did not work. What was wrong? I followed the steps below.
Run the Generate Demo Database menu and created a db file in the realm browser.
Opened the files made saw realmTestClass(), realmtestclass1, realmtestclass2 files. I imported the data I made using the import menu, but it did not work.
The Realm Browser data importing features are still heavily in development.
If you've got any specific use cases where it is consistently crashing, or any feature requests, it would be a big help to file issues over at the Realm Browser GitHub repo. :)
Related
In my Android application, I need to add about 300 customers. As application have database import/export feature available so I decided to do insert customers on computer, instead of mobile.
Here's how I did that:
Install app on mobile
Exported db using export feature
Inserted data using SQLite Editor tool
Saved the DB
Transferred on mobile and imported back
Logically, it should work but it's not working.
Export/Import Feature:
This feature does work as expected, I've tested like this:
Added some dummy data
Exported data on SD card
Delete the App
Re-install (dummy data wasn't available)
Imported data back and it worked
What I noticed:
The exported database zip file contains a file with same name as database but with an additional word e.g DBNAME.db-journal. When I added data in db using SQLite Editor, and save it. The -journal file was removed.
As application doesn't show added data in app, but if we export db from app and open it in editor, then it shows all data.
I've even tried to remove previous -journal file, right before importing but no luck.
I'm trying to create & save a new form using Oracle Form builder however, I get the error FRM-10044: Cannot create file.
The same thing happens when I open and save an existing form (.fmb)
I've check the folder permissions where the form is being save, it has read write access.
I've tried saving it into a differ folder and also tried creating a new folder but it still throws the same error.
I'm able to create and save a word, excel document in the new or existing folders (as mentioned-above) without any issues.
I suspect it could be something to do with the Windows Registry or System Configuration settings because I had recently shutdown/disabled so of the services in the System Configuration (using
msconfig.exe). Unfortunately, I don't remember all the options that were modified.
I've gone through numerous discussion forums, but still no luck.
Any help is appreciated.
Thanks in Advance
I've experienced the same thing. But in my case, i compiled the form on server side. The error appeared because it was remote-controlled by more than 1 person. One of the remote session was possibly locking the file creation. So I logged off the other session and try to use 1 session only when compiling the form. This happens sometimes when we're using an OS with multiuser and multisession capability.
Importing categories as a CSV file is OK in tiki-wiki, But how to import categorized articles to the system. Tiki supports media wiki and word press importing, While my data base has another format.
Is there any module for CSV upload/import?
Is there any flexible migration-like script to import articles?
In case that both of answers are NO, would you please give me a clue to write down the proper code to import articles directly to data base.
I went through understanding database, But I think accessing to database directly should be my last choice!
For custom import jobs, you can use Tiki's profiles. The profiles are a YAML-based format. While it is not the primary use for them, it might be the easiest way to perform what you want to do.
Normally, you need to place the profile in a repository to execute it, but there is a developer option to load content from a textarea. You can simply prepare your YAML definition and paste it in there.
Categorizing elements through the database could be harder than it seems as many tables are involved.
My app involves getting a large json file via the internet, and then parsing it into Core Data.
Thats fine, but how could I get the already filled version of this Core Data database into my app, so it is there when they first launch it. And the user can decide to refresh it later.
There's a reasonable tutorial about pre-loading over at Ray Wenderlich's site.
Generally - create a separate project, parse the JSON file into a core data database. Create your real project, copy the Object model and the database file to this new project.
Now, at app start up, check if the database exists in the document's directory, and if it does not, copy your prefilled one from your app bundle.
Make sure that the Persistent Store Coordinator works with the database in the documents folder and not the one in the app bundle.
Update June 2012
I've got a small example project on GitHub called PromNight which demonstrates using an Xcode Workspace with an iPad project and a OS X project to preload the data for Core Data. This uses an object model that is shared between the the two applications which helps to keep changes in sync when preloading.
Core Data uses a backing store, which is essentially a sqlite database (or, on Mac OS, optionally an XML file). You should simply add that file to your app's bundle and ship it with the app. As far as getting the data into the database, here's what I would do:
Write some code to import the data from whatever format you have it in.
Run that code.
Copy the sqlite file off of the device or from the simulator.
Add the newly created sqlite file to your project in Xcode.
I wouldn't hand-create the sqlite file, since Core Data does some "voodoo" behind the scenes and messing with the sqlite can break things. Also, I've seen developers use multiple targets. for the import. This way, they can write the code in a compiler conditional and then not have to worry as much about project maintenance. For example:
#ifdef kImportTarget
//run core data import
#else
// run the Core Data stack setup from an existing file
#endif
The Core Data database is just a SQLite database file. You can deliver it in your main bundle and then copy it to your documents folder before associating it with your persistent store coordinator.
I am in front of following problem:
I have a CoreData based IPhone app, which I already have prepopulated by adding a sqlite-db to the resources folder and copy it to the documents folder if not already there.
BUT: When I have to update the app and added a new SQLite db and the user already has a populated db in his document folder, how can I import the new data of the entity-tables into the existing db in the users document folder?
I found several threads about how to populate a db when the users-db is not already existing. I also found a lot about migrating, but that only changes the datastructure, but do not import new data from my db which I added to the resources folder.
How can I solve this problem?
Thanks for your help!
Philipp
The framework used to migrate the sqlite schema can also be used to load/migrate data during an app upgrade. I believe you'd need to use NSMigrationManager to manage the migration and to load additional data.