Posts

Showing posts with the label Database

[MySQL with MAMP] Using MySQL with MAMP in a Terminal

Image
  To use the MySQL command line with MAMP or MAMP PRO , perform the following steps: Start MAMP or MAMP PRO Start the server Open Terminal (Applications -> Utilities) Type in: (one line) 
 /Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot Now you can use the MySQL command line. For exmaple to show all your databases with show databases; .

[Android] Tutorial - How to use SQLite to create a contacts browser in Android

Image
Google’s Android has strong database support. By default, Android ships with SQLite , a powerful, full-featured, small footprint technology. SQLite is not specific to Android; it’s an open source technology that’s been around since 2000, and has enjoyed adoption on a number of embedded platforms. On Android, SQLite provides not just a solid database layer, but also a means of Inter Process Communication (IPC). While processes on Android are generally isolated for security reasons, SQLite, combined with the platform’s content provider model, allows applications to share some data in a controlled fashion. Probably the most straightforward example of using a content provider can be demonstrated using the Contacts list on your device. This tutorial implements a no-frills contacts browser. You can follow along with the step-by-step instructions below or download the entire project and import it into Eclipse . 1. Start a new Android project in Eclipse. Because we are us...