2

I need to know if I can use Parse for what i need. Let me give you some context. I am new to coding for iOS in Swift. I am creating an app, and a big part of it is displaying info to the user depending on what country they select.

So at the start of the app, they will select a country. I have used Parse a little bit through an online course, so I know how to signup and create users etc.

What i want to know if i can do?

Can i use Parse to create my own database? So have a Class called country_data, and then in that class, have all the countries with info about them. As an example of what i mean, see the table below:

Example of what i need

Then, in the app, i can check that if the user selects 'Spain' for example, I can display all the Info for Spain.

Everything i've done in Parse so far had been about sending info to Parse that Ive created from the code in Xcode. But i need to know if i can go into my app in Parse and create this database myself.

Is this possible and is it the right way to do what i'm looking for. Any suggestions welcome, and thanks! Please ask questions if you need me to explain more.

Nick

3
  • Definitely possible. Commented Sep 21, 2015 at 20:32
  • @mvai Thanks for the assurance. Is there any concern that the database i'll need to create will be too big and run too slow in my app? For example there are 196 countries and then say just 5 items against each country. Thats pretty sizeable, or is it not? Especially the country_city section, as that number could be huge. Commented Sep 21, 2015 at 20:40
  • @JoeBlow Thanks for your explanation below, I am looking at it now in Parse. Do you/can you point me in the direction of anything to read up about Pointing? I've set my database up like how you have suggested but don't really understand what the 'Pointer' is doing? thanks Commented Sep 21, 2015 at 22:16

1 Answer 1

4

Good news OP,

(1) yes Parse is absolutely perfect for this.

Parse is now at http://back4app.com

Here...

enter image description here

It literally took me less time to do that, than it took to answer your question!

It's almost unbelievable to understand how much time "BAAS" services save, in the new "BAAS" era.

(2) 196 countries. You should be OK :) Anything up to a few million countries will work fine. After that Parse will get a little slow on searches.

(3) "But I need to know if i can go into my app in Parse and create this database myself."

Yes, using the internet and a computer,

just go to back4app.com, log in, and click on your project. Click on "Core". (Parse software also offers features like Analytics, etc. For the database system, just click on "Core".)

Notice the button "Add Class", click that and type in "Country". Add a column called "name" which is a "String".

Make another new class "City". Again make a "String" column "name", and also make a column that is a "Pointer" to "Country".

You're completely done.

It is far quicker than me typing it here, heh

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks, So if i wanted to also store the currency and code for each city like i mentioned, do i also create another class called 'currency' and the a new String column called 'currency' and then another column called pointer and point that to country as well? Or can i just create another column in the country class we made first?
no, in that case, very simply make "currency" and "code" columns in your "country" table - enjoy! be sure to "tick" some answer eventually as a new user, so you get points
thanks, I may have some more questions as I'm going along if you don't mind me asking you them on here! Thanks!
Hi Joe, could you provide any help with another one of my questions similar to this one? stackoverflow.com/questions/32853861/… Thanks very much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.