Saving Data on Android


droidquiz  and selecting  New



Download 19,28 Mb.
Pdf ko'rish
bet126/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   122   123   124   125   126   127   128   129   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

droidquiz
 and selecting 
New 

 Package
 and name it 
data
.
Inside the 
data
 package, you will store all the code related to your Room database 
including your entities and data access objects.
Create a new package inside the 
data
 package and name it 
model
. Inside the 
model
 
package, you will store the data classes that will be converted to entities using 
annotations.
The DroidQuiz app will consist of a very simple database with two tables — a 
Question
 table and an 
Answer
 table.
The Question table will have two columns:

question_id
: A self incrementing 
Int
 that will act as the primary key.

text
: A 
String
 that represents the text of the question.
The Answer table will have four columns:

answer_id
: The primary key for this table.

question_id
: A foreign key that references a question in the 

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   122   123   124   125   126   127   128   129   ...   292




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish