public static List<String> synthesizeInsertIntoQueries(DeviceObservationData observationData) {
		List<String> queries = new ArrayList<String>();
		String devicename = observationData.getDeviceName();
		String uuid = observationData.getSensorUUID();
		
		devicename = devicename.replaceAll("-", "");
		StringBuilder queryPrefix = new StringBuilder("INSERT INTO " + devicename + " (sensor_id, event_time");
		DeviceDataType dataType = observationData.getDataType();
		
		Map<String, List<String>> members = dataType.getMembers();
		Map<String, List<Type>> dTypes = dataType.getTypes();
		for (String sensor : dTypes.keySet()) {
			List<String> readings = members.get(sensor);
			for (String reading : readings) {
				String columnName = sensor;
				if(reading != null && reading.trim().length() != 0)
					columnName = sensor + "_" +  reading;
				queryPrefix.append(", " + columnName);
			}
			
		}
		queryPrefix.replace(queryPrefix.length()-1, queryPrefix.length()-1, "");
		queryPrefix.append(") VALUES (");
		
		Map<String, SensorObservationData> data = observationData.getObservationValues();
		
		for (String sensor : dTypes.keySet()) {
			
			SensorObservationData sensorObservationData = data.get(sensor.toLowerCase());
			List<Pair<Long, List<Object>>> sensordata = sensorObservationData.getSensorData();
			for (Pair<Long, List<Object>> pair : sensordata) {
				StringBuilder query = new StringBuilder(queryPrefix);
				
				List<Object> observations = pair.getValue();
				query.append("'" + sensor + "', " + pair.getKey()); 
				
				for (Object object : observations) {
					if(dTypes.get(sensor).get(observations.indexOf(object)) == Type.TEXT)
						query.append( ", '" + object + "'");
					else if (dTypes.get(sensor).get(observations.indexOf(object)) == Type.DOUBLE)
						query.append("," + (Double)object);
					else{
						double n = (Double) object;
						query.append("," + (int)n);
					}
					
				}
				query.replace(query.length()-1, query.length()-1, "");
				query.append(")");
				queries.add(query.toString());
				
			}
		}
		
		return queries;
	}