Connecting to Main Database