To learn how to query the geodatabase in general, we need to learn about the workspaces that are the geodatabase connections. The workspace is used to establish a channel between the client and the geodatabase. Once this channel is established, the client can query, write, edit, and delete features in the geodatabase.
A workspace is a unique geodatabase connection established by the user in order to query or edit the geodatabase. A workspace can also refer to other data structures such as shape files, coverages, CAD files, and more. We will start this section by learning how to open a workspace from within the code. To create a workspace in ArcObjects, we require a workspace factory object. The workspace factory determines the type of workspace you want to create. For instance, in our case, we have a file geodatabase, so we will need a file geodatabase workspace factory.