When the distribution of the data in the two tables, for example, it needs to be a relationship between them so that you can access to a portion of the information and completion of the other through this relationship. To find or create a relationship between two tables, we use two keys are the primary key (Primary Key) and foreign key (Foreign Key). The primary key (Primary Key) is a field that contains the data is not repeated within the table, eg each record from the Customer table on the complete data for a particular client, it is appropriate that we use the field "customer number" because it will not be repeated in the table and be the key Basic or Primary Key for the table. Foreign key (Foreign Key) is the field of the chart-related and usually metal table do not have the linked table in need of it, but his presence is necessary to link this table with the base table. Includes the following figure on the box "relationships" and it shows that the relationship between the customer table (Customers) and the Orders table (Order) was established on the basis of field data customer number (Customer_ID), and displayed as site primary key and foreign key site.
[IMG] http://www. *** .com / Vb / / uploaded/6_1242155551.jpg [/ IMG] The customer number (Customer_ID) within the Customer table Customers primary key while the customer number in the orders table is a foreign key Orders not the subject of the application, but the Orders table in need of it in order to be connected with the customer table so that you can understand metal table that these requests will be delivered to the customer number as well as the data is located in the Customers table, and it can define foreign keys as a field used in a records schedule ( In the previous example is a table of applications - a repeatable) to refer to only one record exists in another table (in the previous example metal table is the customer table). Types of correlations can be linked to two tables if it includes both a field or more by the same data, and are usually called metal table fields in both tables with the same name. Such as customer number in the table of customer data and customer number in the orders table. You can create three types of relationships: the relationship is one-to-one, and the relationship of one against the group, and the relationship of group versus group, and explain Below is the difference between these types of relationships. Relationship versus one group (One-to-Many) metal table This relationship is sometimes called the "correlation-many" metal table relationship and its meaning is also one against the group which is most commonly used. Means that a single record in the data table (called main table Primary Table) more than offset by the record in another table (called a linked table Related Table). For example, the database Sales are recorded each invoice in one record metal table in a table totals bills, and recorded the details of this bill in one or more records in a table, "the metal table details of the bills," therefore corresponds to each record (data bill) in the table of totals "bills" record or above (the details of the bill ) on the agenda, "the details of the bills." Relationship and one met-for-one metal table (One-to-One) is sometimes called the relationship "is a relationship-one" and this type of relationship is less commonly used than the former type, in which each record in the main table offset one record in the table associated with it. One example is using a relationship one-on-one, when you want to separate the client information to the data public and private, for example, can put general information about the customer such as name and address in the main table and put other information metal table about the customer, such as the balance of the debtor or creditor in the child table. Relationship set against a set (Many-to-Many) sometimes called the relationship "has been associated with the parties to the parties to the relationship." This type of relationship is also rare to use and which corresponds to each record of the main table several metal table records in the related table, and corresponds to one record metal table in the related metal table table several records in the main table. One example is in the database, metal table which includes a table of products and a table for purchase orders, can be matched record per table of purchase orders more than one record in the products table, on the other hand it is possible that the product shows one of several requests and thus can find each record Products table in more than one record in a table of purchase orders. This type of relationship is complex and needs to be familiar enough programming because it could cause a problem unless intervene to link the two tables indirectly metal table is to create a third table works on retail correlation group versus group to Alaqtin of one type versus a group, metal table in this case put the keys key for both tables in Table III. Example .. correlation between the table "Customers Customers", and "table varieties Items" relationship (Group versus metal table group), any client can buy any item, and vice versa, any class can be sold to any customer. To overcome metal table this problem, which has caused great difficulty in the design, are fragmented relationship "group versus group" to Alaqtin kind of "one against the group" with the addition of a third table is a table "applications Orders" and thus become the relationship between each table and the table that deals with the relationship "One against the group." See the following picture of my brother and it concludes that the Orders table can contain more than one class can also contain more than one client.
2011 (23) December (1) Dis 16 (1) November (21) Nov 17 (2) Nov 16 (16) how to put a database CDS / ISIS on compact disc libraries at the heart of the Arab Information Society metal table Hope in the institutions ... of digital metal table computer-based in our world ... the definitions are important in information technology (concepts and the ... data mining entrance to distributed databases aware of the tastiest
No comments:
Post a Comment