Local SQLite Database for Expo React Native App with Import and Export Database from Device Files

preview_player
Показать описание
Hi everyone!

Today I am going to show you how to create an app that connects to a local database. I will cover the basic CRUD operations of creating (insert), reading (select), updating (update) and deleting (delete) records. I will also cover creating a table.

Sometimes you may want to import/export your database so I will also cover this.

If you would like to see my expo-sqlite example, the source code is available on my GitHub:

For the expo-sqlite documentation you can see the expo documentation:

To learn about sqlite queries:

You’ve clearly come here to learn and a free audible trial allows you to increase your learning potential in situations where you may be hands free like at the gym or on your commute. It allows you to spend more time on theory when you aren’t able to watch a screen, so that you can maximise your screen time to pick up technical skills. Try it for free today:

// ABOUT ME
My name is Chelsea and I started studying software engineering in 2010. I have been working commercially full time since 2014 and have been in various positions from graduate developer to tech lead to solution architect.
I'm a full stack developer with a lot of experience in C# and Javascript but my passion is for mobile development; specifically native iOS development and cross platform using React Native.

I always have many things on the go and am always trying out a new side hustle and failing at it; perhaps you can learn from my mistakes!

Please like and subscribe if you enjoyed this video and want to see more like it!
Have any suggestions on topics you would like to learn more about? Please suggest them in the comments... I would love to help you out while doing a bit of learning myself!

// PRODUCTS USED
I use the following products in the creation of my videos:

A reasonable quality and reasonably sturdy but cost effective microphone that can be used by both DSLR cameras, mobile phones and laptops

A kit lens but a decent quality lens for beginners getting used to a DSLR

This is the kit I started with it includes the lens linked above and is a great starter camera.

I love Apple devices... These are the ones I use for my channel content creation:

A good all round phone, good for Apple development and recording videos with enough high quality features but at a cheaper price point than the pro versions.

A nice portable computer for working from anywhere and perfect for iOS development

Really easy to use for graphic design if required for logos as part of my app development or editing the videos on the go.

DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to provide you with free content each week!

//CONTACT:

//CRAVING MORE:
Комментарии
Автор

Your content is simple and straight to the point, PLEASE don't stop making React-Native tutorials I'm actually begging hahaha.

lanigoespew
Автор

Just wanted to leave a message to say thanks. This helped me so much. The Expo docs for this are really not overly helpful but you walked through it and thanks to you I managed to convert my app from using async storage to this.

indecisive.m
Автор

This was amazing. Phew! So much packed into 38 minutes. Loved the video and its content.💙

chippandenga
Автор

Do you know anything about SQLite working perfectly on Expo Go, and after generating a build it doesn't work on the device?

supprvctor
Автор

Hi,
Anyone tested this in release build? It’s not working when I build for release

Evalionn
Автор

I was really for the need of local database and when i was searching for it you uploaded the video and that really helped aloooot thanks for that video

kingogamer
Автор

I came across your videos when I was searching for React Native tutorials. You have videos on some great topics and your teaching style is great too.

Unfortunately I'm not using Expo. I wish there were more videos on React Native CLI as well.

isurujn
Автор

thank you it is very useful but can you update it with the new functionalities of expo-sqlite? thank you, i'm stuggling with the documentation, more promesses are made and they added sync and async to functions. Thank you!

emilieclair
Автор

for some reason, i did like you, but i can't get the names from database....

nunomonteiro
Автор

Thanks bro suchs a great video you made, Greates wishes from COLOMBIA

emmanuelareiza
Автор

Thank you, you are a Sage, may you be prosperous and happy

sherlockbhone
Автор

awesome, learned a lot from this, first time working w database for mobile app! very cool

realworldcodingapplications
Автор

Thank you for the awesome video. How would you go about accessing the database from different components? Is it necessary to use some sort of global state for that? So we wouldn't create an instance of db access in each component? Or is there some other way to do that?

Tony-jrki
Автор

Thank you very much, here from Brazil :)))

henriqueantonio
Автор

Thank you for explaining SQLite. I followed the steps mentioned in the video, on iOS it works fine, but on Android I am unable to import the database. It exports well, import is done without errors, but the database table shows no record. Any suggestions?

shehzadpasha
Автор

Nice content! I'm considering using a local or remote database in my app data, mostly for cost reasons. I was wondering how much data is considered "too much" to be stored locally as far as performance and acceptable app sizes go? It's hard to get a gauge of that without actually ingesting my data into my own sqlite db first, so I was wondering if you had any experience with that. Thanks!

mintmikasa
Автор

please make import and export sqlite for wal mode cause i've already set the mode to wal mode and now i've got 3 different file .db, -wal, and -shm 🙏

zelvrs
Автор

Thank you so much for the tutorial miss coding, could you tell me please how to delete the database from sqlite?

jeka
Автор

wow! awesome video, thanks. Good voice.

ricardoyanez
Автор

Teşekkürler. Çok güzel bir bir anlatım.

erdincparlak