fragment中怎么读取数据库的数据?

数据库是在service中创建的,数据也就相应的存储到数据库中了,现在想在我的fragment所在的界面进行数据的读取,不知道用什么样的方法,求大神指点~非常感谢!

 service中的创建数据库的代码:
 private void broadcastUpdate(final String action,final BluetoothGattCharacteristic characteristic){
     final Intent intent = new Intent(action);
     if(UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())){
        int flag = characteristic.getProperties();
        int format = -1;
        if((flag & 0x01)!= 0){
            format = BluetoothGattCharacteristic.FORMAT_UINT16;
            Log.d(TAG,"Heart Rate format UINT16.");
        }else{
            format = BluetoothGattCharacteristic.FORMAT_UINT8;
            Log.d(TAG,"Heart Rate format UINT8.");
        }
        heartRate = characteristic.getIntValue(format,1);
        Log.d(TAG,String.format("Received Heart Rate : %d",heartRate));
        intent.putExtra(EXTRA_DATA,String.valueOf(heartRate));
        saveDatabase();
     }
     ...
     sendBroadcast(intent);
 }
 private void saveDatabase(){
    dbHelper = new SaveDatabaseHelper(this,"data.db",null,1);
    dbHelper.getWritableDatabase();
    ContentValues values = new ContentValues();
    values.put("rate",heartRate);
    dbHelper.insert(values);
}

现在想在fragment中进行数据库的读取数据的操作,但是不太会,请教大神,在线等~

d broadcastUpdate(final String action,final BluetoothGattCharacteristic characteristic){
final Intent intent = new Intent(action);
if(UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())){
int flag = characteristic.getProperties();
int format = -1;
if((flag & 0x01)!= 0){
format = BluetoothGattCharacteristic.FORMAT_UINT16;
Log.d(TAG,"Heart Rate format UINT16.");
}else{
format = BluetoothGattCharacteristic.FORMAT_UINT8;
Log.d(TAG,"Heart Rate format UINT8.");
}