Publishing a Filemaker database on the web - database

I have a "large" database in filemaker on mac.
How can I export my database to my website (which currently uses in PHP and MySql)?

You could take a look at the PHP Site Assistant, which is a part of FileMaker server. This will generate a PHP website based on your database, and the selections you make in the site assistant — even if you don't use the resulting site, it is a good way to get an example of how to access the data in your database.

For web publishing in Filemaker, check out your options here.
You will probably need to upgrade to Filemaker Server.

A free service is Formgram.
Formgram converts FileMaker Pro to mobile webpages and opens up many new features that reduce data entry by reusing existing lists such as the 50 states in America, 12 months in the Gregorian calendar year, 7 music notes, 26 letters in the English alphabet, etc.
Check out a demo at https://formgram.parseapp.com/formPage?formObjectId=ejj8YHJIZy

There is a good solution RESTfm, now it is a open source project and you can use it like a web service between you website or any other front-end application and your Filemaker database. It uses FileMaker php Api and XML, convert it to JSON so it's very easy to fetch any data from your database.
Right now i'm using RESTfm php code to get data from my Filemaker database. For example to get all records from database postcodes and table postcodes u use this URI http://demo.restfm.com/RESTfm/postcodes/layout/brief%20postcodes.json?RFMmax=2:
{
"data": [
{
"Pcode": "7300",
"Locality": "DEVON HILLS",
"State": "TAS",
"Comments": ""
},
{
"Pcode": "7300",
"Locality": "PERTH",
"State": "TAS",
"Comments": ""
},
{
"Pcode": "7300",
"Locality": "POWRANNA",
"State": "TAS",
"Comments": ""
}
]
}
If you don't use this Filemaker database anymore, you can just write php script to fetch data from that, then save it in your MySQL database. I made in same way, got data in JSON format and saved it in to CoreData on my application.
Also u can export data into csv and just add it to MySQL database. I think it's a best approach for you.

Related

How to have sample dataset on AWS ElasticSearch or other service provider for SearchKitManager()?

I am trying to use SearchKit and I want to know how to set up an ElasticSearch instance indexed with sample movie dataset.
Tried using:
AWS ElasticSearch Service. But don't have an actual dataset to upload through bulk API. The one that I have doesn't have indexing.
Sample data:
[
{
"movie_title":"Avatar ",
"director_name":"James Cameron",
"actor_1_name":"CCH Pounder",
"actor_2_name":"Joel David Moore",
"genres":"Action|Adventure|Fantasy|Sci-Fi",
"language":"English",
"country":"USA",
"content_rating":"PG-13",
"budget":"237000000",
"title_year":"2009",
"plot_keywords":"avatar|future|marine|native|paraplegic",
"movie_imdb_link":"http://www.imdb.com/title/tt0499549/?ref_=fn_tt_tt_1"
},
...
]
Tried using appbase.io ready made movie-dataset. But I am not sure how to connect it with SearchKitManager().
Would really appreciate any help.
you may want to try ReactiveSearch - it's an alternative to SearchKit from appbase.io (I work there) that's actively maintained. It supports direct use of appbase.io apps.
Re: SearchKitManager(), I am not sure if that may work as we don't support cluster level routes.

Importing .bacpac to SQL Azure via Azure Resource Manager from public blob

I created a .bacpac from the original SQL Azure DB I want to import to a new database during my deployment process. To do this, I want to have a github page with the usual Deploy to Azure button, that in as close to one click performs the deployment task, and sets up my entire application.
To do this, however, I need to set up some initial data on the database. After consulting the internet, I saw the post Using Azure Resource Manager to Copy Azure SQL Databases, which had a similar issue.
Right now, I have a MSDeploy extension running in the ARM template that deploys a website from a public azure blob. I'd ideally like to do this with the database too, but the command seems to require storageKeyType and storageKey parameters to be filled.
Is there any way to go around this limitation? Should I just give up and have my application perform the initial setup of the database? Sharing the storage key in a public github template does not seem like a very good plan!
Here's a code snippet:
"resources": [
{
"name": "Import",
"type": "extensions",
"apiVersion": "2014-04-01-preview",
"dependsOn": [
"[variables('sqlsrvmymisName')]",
"[variables('sqldbmymisName')]"
],
"properties": {
"storageUri": "https://publicblob.blob.core.windows.net/artifacts/publicblob.bacpac",
"administratorLogin": "MasterAccount",
"administratorLoginPassword": "P#ssw0rd",
"operationMode": "Import",
"storageKeyType": "Primary",
"storageKey": ""
}
}
]
If you really want it to be public, try this:
"storageKeyType": "SharedAccessKey",
"storageKey": "?",

Storage in a phonegap app

I am building an application that uses Phonegap. This is an application for learning Hiragana and Katakana (Japanese scripts).
So far it only displays a set of static data, but I want to have the user to be able to modify the data.
At the moment the static data is contained in JSON. There are 46 characters in total:
[
{
"id": 0,
"name": "a",
"hiragana": "あ",
"katakana": "ア",
"row": "a"
}
]
I want the user to be able to set a confidence level:
[
{
"id": 0,
"confidencelevel": 4
}
]
I am currently using localStorage to store some user preferences but this is just a key/value pair.
I am looking for some advice on:
Should I split the data: user data/static app data and use the id as the reference point between the two JSON files?
Data storage: how to store the data in a sensible format that I can easily retrieve?
Note that for a first implementation I would like the app to work offline.
Ideally the data is persistent and survives OS upgrades etc.
You could use WebSQL to create a database to store this information. The only downside is you are limited to 5mb. It should survive the user updating, but like localstorage may not survive if the user clears his/her cache. (At least this used to be a problem. I have not checked the newer versions of phonegap to see if it is still an issue.)
You might also consider making a plugin to use the SQLite database on your target platform. Move all of your db logic to the plugin, and manipulate and retrieve your data as an object.
EDITED: Actually I just found a plugin that already adds SQLite storage to a Cordova/Phonegap app.

using elastic-search as database in django

I want to use elastic-search as database in my project which I build on django framework. As I learn, elastic search is used with together a database through haystack where elastic-search is used for only indexing and fast retrieval issues. Here it is explained how to integrate a database and elastic-search with haystack However, I would like to use elastic-search without a database, in other words I will index all data. I did not see anything like below that you can use elastic-search as database backend in django settings module.
# settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': '/path/to/my.cnf',
},
}
}
Is not it possible to use only elastic-search with model layer of django?
Here is the django-elasticsearch backend and in the examples section it does in the way I would like to do but I do not know whether it is storing first in a database and indexing on elastic-search or just store and indexing on elastic-search.
I think the short answer to your question is "no." I looked into this a while ago, and found that there was a project to create an elasticsearch database engine (https://github.com/aparo/django-elasticsearch), but with a last commit in 2011, I would not think that it is viable with post 1.0 versions of ES, and possibly 1.6.x versions of Django.

HTML5 database storage (SQL lite) - few questions

Hy there,
I can't find enough beginner resources on the web about HTML5 database storage usage examples (CRUD)
I'm opening(creating) my DB like this:
var db;
$(document).ready(function()
{
try
{
if (!window.openDatabase) {
alert('Not Supported -> Please try with a WebKit Browser');
} else {
var shortName = 'mydatab';
var version = '1.0';
var displayName = 'User Settings Database';
var maxSize = 3072*1024; // = 3MB in bytes 65536
db = openDatabase(shortName, version, displayName, maxSize);
}
}
catch(e)
{
if (e == 2) {
alert("Invalid database version.");
} else {
alert("Unknown error "+e+".");
}return;
}
});
QUESTION 1: How many databases can i create and use on one domain?
QUESTION 2. How to delete (drop) a database. -> i have not figured this out yet.
To create sql queries you use transaction:
function nullDataHandler(transaction, results) { }
function createTables(db)
{
db.transaction(function (transaction)
{
//first query causes the transaction to (intentionally) fail if the table exists.
transaction.executeSql('CREATE TABLE people(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL DEFAULT "John Doe", shirt TEXT NOT NULL DEFAULT "Purple");', [], nullDataHandler, errorHandler);
});
}
QUESTION 3: How so is the above transaciton failed if a table exists? Is the nullDataHandler involved to do this? Where on the web is there documentation explaining the executeSql API? Arguments?
thx
The spec you're looking for is Web SQL Database. A quick reading suggests:
There is no limit, although once your databases increase beyond a certain size (5MB seems to be the default), the browser will prompt the user to allow for more space.
There is no way, in the current spec, to delete databases.
The executeSql() function takes an optional error callback argument.
HTML5 Doctor also has a good introduction.
Going forward, though, I'd recommend looking at Indexed DB. Web SQL has essentially been abandoned since there is no standard for SQL / SQLite. Even Microsoft has endorsed Indexed DB. See Consensus emerges for key Web app standard.
CREATE TABLE IF NOT EXISTS table_name
will create a table table_name only if if does not exist.
I found the following WebSQL tutorials helpful for basic CRUD operations, as they contained examples, and explained what the code was doing:
A Simple TODO list using HTML5 WebDatabases
HTML5 Web SQL Database
And the following links for SequelSphere (an HTML5 JavaScript SQL Relational Database Alternative to WebSQL that works in all browsers, storing data in LocalStorage and IndexedDB):
SequelSphere basic Usage instructions
API Documentation
Full Index of Guides and Helper Documentation
Using PersistenceJS there is a persistence.reset API which will wipe the database clean.
PersistenceJS Site
For developing / testing purposes, you can view content and delete webSQL, IndexedDB, cookies, etc by searching for your domain name at this URL in Chrome:
chrome://settings/cookies
There, you can delete all the storage for a domain or just certain local storage entities. Yes, the URL implies just 'cookies', but the interface at this URL includes all types of offline storage.
It would be great I think if the Chrome developer tools interface had the ability to right-click and delete a data storage entity in the Resources tab along with inspecting the content. But for now, all I know of is the settings/cookies URL.
It is supported on iOS safari,chrome and some latest version of opera....it's not yet adopted by IE and Firefox that's it......what more one can ask than local db on browser which has relational db system...so u can query it easily and handle complex data....which is very tougher in key vale based systems..
I remember reading it even supports upto one gb.i am not sure....
Note:
1)I'd like to mention one point there is a IDE called Dashcode which let's u build web apps that looks like iOS native.even there also web SQL is used.
2)actually web SQL is a implementation of SQLite on browsers.
3)SQLite is most prefered in both iOS and android as db for native code..
The drawbacks of SQLite:
The Lack of concurrency support but which is not a problem in browser as it's gonna be used by single user at a time..this is a case also in mobile.
Conclusions:
Web Sql is abandoned by w3 that's a sad thing so we've to explore other options.

Resources