Social relations and network identity: data extraction, models and query languages