Working with Databases (I) 靜宜大學資管系 楊子青

Slides:



Advertisements
Similar presentations
Understanding an Apps Architecture ASFA Computer Science: Principles Fall 2013.
Advertisements

Smartphone Apps Development Team Weiqing Li Lijun Zhu Man Li.
Programming with App Inventor Storing Data
W alkie Doggie is a web application that allows dog owners to help each other with their dog walks. It’s main feature is the walkies, which are the user’s.
No Texting While Driving. Introduction You'll design the app so that it sends a response to any text message received. You'll also allow the user to customize.
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
M1G Introduction to Database Development 1. Databases and Database Design.
What is Android? Android is among the most popular operating systems aimed towards mobile devices such as smartphones, and is currently the most widely.
Introduction to AppInventor Dr. José M. Reyes Álamo.
Jennifer Paoletti. Office Live Workspace Basics provides a user with its own domain name, and the ability to create their own website. It also provides.
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
Company/Product Overview. You have lots of files all over the place.
Project Rickshaw SEARCH - FIND - GO. Project Rickshaw TEAM MEMBERS KEVIN AUGUSTINO – MATT FOX – DAVID MOORE SPONSORS KARASU TECHNOLOGIES - ERIK PAUL -
Computing Subject Knowledge Enhancement App Development.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
WC2011 Programming Mobile Devices Android Development Day 2.
靜宜大學資管系 楊子青 1 Working with Databases (II) 靜宜大學資管系 楊子青
DUE Introduction to the Android Platform Working Connections 2011.
1 Tradedoubler & Mobile Mobile web & app tracking technical overview.
Daniel PaluszekAbdelJLIL Jlil Verna Blake Adrian Libert Stanislav Opsha.
Technovation Incorporating Feedback Week 4. Check-in: paper prototype By now, your paper prototype should be complete, so that you can begin creating.
Loops, Databases, Procedures, and Lists Dr. José M. Reyes Álamo.
COMU114: Introduction to Database Development 1. Databases and Database Design.
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
Electives autumn 2009 Courses in the 4th semester –Systems development (continued) –2 elective courses N subjects are provided Each of you have to choose.
Steven Carvellas Anirban Ghosh Pramod Vedantham Rahul Sheth Varun Sarwade.
Using Databases in the RememberHack Week 5. Databases Organized collection of data Intended to organize, store, and retrieve large amounts of data easily.
 Architectural overview  Main APIs. getGames.php getGroupsLocations.php getGroupsScores.php getMessage.php getStreet.php getTime.php login.php sendMessage.php.
Incorporating Feedback Lesson 5 0. Check-in: paper prototype By now, your paper prototype should be complete, so that you can begin creating your app.
Presentation.
What the $#*! IS my password? Secure Online Password Storage Lon Smith Aaron Gremmert.
DAT602 Database Application Development Lecture 1 Course Structure & Background knowledge.
/16 Final Project Report By Facializer Team Final Project Report Eagle, Leo, Bessie, Five, Evan Dan, Kyle, Ben, Caleb.
Mobile Application Development Data Storage. Android provides several options for you to save persistent application data. The solution you choose depends.
 Learn the mechanics of using App Inventor to build apps.  Learn how to design an app’s user interface with the App Inventor Designer, and its behavior.
A Seminar On. What is Cloud Computing? Distributed computing on internet Or delivery of computing service over the internet. Eg: Yahoo!, GMail, Hotmail-
Mary Ganesan and Lora Strother Campus Tours Using a Mobile Device.
A little more App Inventor and Mind the GAP!
Overview of E-Learning Authoring Software
Using AppInventor2 for teaching
JavaScript and Ajax (Ajax Tutorial)
REST APIs and Android Presented by: James Simshaw
Web Application.
Chapter Six Cloud Computing
Introduction
mysql and mysql workbench
Understanding an App’s Architecture
Auto-tagging of Media using Local Bluetooth Information
Task Management System (TMS)
PHP / MySQL Introduction
Setup your Google Account on Kindle Fire Tablet.
NForm 2.0 Training.
Training course on Euro SDMX Registry
Tapping the Power of Your Historical Data
Directions: GO THROUGH THE FOLLWING SLIDES. Make sure you have quizlet cards for all the vocabulary. Study the terms GCFLearnFree website “Computer Basics”:
Reactive Android Development
Loops, Databases, Procedures, and Lists
Reactive Android Development
Working with Databases (I) 靜宜大學資管系 楊子青
Architecture.
Architecture.
Introduction to AppInventor
Programming Lists of Data 靜宜大學資管系 楊子青
Digital Literacy 1.00 Computer Basics
MIS2502: Data Analytics MySQL and MySQL Workbench
Advanced Database System
Web Application Development Using PHP
Presentation transcript:

Working with Databases (I) 靜宜大學資管系 楊子青

Database Facebook has a database of every member’s account information, friends list, and posts. Amazon has a database of just about everything you can buy. Google has a database of information about every page in the World Wide Web.

Database Course In most programming environments, building an app that communicates with a database is an advanced programming technique: you have to set up a server with database software like Oracle or MySQL and then write code that interfaces with that database.

App Inventor provide useful things provides components that reduce database communication to simple store and get operations. You can create apps that store data : directly on the Android device, and with some setup, you can create apps that share data with other devices and people by storing it in a centralized web database. even when you close the app and reopen it, the data is still available.

Two components to facilitate database activity TinyDB is used to store persistent data directly on the Android device; this is useful for highly personalized apps where the user won’t need to share her data with another device or person. TinyWebDB is used to store data in a web database that can be shared among devices. Being able to access data from a web database is essential for multiuser games and apps where users can enter and share information.

1. TinyDB The TinyDB.StoreValue block stores data to the device’s long-term memory. A tag-value scheme is used for database storage. You retrieve data from the database with the TinyDB.GetValue block.

TinyDB

(1) 介面設計

(2) 程式碼

(3) 模擬程式執行結果 輸入名字 再更新 資料庫 任意輸入名字,但 不要按更新資料庫 讀取 資料庫

打包安裝至手機 第一次先輸入名字 關掉APP再開啟,或是按Retrieve DB,會顯示先前貯存的User Name

2. TinyWebDB Many apps do share data: think of Facebook, Twitter, and popular multiuser games. For such data-sharing apps, the database must live on the Web, not the device. TinyWebDB is the web counterpart to TinyDB. It allows you to write apps that store data on the Web. By default, the TinyWebDB component stores data using a web database set up by the App Inventor team and accessible at http://appinvtinywebdb.appspot.com/ .

TinyWebDB Service

TinyWebDB Service: StoreValue實例

TinyWebDB Service: GetValue實例

2.1 Storing Data with TinyWebDB The TinyWebDB.StoreValue block sends the tag-value pair over the Web to the database server.

2.2 Requesting and Processing Data with TinyWebDB Retrieving data with TinyWebDB is more complicated. TinyDB: the GetValue operation immediately returns a value because your app is communicating with a database directly on the Android device. TinyWebDB: the app is requesting data over the Web, so Android requires a two-step scheme for handling it.

Get Value差異 TinyWebDB.GetValue block does not return a value immediately, so there is no plug on its left side. Instead, when the web database fulfills the request and the data arrives back at the device, a TinyWebDB.GotValue event is triggered.

TinyWebDB實例1:讀取tcyang標籤值

程式碼及執行結果

TinyWebDB實例2:記錄最高分玩家

送出此次玩家分數,並先判斷是否有此tag

若已有tag,判斷分數是否最高

若未破紀錄,還要顯示紀錄保持人 (回傳的欄位除了tcyangScore外, 還可能是tcyangPlayer)

3. Creating a Custom TinyWebDB Service (App Inventor 2) http://appinventor.mit.edu/explore/ai2/custom-tinywebdb.html 作業:請分組自行設定,下週上課時Demo

為什麼需要自行設定Web Service? TinyWebDB is an App Inventor component that allows you to store data persistently in a database on the web. By default, the TinyWebDB component stores data on a test service provided by App Inventor, http://appinvtinywebdb.appspot.com/ . This service is helpful for testing, but it is shared by all App Inventor users, and it has a limit of 1000 entries. If you use it, your data will be overwritten eventually. For most apps you write, you'll want to create a custom web service that isn't shared with other App Inventor apps and programmers.