Question:
Creating a database for an app?
lindy
2012-05-23 01:22:43 UTC
I was just curious to know how to create a database on an app - eg myFitnesspal app, it has a whole database of foods on it, from different companies and you just have to type in what you want and it comes up.

Thanks
Five answers:
2016-12-03 12:53:23 UTC
wager it relies upon on your utility. If the utility is fairly run on the cellular gadget (no concepts superhighway component) then an entire database is overkill for storing the rankings. you will not need an entire database engaged on the cellular client. Now in case you're making a concepts superhighway based utility, then your server could desire to fairly use a database (sq. Server in case you have the excellent license for an concepts superhighway deployment). For the text textile fabrics checklist to song the rankings, relies upon back on how your interest type is setup. in case you're preserving say the perfect 10 rankings, your checklist could desire to truthfully be a comma delimited checklist with 10 strains which you replace. date,call,score date,call,score ... ... date,call,score you will study the values as quickly as you ought to illustrate the magnificent rankings and/or after a interest completes to artwork out if the present interest beats a severe score. If the present score beats one, insert on the excellent section indoors the array preserving the study in values and function a chew of code that only outputs the nice and cozy severe score checklist. besides the undeniable fact that to a text textile fabrics checklist, evaluate an undemanding XML checklist (uncertain if the telephone SDKs tend to contain a parser or not). ** Edit ** @Semper VI - i does not be bowled over if MySQL ran on Android. in all probability not an appropriate setup, yet i'm useful somebody with fairly unfastened time and a few pastime has ported it. ** Edit 2 ** I agree that a database as a result isn't needed. human beings have finished some fairly stunning matters nonetheless, just to instruct it is going to be finished. I did ignore approximately HSQLDB, which in all probability could be greater advantageous perfect if a database replace into truthfully needed. i'm questioning what physique of recommendations Android/iPhone/WinPhone use for storing touch tips. i pay interest to Android syncs up with gmail contacts, yet i'm guessing they cache it community to the telephone besides.
Viran
2012-05-23 01:30:52 UTC
to create a database you need a DMBS - database management system. there are many DBMS's eg: mysql, sql server, access, Oracle etc.

then you can create a database and then connect it in to your application.
Jim
2012-05-23 02:11:47 UTC
CREATE TABLE vendors (

id INT AUTO_INCREMENT NOT NULL,

name VARCHAR(100) NOT NULL DEFAULT '',

addr VARCHAR(100) NOT NULL DEFAULT '',

city VARCHAR(50) NOT NULL DEFAULT '',

stateprovince VARCHAR(100) NOT NULL DEFAULT '',

postalcode VARCHAR(20) NOT NULL DEFAULT '',

phone VARCHAR(40) NOT NULL DEFAULT '',

url LONGTEXT NOT NULL DEFAULT '',

PRIMARY KEY(id)

)



CREATE UNIQUE INDEX v_n ON vendors(name);



this has a built-in relationship (for lack of a better term).

CREATE TABLE foods (

id INT AUTO_INCREMENT NOT NULL,

name TEXT NOT NULL DEFAULT '',

botanicalname TEXT NOT NULL DEFAULT '',

vendor_id INT NOT NULL DEFAULT '0',

servingsize TEXT NOT NULL DEFAULT '',

PRIMARY KEY(id)

)



CREATE TABLE foodpopularnames (

id INT AUTO_INCREMENT NOT NULL,

name TEXT NOT NULL DEFAULT '' COMMENT '',

PRIMARY KEY(id)

)





this is a relationship table.

CREATE TABLE foodpopularnames (

id INT AUTO_INCREMENT NOT NULL,

foodpopularnames_id INT NOT NULL DEFAULT '0',

foods_id INT NOT NULL DEFAULT '0',

PRIMARY KEY(id)

)





CREATE UNIQUE INDEX f_n ON foods(name)



CREATE INDEX fpn_fi ON foodpopularnames( foodpopularnames_id )



the indexes speed access up.



creating the php app is going to be a fairly difficult,since you have 2 relationship tables, and you haven't done any php database programming before. I can't fit it all in here on yahoo answers. you still need to make your SELECT, INSERT, UPDATE, and DELETE queries, make an admin section for maintaining the foods, have mulltiple kinds of display pages, etc. it's not a simple undertaking. well, maybe if you are doing dreamweaver and you have the appropriate book handy like dreamweaver bible. they have a section on dynamic data.



TEXT is bigger than VARCHAR, LONGTEXT is even bigger.



you will need to
2012-05-23 01:28:18 UTC
create a new folder & put ur app in it, u can make it pubic when ever u want. like on facebook & u can keep adding to it
2012-05-23 01:38:02 UTC
you can use database mysql or other type that familiar with you


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...