Abstract
Sleep apnea is a sleep disorder that causes repeatedly reduced respiration or no airflow in a period of time during sleep. Sleep apnea can be detected by analyzing bio-physiological signals such as electrocardiogram, oxygen saturation, and respiratory effort, etc. The bio-physiological signals that are recorded during sleep, are usually kept in files which have low level abstractions, indexing primitives, and diverse formats such as EDF/EDF+ file formats, or a Waveform Database format (PhysioBank databases). To manage and query data from these files the provided software packages are required, i.e. the WFDB software package for the Waveform Database format. Otherwise, it is necessary to write a new software application based on the specification of the file formats, which leads to increased difficulty of programming and analyzing bio-physiological data. The thesis presents design and implementation of a relational database model for storing not only Obstructive Sleep Apnea signals, but also other bio-physiological signals. The first benefit of using a relational database for storing bio-physiological data is that there is no need to write or include management tools for managing the collected data. Furthermore, data analysis can be directly performed on the collector devices (mobile devices) by using the SQL language, which provides many useful algorithms for analyzing data. In addition, remote services can ask for some parts of data from collector devices by using remote querying. Last but not least, the privacy of patients is not violated if they can keep their bio-physiology on their own devices, and can decide which data they would like to send. The database model that is presented is this thesis is a platform independent, it can therefore be implemented on whatever database management system as long as they support SQL language. In this thesis, a design and implementation of a database application for the database model are proposed. The design is discussed first at an abstract and platform independent level, in which it describes the ways the database application works with real-time sources and files. The Android platform is chosen as implementation platform for both the database model and database application. Data sources for the database are from the CESAR acquisition tool and EDF files that are exported from PhysioBank. The database size is less than 1736 MB after collecting data from all channels of the CESAR acquisition tool with 100Hz for each channel in nearly 19 hours. That is, the application can collect data for a whole day without any storage problem. The power consumption for the application is 6.6% of the total power drain on the device, which is quiet efficient. The average read time and write time are 17936 samples per second and 12960 samples per second. With a stress test, the application shows that it can manage all channels of 14 BITalino sensor kit with 100Hz while importing a EDF file, exporting data from six channels to a EDF file, and visualizing incoming samples on a graph. Nevertheless, the results show that the database model and database application are very efficient for storing and analyzing Obstructive Sleep Apnea signals, and other bio-physiological signals.