TAILIEUCHUNG - Databases Demystified- P2

Tham khảo tài liệu 'databases demystified- p2', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Databases Demystified One-to-Many Relationships A one-to-many relationship is an association between two entities where any instance of the first entity may be associated with one or more instances of the second and any instance of the second entity may be associated with at most one instance of the first. Figure 2-1 shown earlier in this chapter has two such relationships the one between the Customer and Order entities and the one between the Employee and Order entities. The relationship between Customer and Order which is mandatory in only one direction is read as follows At any point in time each customer can have zero to many orders and each order must have one and only one owning customer. One-to-many relationships are quite common. In fact they are the fundamental building block of the relational database model in that all relationships in a relational database are implemented as if they are one-to-many. It is rare for them to be optional on the one side and even more rare for them to be mandatory on the many side but these situations do happen. Consider the examples shown in Figure 2-3. When a customer account closes we record the reason it was closed using an account closure reason code. Because some accounts are open at any point in time this is an optional code. We read the relationship this way At any given point in time each account closure reason code value can have zero one or many customers assigned to it and each customer can have either zero or one account closure reason code assigned to them. Let us next suppose that as a matter of company policy no customer account can be opened without first obtaining a credit report and that all credit reports are kept in the database meaning that any customer may have more than one credit report in the database. This makes the relationship between the Customer and Credit Report entities one-to-many and mandatory in both directions. We read the relationship thus At any given point in time each customer can have

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.