Solved

How to get size of web sql database by any static language

Posted on 2014-10-30
4
209 Views
Last Modified: 2014-11-16
Sir, I am using websql database in my website to store all data locally.

I want to get the size of whole websql database (size of all stored stored content) by any static language . eg javascript, jquery, angular js
0
Comment
Question by:BYTECHINDIA
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40412851
Support for that is very limited and they have stopped working on it.  http://en.wikipedia.org/wiki/Web_SQL_Database  This tutorial shows the database size being declared in every page: http://www.tutorialspoint.com/html5/html5_web_sql.htm  The Final Example page works in Safari, Chrome, and Opera but not in Firefox.

I did not see any way to get the size of the database.
0
 

Author Comment

by:BYTECHINDIA
ID: 40413390
Dear Sir,
Thanks for your attention
I searched a lot for same but no output

I am going to do this in the below way, need little guidance from you side

In any browser 1 character=1 byte. So for this first I'll count total no. of characters exists in first table , then from second , an so on and finally add them and can get the total size of content exist in complete web sql database.

Please suggest on the above mentioned method. This might be lengthy but work as good alternative.

Also provide me more simpler way to do this or integrate this.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40414174
That method can get you an approximation of the database size... except that it can not account for the overhead required to organize the data.
0
 

Author Comment

by:BYTECHINDIA
ID: 40418796
Ok Sir , Thanks

I have done this as above mentioned method as there is no other alternative

Thanks for your valuable advice
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question