 Hello everyone. My name is Mr. Sandesh Pare. I am currently working as an assistant professor in the department of computer science and engineering at Valchand Institute of Technology, Sallapur. In this session, I am going to cover the topic which is called mobile database. So let us start with the learning outcome. At the end of this session, you will be able to identify different data persistence and access mechanisms in mobile application. So, let us take one overview of the data storing. Generally, we are dealing with the intense till now, which transforms the data from the one location to the another location one, but we are not dealing with the storing of the data one. This is the mass passing framework we are using until now. But what is the context in the data storage format? So based on the location of the data storing device, it is basically categorized in the local database or the remote database one, but it is a general overview. And whatever the data regarding to particular the mobile application is compulsory private to its own. It does not share with anybody until it gets the particular permission from the user. So it should be private to the application unless and until the user provides the certain access mechanisms or the permissions to the application that is or him data should be shared with the another one. And based on the mechanisms of the data access, there are several techniques are there. First one is the RAM memory, which can be used for the storage of the states means of the applications activities. And second one is the preferences. It is the lightweight mechanism to store and retrieve the key value pairs means certain settings are there, certain access mechanisms are there. Regarding that preferences are used. And third one is the files. These are the liberal files. Means there are no any structure defined regarding these files. Any data can be stored and retrieved from these files. And it can be stored on the device or the mobile storage device or the at the remote center also. So based on this files is a third access mechanism regarding the data storage. And fourth one is the SQLite database. In this data is stored in format of the database. There are several tables are there and here mostly structured type of data is there and it is stored in the database. So these are mainly mechanisms regarding the storage. We will see it in detail in the next slides. And obviously the main issue is of the content provider. As I told earlier until and unless the user provides certain permissions to the application that data of the particular app should be private and does not share with the any third party unless it gets authorized. So when the user will provide certain access mechanisms in the sense permissions to the application that its data should be shared with the another application. At that time the term which came into the picture is the content provider. The content provider's main task is to provide the data from the one app to the another app. So as we are going to focus these four mechanisms in detail first let us start with the activity state using RAM on. What happens the certain number of activities are going on in the application when executing then certain application when executing that time number of activities are executed and they are going through various states. It means create and then it gets started then it gets resumed paused and stopped and then at last it is destroyed. So during these phases activity is going through and at various stages it goes through certain state that is let us start about the pause state. So when we called as the resume state that when the particular activity is interacting with the user one that is it is at the foreground. At that time we can call it as the resumed state but whenever the new window popped up at that time it goes into the background state and user could not deal with that activity but it can be visible to the user but it is partially so it is the state of the particular activity and these state are stored somewhere internally. So for that storage the RAM is used and obviously these states are the temporary storage and how this can be called as the temporary storage that its state information should be stored until what nothing but the app's lifetime. Once the lifetime is completed after that the in-between state and its information is no longer needed isn't it? So while the app's life activity the state information is stored internally in the RAM and it is only to the state's lifetime and these are the methods to storing of the state and reading the state. To store the state on save instance state is used and bundle is passed to the as a parameter and for the reading of the state on the restore instance state is used. So let us go through the next one that is the shared preference one. What happens generally in shared preference that it is a very simple way and it stores very small amount of the data and shared preferences also used to store the state of the activity but the mainly preferences generally developers use the shared preferences for storing the certain key value pairs just like you tick mark on the window whenever the dialog box is open that don't show me this message again. At that time this is nothing but the one settings is there whenever that dialog box is open at that time this activity should be performed so this is the setting which should be stored internally somewhere. So while using this this setting is stored internally using the shared preferences. For example some format files are there let us take the .pdf file is there and there are certain applications stored and installed on the device which can explore this PDF files but you want to remember your choice that you want to open this WPS file opener. At each time you want to open the PDF files with that application. At that time these settings you made that are stored internally by using the shared preferences and certain whenever you are browsing you don't want to pass the login ID password each time because you are using your personal device no one is using regardless you. At that time passing the login ID password is headache so that you want to store this automatically. At that time this login ID passwords these are stored internally by the device using the shared preferences. So these are the methods which are used to set or the store shared preferences that are nothing but the get stored preferences and in that you want to pass the string name as a parameter in case of the multiple preference files and if you want to use only one preference file use a string name whatever passed is the unique identity. So this and you can edit these preferences using the edit function. So third one is the files what happens in the file there is unstructured type of data this can be stored internally in the device and at the remote storage. So files are generally in three modes that is in private world readable and world writable and two methods are there open file input and file output to read and write the files and the fourth one that is last one is the SQLite it is nothing but the one database. So using this database you can store the data in a structured format whatever the data regarding the application is stored in the structured format and for that the one wrapper is used and for accessing its database what tool is used by the Android SDK these are nothing but the SQLite open helper and the SQLite tree. So using these access mechanism you can access the data of the particular mobile applications and generally whenever you install the application at the term one package is created for that application that is and in that particular package in the database folder you will find out the all the database information which is stored by the user or the application one. So what is the SQLite open helper that is it is the pattern for creating the opening and upgrading the database okay and you can hide the logic okay which is used to decide if database need to be created or updated okay before it's open. So there is one question for you guys that is what is shared preferences and what type of data it stores. So shared preference is nothing but the one lightweight mechanism it is generally used to store and data of the key value pairs okay as I told you earlier that some information like settings or some values or the lagging ID password these are the kind of the information which is generally used to store by using the shared preferences. So these are the some references I use to make this video thank you.