Android App with SQL server - android

I have a few questions regarding sql server in android.
Essentially, I am tring to create an app that communicates to a SQL server, runs queries, creates new tables, rows, etc. I have been doing a lot of research recently about getting a connection to a SQL server in android. I've seen the tutorial on using a php file and it seems that isn't quite what I am looking for.
My questions:
Is it possible to create an app like the one I described above?
Do I need to do it using a php file? (like the tutorials)
Is there another way to do what I am looking to do?
Should I create a webservice to do the database portion of it? If so, are there any tutorials out there about that?
I apologize for my noob-y questions. Thanks for your help

You should definitely create a webservice, because otherwise any malicious user who has access to your app (downloads it) could easily trash your DB. But allowing insertion and creation privileges to users seems like a bad idea already.
If your users need a personal db, why don't you use sqlite which is stored locally and has no access delays, and no internet connection requirements? Why do you want a single db that is completely exposed to everyone?

It is not a good idea to communicate directly to SQL server from Android Phones. You might hit so many technical constraints when you keep going with the development. I am not sure about he end result as well. It would be great to go ahead with the service that way you might have lot of controls inside the application and design it efficiently... Just a thoughts :)

Related

What is best way to using Elastic search for searching (Via Server vs Direct Java Client)?

I am new to Elasticsearch. I want to store documents of products details. Now I am using Mongodb as my database and nodejs server. But Mongodb does not have good search functionalities like Elasticsearch.
So I am thinking of shifting to ES. But I have few doubts as stated below please suggest me what should I do. Any suggestion will be appreciated.
Should I use MongoDb as my primary database for storing documents and ES as secondary database just for doing efficient search. Or Should I make ES as my only database for storing documents and searching.
Does using both will be good for future or it will make thing difficult to manage. I have also read that ES in not a good choice for main database as it sometimes loses write operation.
Should I make a server in nodejs to perform ES operations for doing any complex search or GET, PUT using rest api or should I do it directly implement it in java .
(Note I am making a android app so should I use TransportClient and Interact with Elasticsearch directly or I should first send a GET request from android side to my server and my nodejs server will interact with ES and send response to my android app).
Other than search part is ES performs as good as MondoDb in terms of Database.
Thanks in advance.
I am risking an opinionated answer here. However I'll try to help you out:
I am using elasticsearch as a primary data store in cases the data is not that important or just to big to have it duplicated. If you have things like logs you could also keep the original logs files around. By default I would say, use a different database as primary store, that way you can always rebuild elastic if you want to make changes to your search index.
Adding components to your infrastructure makes it more work to manage. So adding MongoDB as well as Elastic does mean more moving parts. However, it also gives you more flexibility. I would not be to much afraid unless what you are searching for is very basic and can be done with MongoDB as well.
I advice to always have an application in front of your search engine. Treat it like a database, you would not expose that to the world.
I would not use a Transport Client in your Android app. That would mean a security risk. You want to make a connection to your backend as mentioned in 3 and let that application connect to your search cluster.
Hope that helps

Linking Database of Android App to World

I'm fairly new to the world of Computer Science, and I have questions that I am not sure where/how to look for an answer for them, otherwise I would have just googled.
So, I made an app in android, and it has a SQLite database. Right now, I am the only one who uses this app, it's not even published...the app is like any other social network website where you post something, and others comment on it. So right now, I'm the only one who posts and comments, and the results are all saved in SQLite database in my phone.
How can I "publish" my database to the world? So other people could access the database too? add comments to it etc. when they have the app installed on their device.
What topics of computer science I need to learn to go with this?
I'm sure there's a simple answer to this, but I don't know where/what to look for.
If there are any links to websites, or similar questions on here that could help please post it here.
You have developed an app with db that is in client side
In order to be accessed from everywhere ... you have to use centralized Data base server like sql-server,oracle or my sql...
you have to link you local db to server db for that you need a API(Application programming interface) it can be developed using various languages such as php,c#,java etc..
I hope this would be helpful enough for you.

I need some advice how to connect external database with my app and web page

Im creating an app in which users could browse from many sale offers with cars.
I would like to potential sellers could acces and enter data from web page, then save it to some external server/database.
My app only downlaods this data(pics, descriptions, etc) and show it in some way.
I am begginig programmer with half year experience in android, but ive never set up my own server, neither use external database in my previous apps.
I would like to ask you what is the best way to achive this goal. I will be greatefull for any adivices or materials which i could start from.
I do not know how you thought your data layer, but depending on you can use a database object-oriented, which in my opinion is great for such applications. visit the https://www.parse.com/docs/android/guide is very easy to use think will like. so of course it will not have the need to use a webservice if you choose to use parse.

Android application interacting with a server

Ok so, I know the question is pretty much google-able and I did google it and found out a few answers ,so I am not asking this question knowing completly nothing.
So, I have an application (Cannot specify much about what it does or is or so...) and I need to get some data from a database.
As far as I know, the Volley is the best way to go ,but I am still looking for more details.
Could anyone tell me which is the best way to go?
NOTE: I am NOT looking for code,I am looking for methods.A name would sufice ,as I can do the digging myself.Eventually links to documentations would be awesome, but again, I can find documentations.I just need to know which is the fastest way and the most optimized.
Based on your comment, it looks like there are two different aspects to your application:
Sending out the HTTP requests from your client- i.e. your android app
Processing and sending the response to these requests on the server side, by setting up a web service
Looks like you have part 1 figured out. Note that, volley is a library, similar to android HTTP library, but optimized for faster networking.
For part 2, unless you're planning to use embedded database like sqlite, you'd need to learn about writing web services to provide database access.
Spring Data JPA is one of the many ways to do it.
I hear Parse is great too, but not free.

Whats the best solution for a database used in conjunction with Maps in Android?

Could someone please point me in the right direction. My project involves a database where users enter their address and other info from my website. This database is then referenced in my android application to show the locations of these addresses in my database.
I have yet to start and just came up with this idea. My question is, what would be the best method to create a database easily modified through my website (mySQL, php, etc), and also easily referenced easily through Android and the Google Maps API? I need some ideas on the languages I will need to use to create this database and website so I can go buy the necessary books to start reading up.
Thanks so much
I believe the best way for you to go with this one is:
a database cache on the device
that means you can use XML if you don't have many complicated requirements from storing the address
or SQLite if you want to be able to query the database and do more fancy things
on the server side
if you only need to get the data from your server on the device, then a simple XML with a unique address per user should do it
if you need to push addresses from your device to the server then a REST system needs to be implemented
So, now you just need to figure out exactly what you need from your system and then start googleing on one of the solutions I gave you! Good luck! :)
Google App Engine would probably work for that. GAE supports Java and Python. Maybe use the Restlet framework (compatible with GAE) to implement a REST architecture.

Categories

Resources