Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
A database consists of tables and columns, as we describe in the preceding section. There are some other terms you need to know in order to understand how databases work. A database is built in two stages. First you create a logical data model to lay out the design of the database and how the data will be organized. | 12 Part I Basic PL SQL Concepts_ Table 1-5 A Sample Relational PURCH_ORDER_ DTL Table PO_Nbr Line_Nbr Item Qy Price 450 1 Hammer 1 10.00 451 1 Screwdriver 1 8.00 451 2 Pliers 2 6.50 451 3 Wrench 1 7.00 452 1 Wrench 3 7.00 452 2 Hammer 1 10.00 453 1 Pliers 1 6.50 A purchase order can include many items. Table 1-5 shows that Purchase Order 451 includes three separate items. The link foreign key between the tables is the Purchase Order Number. Understanding basic database terminology A database consists of tables and columns as we describe in the preceding section. There are some other terms you need to know in order to understand how databases work. A database is built in two stages. First you create a logical data model to lay out the design of the database and how the data will be organized. Then you implement the database according to the physical data model which sets up the actual tables and columns. Different terminology applies to the elements of the logical and physical designs. In addition relational database designers use different words from object-oriented OO database designers to describe the database elements. Table 1-6 shows the words used in each of these cases. Table 1-6 Database Design Terminology Logica Relational Logical Object-Oriented Physical Implementation Entity Class Table Attribute Attribute Column Instance Object Row Chapter 1 PL SQL and Your Database 13 The definitions of the words in Table 1-6 are as follows Entity An entity corresponds to something in the real world that is of interest and that you want to store information about. Examples of entities include things such as departments within an organization employees or sales. Each specific department or employee is considered an instance of that entity. For example in Table 1-3 Doug is an instance of the entity Employee. In the OO world Doug would be an object in the Employee class. Attribute This word is used in