Để xem danh sách các mối quan hệ đang tồn tại trên bảng OrdersProducts, chọn lựa chọn mối quan hệ thả xuống ở phía trên cùng của mối quan hệ thoại để xem tất cả những quy định hiện hành: Chú ý rằng cả hai mối quan hệ chúng ta đã tạo xuất hiện trong danh sách thả xuống. | Chapter 5 A Brief Introduction to Before we can begin creating our application we need to learn about some basic components of and wizards that our application is to use. We will go into greater detail on in the next chapter so for now we ll learn just enough to get us through this simple database project. provides us with a way of gathering data and information and presenting it through a user interface. By using some components we re able to connect to various data sources and can then build a user interface that accesses a database. We need four pieces to build our project 1. A data source - where the actual data is stored our database. 2. A Connection object - for connecting us to our database. 3. A DataAdapter object - to provide a mechanism for reading and writing data to the database. 4. A DataSet object - this will contain the table s that we will use. The following figure shows how all these pieces tie together. Firstly we need a connection to the data source provided by a Connection object. The Connection object requires certain information for it to connect to the data source. The Connection object is called by the DataAdapter object which handles commands to select update insert and delete data in the data source. Finally we have a DataSet that contains our tables and which uses the DataAdapter to populate itself and to update information in the data source. 4 The User Interface for the Database We will now cover these components in a bit more detail taking each of the data source Connection DataAdapter and DataSet in turn. The Data Source A data source is the term used to describe any collection of information that can provide data to us. It can take the form of a database an XML document a Microsoft Excel spreadsheet or even a flat text or binary file. It only takes one or two lines of code for us to change the kind of data source that we connect to. The Windows environment provides us a shared set of classes .