public void joinUserInChannel(ChatChannel chatChannel, User user){
		try{
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
			String url = "jdbc:derby:" + DBName;
			Connection connection = DriverManager.getConnection(url);
			Statement statement = connection.createStatement();
			
			String selectUserFromChannel = "SELECT * FROM USERCHATRELATIONS WHERE userID =" + user.getID() + " "
										+ "AND channelID = " + chatChannel.getChannelID();
			
			ResultSet rs = statement.executeQuery(selectUserFromChannel);
			
			if(!rs.next()){
				String joinUserInChannelUpdate = "INSERT INTO USERCHATRELATIONS (userID, channelID, relationshiptype) "
												+ "VALUES (" + user.getID() + ", " + chatChannel.getChannelID() +", (SELECT ucrtID FROM UserChannelRelationshipTypes WHERE rtype = 'online' ))";

				statement.executeUpdate(joinUserInChannelUpdate);
			}
			statement.close();
			connection.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}