Linking iOS application to database [closed] - objective-c

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Needed some advice as i am writing my first iOS application,
1. what is the best way(simplest) to link an app to a database and does the database have to be SQLite (the databse will be external ie. linked via the internet)? i have used mySQL before in MAMP,
I have read up on other post and they suggest complicated methods like via JSON etc, please provide a simple way and a book/guide/web site that could teach me your suggested method would be much appreciated too :)

SQLite is one of them.
However if your requirement is to share the database, you can go with mySQL or even Oracle etc.
JSON, xml are the tools that will help you to make a client server application.
Useful link:
http://jainmarket.blogspot.in/2009/05/iphone-sdk-tutorial-reading-data-from.html

SQLite is generally used for a local database (aka, on the device itself) through CoreData. But it seems like you have a remote MySQL database you want to connect to.
You should build some API that your iOS app talks to to get data from a database. Typically this is done over http which generates JSON in whatever server language of your choice (eg - python, ruby, php, etc).
For the iOS side, you'll probably use Apple's builtin features: NSURLConnection and NSJSONSerialization.

Related

Can I access my Oracle DataBase From Home? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I wanted to access my Oracle DataBase at home so that I could work weekends, etc. I talked to my database administrator and all he had to do was add my home IP to his records, and I was allowed access.
The OTN download license allows us to install the full suite of Oracle software, providing it is for the purposes of self-education.
So really it depends on what you mean by "play around with queries from home". If you're doing work you need a database licence; if you're teaching yourself about Oracle you don't.
The bigger issue is data security: the chances are you're not allowed to have the data on a laptop. Follow the news to understand why this is a bad idea. If you want to teach yourself Oracle there are lots of publicly available data sets we can download from the internet.
You can use exp or data pump export(10g onward) utility to unload data and metadata of your schema (user) into an OS file (dump file), bring it home and use imp or data pump import (10g onward) utility to import those unloaded previously data to a new schema.
If the database is small you can also use Oracle SQL Developer to export the scripts for the schema and the Insert statements for the data.
This is also possible in third-party tools such as TOAD.

Objective C Server [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
i was wondering if there is any way i can set up a server in Objective C that sits on a server box.
From what some people have told me the form post action to HTML pages for information or .ASPX Web Services can be slower then an actual server would be.
How could i set up a server program written in objective c that i would send a message to and get a response back.
For example i send the server the string:
Add(2,8);
And i do some string manipulation work on the server to eventually add the two and send back a response of:
10
I know this sounds obscure and the need for this would be unique, but I'm just trying to find a data transfer protocol that responds faster then your everyday HTML Post.
This would help me with games for iPhone that have a much more chatter then slow NSURLConnections would allow.
It sounds like you are mixed up on a lot of things. You don't POST forms to HTML, and ASP.NET web services do run on actual servers.
If I'm understanding you correctly, what you want to avoid is none of that stuff, but rather the overhead with HTTP? For games, it's common to use UDP, or if you need a more reliable connection, TCP.
What language you implement the server part of your game in is irrelevant - it doesn't have to be Objective-C.
Sending strings that the server has to parse is a bit silly if you're going for efficiency - you should define a packet structure instead of parsing text. There are some GameKit examples in Apple's developer library that take that approach, you should review them to see how the packets are constructed.

iPad application with remote database [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How can we implement iPad application that retrieve or store data from remote data source(Mysql). Are there any classes associate to achieve our requirement
If you are retrieving a remote database, then I would recommend creating a wrapper for your DB using a server-side language like PHP to serve the request from your application, just like it serves an AJAX client request.
In your iOS, you have to create a NSURL instance and request your PHP application for data. Now, for returning the data you can use your own format or standards like JSON or XML. There are numerous public JSON/XML parsers available for iOS!
How do you want to handle the delay of using a radio connection? You might want to consider using a json connection and a server application instead

Online Chess by VB.net [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
as the topic header shows my question is about Coding an online chess by VB.net.
I coded the chess game with all rules , now I designed a login form for it, but I don't know how to connect to a Database and send query , to check the User and pass.
I searched about connecting to a DB and I found something. but i didn't found anything about sending query.
I need a code that contains connecting to a DB and sending query for example about checking username and password to DB.
thanks.
Well, the simplest answer is to use what's called ADO.NET. It's basically a set of classes within the .NET Framework which are used to access a database. Depending on the database you use, there may be a built-in driver (MS SQL, Access, etc.) or you may need to use a 3rd party one (MySQL, PostgreSQL, etc.).
Here are a couple of examples. There are many more.
You can also use LINQ to SQL, which internally uses ADO.NET but presents the data access to the developer is a more fluent way. Or take it another step and use Entity Framework. Etc.
Essentially the question itself is very broad. There are a number of ways you can access a database. But these are the places to get started. If/When you run into specific issues with code not working the way you expect, we'll be happy to help.

How do I connect to a sql database through sql developer? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
So, I have a .sql file that I have downloaded and was wondering how I connect to it via sql developer which I have also downloaded. Do I need to create a connection with hostname and port etc? can I just connect to a file manually/directly or something?
Also, can anyone recommend a good database to practice/learn on for a beginner? Should I just download oracle 11g and play around with that?
Thanks.
You cannot connect to a .sql file because it is not a database. Oracle runs as a server in its own right. If you do not already have access to a server then you will need to get one.
Fortunately, Oracle publishes a server you can use free of charge that will help get you into the swing of things. Have a look at Oracle Lite
I think you might find it quite a challenge getting yourself set up with a development environment but if you are patient and determined you can get there. Once you have a server to play with you can start to experiment with Sql, which is the language you use to interrogate the database.
Best of luck.
You'll need the SID as well as the ip address and port number (typically 1521) that tns listener is listening on.
Once you've connected, you'll be able to run your sql file against that database.
And yes, it would be a good idea to have a good understanding of Oracle before wandering off blindly into the world of database access (.sql files, for example)