Special note: The Android back Word project as a whole is my original (some code and resources reference Open source project)
This reprint please indicate the original address, thank you
Http://www.cnblogs.com/v1onway/p/4660620.html
Project Full source Download
This section explains
This section is mainly used to describe the database and table, according to the requirements of the document to determine
Database includes external database and project database (internal)
External database description
U external database is mainly a dictionary and Word book database, placed in the assets directory.
You will initialize the program to the/sdcard/recword/books directory when you run it.
You copy [Word Book data] to the word record database in the plan file when you create the plan []
When you display a word, it reads all the words from the copied [dictionary file dict]
The U dictionary file is larger, so the filename suffix must meet the requirements of Android not to compress the line.
Generally speaking, most AV file formats are not compressed by Android. And here is the database file, SMF is a interchangeability file, you can use the suffix.
U so in the assets directory, specify the word book file no suffix, the dictionary file name is [DICT.SMF]
After copying, both the word book file and the dictionary file suffix are [. db]
Database:
Description |
/assets in pre-replication Database name and file |
After copying /sdcard/recword/books Database name and file |
Level Four |
Wl-cet-4 |
Wl-cet-4.db |
Level Six |
Wl-cet-6 |
Wl-cet-6.db |
Kaoyan |
Wl-kaoyan |
Wl-kaoyan.db |
Toefl |
Wl-tofel |
Wl-tofel.db |
Ielts |
Wl-ielts |
Wl-ielts.db |
Gre |
Wl-gre |
Wl-gre.db |
Dictionary |
Dict.smf |
Dict.smf |
Level four Word Book table:
The word book here only lists one level four, the other is the same.
Field name |
Chinese description |
Data type |
Length |
is empty |
Default value |
Format |
Word |
Words |
|
|
No way |
|
|
Tested |
Test |
Integer |
|
No way |
|
|
Omitted |
|
|
|
|
|
|
Dictionary database
definition format is [Word]: [JSON]
JSON includes English standard, explanations and examples
Field name |
Chinese description |
Data type |
Length |
is empty |
Default value |
Note |
Word |
Word Markers |
|
10 |
No way |
|
|
Definition |
Word Information (JSON) |
|
Default |
No way |
|
|
Project Database Description
The project database is used by Android clients, no server database
is created by the user and is using the SQLite database.
Including
U word database, copied from assets to/sdcard/recword/books
U plan file database, created by user, corresponds to a learning record for each schedule file database
In the/sdcard/recword/directory, there are n tables in a database file [v1onway.db]:
Table name |
Storage Entity Description |
Type |
Full-text index key |
Primary key |
Reference fields |
Studyplan |
Study Plan Form |
|
|
Id |
|
Task |
Task table |
|
|
Id |
|
Wordsturd |
Word Learning Record table (The data in the word book is copied to form the table.) ) |
|
|
Id |
|
studyplan- Study Plan Form
Field name |
Chinese description |
Data type |
Length |
is empty |
Default value |
Format |
Id |
Id |
|
|
No way |
|
|
Spname |
Study Plan Name |
|
|
No way |
|
|
Wordbookname |
Word titles |
|
|
No way |
|
|
WordCount |
Word volume |
|
|
|
|
|
Recitetimes |
Number of words recited |
|
|
|
|
|
Dayunit |
Unit volume per day |
|
|
No way |
|
|
Unitcount |
Total Unit Quantity |
|
|
|
|
|
Needdaycount |
Days required |
|
|
|
|
|
Todaytaskstate |
Today's task status |
|
|
|
|
|
Currentsturdugix |
Current Cell Group subscript |
|
|
|
|
|
CreateDate |
Date Created |
|
|
No way |
|
|
task-Scheduling Task Table
Field name |
Chinese description |
Data type |
Length |
is empty |
Default value |
Format |
Id |
Id |
|
|
|
|
|
Datestr |
Date |
|
|
|
|
|
Daystr |
The first day |
|
|
|
|
|
Studyunitjsonstr |
Learning Unit (JSON indicates, possibly multiple) |
|
|
|
|
|
Reviewunitjsonstr |
Review Unit (JSON indicates, possibly multiple) |
|
|
|
|
|
Wordsturd- Word learning Record table
Field name |
Chinese description |
Data type |
Length |
is empty |
Default value |
Format |
Id |
Id |
|
10 |
No way |
|
|
Wordstr |
Words |
|
20 |
No way |
|
|
Times |
Number of studies |
|
20 |
No way |
|
|
Project Full source Download
Andoid project Development-recite Word 03-database Description