How can I use a database with IOS swift?

Hi Experts!

I am brand new to IOS dev, and I need some guidance.

My test app should have two sides:


The app will track all teachers and their rate. Teachers will be able to see how many hours they worked and how much they should get paid, etc.. (there's more, but this is a start)

The Admin will approve each student's payment, etc..

I need to know:
           Should I be using db for this?
           Is core data the same thing?
           what is the mechanism for handling an Admin Screen vs User screen. I don't want the teachers to even see an admin option.

Thank  you very much!
LVL 19
MontoyaProcess Improvement MgrAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Should I be using db for this?
This is a very common question.  The answer is, It Depends on the size and extent of use of the data.  My guess in your case is YES.

Is core data the same thing?
Yes and No.  Core Data is an extensive set of functions that you can use to create, save, get and delete data, but Core Data does not actually do the saving and the type of storage can vary.

By way of example when you set up Core Data you can have a SQlite database being used or a simple text file.  Both save the data and you do not have to worry about which one you use as you only talk with Core Date.  You could if you wanted to have a simple text file and save all the data yourself and then read the data again. You could also do this with SQlite, but core data is alot easier and takes alot of the hard coding away.
(Generally if you only have a small amount of data then the text type is ok.  Once you get big then SQlite is suggested.)

what is the mechanism for handling an Admin Screen vs User screen. I don't want the teachers to even see an admin option.
When the app first starts you would need to establish through authorization what kind of person is currently using the app.  If they identify themselves as admin then you would allow the screen to be shown or you would show some button or something so this screen could be called.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.