4

best way to get the data from the database

 3 years ago
source link: https://www.codesd.com/item/best-way-to-get-the-data-from-the-database.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

best way to get the data from the database

advertisements

I was designing the classified app in android which takes the data from the db hosted at run time. I have designed it and it is working fine but it is very slow as application has to fetch the data from the server and which take much time. I want to reduce the time by some way that user get the data immediate and also can get the data offline with out internet.

Can any one suggest me the best way for store the data in the mobile app or any other way? can i create a xml and store it on user mobile?

Please let me know.

thanks in advance. itin


One way is to do this by ContentProvider.

Another way is to use a framework like ORMLite, an Object Relational Mapping.

Related Articles

What is the best way to get related data from their ID in a single query?

I have a table where each row has a few fields that have ID's that relate to some other data from some other tables. Let's say it's called people, and each person has the ID of a city, state and country. So there will be three more tables, cities, st

The best way to get Javascript data from a single 3-row CSV

I have a simple CSV (imported using JQuery's $.ajax from the /data/league.csv on the same site) with three lines in this exact format: "Kimberlin Library","Queen's Building","Innovation Centre","etc etc" 8,2,0,-2 1,

Java EE and Entity: best way to get the results of a DB

I am currently learning Java EE and how to use JPA. I have made a great database, which one of its table got more than 20 fields. I was wondering what is the best way to get the results from the DB. Currently, I am using a @NamedQuery which takes lik

The best way to get the IP address of the machine control Ansible

I am using Ansible and ufw to setup a firewall on my servers. As part of the ufw rules I would like to allow SSH from the Ansible control machine, but not from anywhere else. My question is - what is the best way to get the IP address of the control

In Java, what is the best way to get the last 250 characters of a string?

In Java what's the best way to get the last 250 characters of a string? The string maybe empty, less than and greater than 250 chars. ThanksI don't exactly understand what you what, but this can do it: if(string.length() > 250) { char[] lastCharacter

The best way to get the image data for processing

i want to get data from uiimage to read rgb values. I want to use this data for convolution filters. In the internet i found only one method: // First get the image into your data buffer CGImageRef image = [UIImage CGImage]; NSUInteger width = CGImag

What is the best way to get the I / O from another console program in Perl?

It seems there are 2 ways to get the I/O of another program in Perl, one is surround the program with arguments by `, the other is using open like below, any difference between these 2 and which one is preferred? # 2 options to get the I/O of another

ASP.Net MVC 3 - What is the best way to get the username logged in the repository?

I know that you can get the username of the currently logged in user from within the controller by using User.Identity.Name. However, my solution is split in 4 layers (4 projects): MyProject.Domain for the models MyProject.Data for the repositories M

The best way to get the GPS location of the user in the background in Android

In my android app i want to get user current location every few minute interval and update in to my center server using web service. Currently i am using Fused Location Provide for get user current location, See link now i want to know what is the be

The best way to get the longest sequence of some numbers in a whole number

What would be the most efficient way of getting the longest sequence of even digits in an integer in Python? For example, if I have a number 2456890048, the longest sequence should be 0048. Should the integer be converted to a string to determine the

What is the best way to get the minimum or maximum value of a table of numbers?

Let's say I have an Array of numbers: [2,3,3,4,2,2,5,6,7,2] What is the best way to find the minimum or maximum value in that Array? Right now, to get the maximum, I am looping through the Array, and resetting a variable to the value if it is greater

What is the best way to get the total execution time of the Node.js application?

I've made a Node.js app that makes exactly the same thing that another solution in C#. The both app get all the javascript files from a directory recursively and execute uglify-js command to minify the files. My project has about 150 JavaScript files

Best way to get the identity of the inserted row?

What is the best way to get identity of inserted row? I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY but don't understand the pros and cons attached to each. Can someone please explain the differences and when I should be using each?@@I

The best way to get the result of activity in Android API & lt; 16

According to the documentation, it appears the preferred contemporary way to get a result from an activity is by using startActivityForResult. However, it also appears that the minimum API for this call is 16. My app has base API 11. What other metho
HashFlare

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK