tailieunhanh - FUNDAMENTALS OF DATABASE SYSTEMS Fourth Edition phần 4

Các ngữ nghĩa của hai lược đồ liên quan khác trong hình là hơi phức tạp hơn. Mỗi tuple trong DEPT_LOCATIONS cung cấp cho một số bộ phận (DNUMBER) và một trong những địa điểm của các bộ phận (DLOCATION). Mỗi tuple trong WORKS_ON cho một số nhân viên an ninh xã hội (SSN), | 296 Chapter 10 Functional Dependencies and Normalization for Relational Databases EMPLOYEE . ENAME SSN BDATE ADDRESS DNUMBER . DEPARTMENT DNAME DNUMBER DMGRSSN DEPT-LOCATIONS . DNUMBER DLOCATION . PROJECT . PNAME PNUMBER PLOCATION DNUM . WORKS-ON . . SSN PNUMBER HOURS . FIGURE A simplified COMPANY relational database schema. The semantics of the other two relation schemas in Figure are slightly more complex. Each tuple in DEPT_LOCATIONS gives a department number dnumber and one of the locations of the department dlocation . Each tuple in WORKS_ON gives an employee social security number ssn the project number of one of the projects that the employee works on pnumber and the number of hours per week that the employee works on that project hours . However both schemas have a well-defined and unambiguous interpretation. The schema DEPT_LOCATIONS represents a multivalued attribute of DEPARTMENT whereas WORKS_ON representsan M N relationship between EMPLOYEE and PROJECT. Hence all the relation schemas in Figure may be considered as easy to explain and hence good from the standpoint of having clear semantics. We can thus formulate the following informal design guideline. GUIDELINE 1. Design a relation schema so that it is easy to explain its meaning. Do not combine attributes from multiple entity types and relationship types into a single relation. Intuitively if a relation schema corresponds to one entity type or one relation- Informal Design Guidelines for Relation Schemas 297 EMPLOYEE ENAME SSN BDATE ADDRESS NUMBER Smith John B. 123456789 1965-01-09 731 Fondren Houston TX 5 Wong Franklin T. 333445555 1955-12-08 638 Voss Houston TX 5 Zelaya Alicia J. 999887777 1968-07-19 3321 Castle Spring TX 4 Wallace Jennifer s. 987654321 1941 -06-20 291 Berry Bellaire TX 4 Narayan Remesh K. 666884444 1962-09-15 975 Fire Oak Humble TX 5 English Joyce A. 453453453 1972-07-31 5631 Rice Houston TX 5 Jabbar Ahmad V. 987987987 1969-03-29 980

crossorigin="anonymous">
Đã 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.