Creating special dictionary on the platform android | Статья в журнале «Молодой ученый»

Отправьте статью сегодня! Журнал выйдет 23 ноября, печатный экземпляр отправим 27 ноября.

Опубликовать статью в журнале

Автор:

Рубрика: Информационные технологии

Опубликовано в Молодой учёный №8 (112) апрель-2 2016 г.

Дата публикации: 20.04.2016

Статья просмотрена: 53 раза

Библиографическое описание:

Нуржабова, Д. Ш. Creating special dictionary on the platform android / Д. Ш. Нуржабова. — Текст : непосредственный // Молодой ученый. — 2016. — № 8 (112). — С. 141-144. — URL: https://moluch.ru/archive/112/23411/ (дата обращения: 15.11.2024).



This work is considered making the dictionary on three languages: Russian, Uzbek and English on sphere ICT, using оbject-oriented programming languages Java and database SQLite. The words is offered on three languages ICT sphere and created dictionary runs on platforms Android for device smart phones and tablets. Giving dictionary is intended for students, programmer and student studied on this sphere.

Key words: Java, database SQLite, ICT, оbject-oriented programming languages.

1. Introduction

Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google. Applications («apps»), which extend the functionality of devices, are written using the Android software development kit (SDK) and, often, the Java programming language that has complete access to the Android APIs. Java may be combined with C/C++, together with a choice of non-default runtimes that allow better C++ support [1, 3].

SQLite- compactly integrated relational database. The source code for the library in the public domain. In 2005 the project was awarded Google-O'Reilly Open Source Awards. As you know in its development SQL rushed in different directions. Young people interested in Android platform, because there is among popular tab, mobile devices or fashionable gadget [2,4].

2. Russian, uzbek and english dictionary on sphere ICT SQLite database

Large manufacturers have started to push any expansion. Although all sorts of accepted standards (SQL 92), in real life all the major databases do not support full have something of their own. So, SQLite tries to live by the principle of «minimal, but the full set». It does not support the complex stuff, but largely corresponds to SQL 92. And introduces some features which are very convenient, but it is not standard [5,6]. The word «embedded» (embedded) means that SQLite does not use the client-server paradigm, the SQLite engine is there is not a separate working process interacts with the program, and provides a library with which the program is assembled and the engine becomes an integral part of the program. Thus, as the protocol used by function calls (API) library SQLite.

This approach reduces overhead costs, response time and simplifies the program. SQLite stores all database (including definitions, tables, indexes, and data) in a single standard file on the computer on which the program is executed. Ease of implementation is achieved due to the fact that prior to the execution of a transaction record the entire file that stores the database is locked; ACID-functions are achieved, including by creating a log file [5,6].

Several processes or threads can be simultaneously without any problem to read data from one database. An entry in the database can be carried out only if no other requests are currently not in service; otherwise write attempt fails, and the program returns an error code. Another scenario is the automatic repetition of attempts to write for a specified length of time. The bundle comes as a functional part of the customer in the form of an executable file sqlite3, by which demonstrates the realization of the main functions of the library. The client side runs from the command line allows access to the database file on the basis of standard functions of the operating system. Creating program and connected together database SQLite. At firstly, we try to create database under the three name:

Dictionary

Ict_temps

Sqllite _sequences

Fig.1. Interface of program SQLite database

Fig.2. Entering words of three languages to SQLite database

Secondly after connected database and entering words, as result is appears on the interface SQLite.

3. SQLiteOpenHelper and program code

Due to the architecture of the engine may use SQLite as embedded systems, as well as on a dedicated machine with a gigabyte data sets. Older versions of the SQLite were designed without any restrictions, the only condition was that the database fits in memory, in which all calculations were performed using 32-bit integers [4,7]. This created some problems. Due to the fact that the upper limits have not been determined and thus properly tested frequently detected errors by using a sufficiently SQLite extreme conditions. Therefore, new versions were introduced SQLite limits are now tested with a common set of tests [4,7]. SQLite is available on any Android-powered device does not need to be installed separately. SQLite supports the types TEXT (analogue of the String Java), INTEGER (analogue long in Java) and REAL (analogue double to Java). Other types must be converted before you save the database. SQLite itself does not check the data types, so you can write an integer in the column designed for strings, and vice versa. In the third step part of dictionary be following view:

package com.aiw.ictdictionary;

import android.content.Context;

import android.database.Cursor;

import android.database.sqlite.SQLiteDatabase;

import android.util.Log;

import android.widget.Toast;

import java.io.File;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

import java.sql.SQLException;

import java.util.ArrayList;

import java.io.File;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

import java.sql.SQLException;

import java.util.ArrayList;

public class DatabaseManager {

public final String APP_TAG = "ICT_DICTIONARY";

public final String DB_NAME = "ict_dict.db";

public final String DB_FOLDER = "databases";

private static DatabaseManager instance;

private SQLiteDatabase db;

private Context context;

private DatabaseManager(Context context) {

this.context = context;

this.db = openDatabase(DB_NAME);

}

public static DatabaseManager getInstance(Context context) {

if (instance == null) {

instance = new DatabaseManager(context);

}

return instance;

}

private SQLiteDatabase openDatabase(String dbName) {

File dbFile = this.context.getDatabasePath(dbName);

String dbPath = dbFile.toString();

File dbDir = new File(dbPath.substring(0, dbPath.lastIndexOf('.')));

if ( ! dbFile.exists()) {

if ( ! dbDir.exists() ) dbDir.mkdirs();

copyDatabase(dbFile, dbName);

}

return SQLiteDatabase.openDatabase(dbPath, null, 0);

}

private void copyDatabase(File dbFile, String dbName) {

try {

InputStream istream = this.context.getAssets().open(DB_FOLDER + "/" + dbName);

OutputStream ostream = new FileOutputStream(dbFile);

byte[] buffer = new byte[100 * 1024];

int length;

Android contains an abstract class SQLiteOpenHelper, with which you can create, open and update the database. This is the basic class with which you will have to work in their projects. If you implement this helper class is hiding from you the logic on which the decision to create or update the database before opening it.

References:

  1. Dmitriy Volkov. Google Android eto neslojno. Sbornik urokov. Elektronnoe izdanie, 2012.
  2. Orlov L. V. Web-sayt bez sekretov. 2-e izd. M.: ZAO “Noviy izdatelskiy dom”, 2004. -512 p.
  3. Wikipedia. Internet encyclopedias. (ru.wikipedia.org/wiki/Android)
  4. Official web- site of Android, (android.com)
  5. Spravka — OS Android. (http://support.google.com/android/?hl=ru)
  6. Programmirovanie dlya android, java — s samix pervix shagov. (http://davidmd.ru/tag/eclipse/) API Guides for Android App. (http://developer.android.com/guide/components/index.html)
  7. D.Vinogradov. Start Andorid. (Sbornik urokov) — 2012. 703 p.
Основные термины (генерируются автоматически): ICT, SQL, API, INTEGER, REAL, SDK, TEXT, ZAO.


Ключевые слова

Ява, База данных SQLite, ИКТ, Ориентированные на объектно-ориентированные языки программирования., Java, database SQLite, ICT, оbject-oriented programming languages

Похожие статьи

Using java technologies to develop graphical applications

The article is devoted to the consideration of topical issues related to the use of Java technologies for the development of graphical applications. Special attention is paid to graphical capabilities of Java language and used class libraries. The me...

The use of web services and mobile technologies in interactive foreign language teaching in secondary school

This article discusses the integration of mobile and digital technologies in the English language teaching process, emphasizing their importance in enhancing interactive learning environments. The study explores various web services, mobile technolog...

Task-based language teaching: a practical guide for English educators

In the ever-evolving landscape of language education, the task-based language teaching (TBLT) approach has emerged as a dynamic and effective method to enhance communication and language acquisition among students. Unlike traditional methods that foc...

Learning English with usage of specific teaching methods

This article is dedicated to the role and effectiveness of learning English with usage of specific teaching methods. And in this article we investigated the compatibility of the concept of foreign language environment that helps individuals and group...

Opinion monitoring and analysis in social networks

The Web-application for analyzing users opinions in social networks is developed in the thesis. The Spring framework was used as a structure of the program system. The Twitter microblog was chosen as a social network. The purpose of this work is to c...

From Words to Concepts: Teaching Vocabulary with Frayer Model

The journey from words to concepts is an important step in fostering deep and meaningful learning of vocabulary in the framework of modern language education. This article aims to explore the Frayer Model, a graphical organizer for teaching vocabular...

Implementing of multimedia technologies in a foreign language lesson for university students

At the current stage of educational development, Kazakhstan's universities of higher education must work to improve the quality of lessons, which is connected to the possibility of implementing a technological approach with the development of new sta...

The importance of teaching grammar in context with different activities

This article deals with setting up situations, making up dialogues for creative grammar teaching and training in context in the English grammar classroom. Grammar is beyond a set of traditional rules or structures and with the help of grammar knowled...

Innovative technologies for education and learning

A number of new communications technologies have emerged in recent years that have been largely regarded and intended for personal and recreational use. However, these «conversational technologies» and «constructivist learning tools», coupled with th...

A study on college english teaching mode in the setting of multimedia technology

Language instruction is closely related to media. With the rapid development of multimedia technologies, multimedia, as an assistant means of teaching, finds a broad use in foreign language instruction. Thus, the author makes an attempt at a new teac...

Похожие статьи

Using java technologies to develop graphical applications

The article is devoted to the consideration of topical issues related to the use of Java technologies for the development of graphical applications. Special attention is paid to graphical capabilities of Java language and used class libraries. The me...

The use of web services and mobile technologies in interactive foreign language teaching in secondary school

This article discusses the integration of mobile and digital technologies in the English language teaching process, emphasizing their importance in enhancing interactive learning environments. The study explores various web services, mobile technolog...

Task-based language teaching: a practical guide for English educators

In the ever-evolving landscape of language education, the task-based language teaching (TBLT) approach has emerged as a dynamic and effective method to enhance communication and language acquisition among students. Unlike traditional methods that foc...

Learning English with usage of specific teaching methods

This article is dedicated to the role and effectiveness of learning English with usage of specific teaching methods. And in this article we investigated the compatibility of the concept of foreign language environment that helps individuals and group...

Opinion monitoring and analysis in social networks

The Web-application for analyzing users opinions in social networks is developed in the thesis. The Spring framework was used as a structure of the program system. The Twitter microblog was chosen as a social network. The purpose of this work is to c...

From Words to Concepts: Teaching Vocabulary with Frayer Model

The journey from words to concepts is an important step in fostering deep and meaningful learning of vocabulary in the framework of modern language education. This article aims to explore the Frayer Model, a graphical organizer for teaching vocabular...

Implementing of multimedia technologies in a foreign language lesson for university students

At the current stage of educational development, Kazakhstan's universities of higher education must work to improve the quality of lessons, which is connected to the possibility of implementing a technological approach with the development of new sta...

The importance of teaching grammar in context with different activities

This article deals with setting up situations, making up dialogues for creative grammar teaching and training in context in the English grammar classroom. Grammar is beyond a set of traditional rules or structures and with the help of grammar knowled...

Innovative technologies for education and learning

A number of new communications technologies have emerged in recent years that have been largely regarded and intended for personal and recreational use. However, these «conversational technologies» and «constructivist learning tools», coupled with th...

A study on college english teaching mode in the setting of multimedia technology

Language instruction is closely related to media. With the rapid development of multimedia technologies, multimedia, as an assistant means of teaching, finds a broad use in foreign language instruction. Thus, the author makes an attempt at a new teac...

Задать вопрос