Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Database Modeling & Design Fourth Edition- P23: Database technology has evolved rapidly in the three decades since the rise and eventual dominance of relational database systems. While many specialized database systems (object-oriented, spatial, multimedia, etc.) have found substantial user communities in the science and engineering fields, relational systems remain the dominant database technology for business enterprises. | 5.1 Transformation Rules and SQL Constructs 97 Technician 1 A technician uses exactly one notebook for each project. Each notebook belongs to one technician for each project. Note that a technician may still work on many projects and maintain different notebooks for different projects. Project 1 1 Notebook uses-notebook create table technician emp_id char 10 primary key emp_id create table project project_name char 20 primary key project_name create table notebook notebook_no integer primary key notebook_no create table uses_notebook emp_id char 10 project_name char 20 notebook_no integer not null primary key emp_id project_name foreign key emp_id references technician on delete cascade on update cascade foreign key project_name references project on delete cascade on update cascade foreign key notebook_no references notebook on delete cascade on update cascade unique emp_id notebook_no unique project_name notebook_no uses_notebook emp_id project_name notebook_no 35 alpha 5001 35 gamma 2008 42 delta 1004 42 epsilon 3005 81 gamma 1007 93 alpha 1009 93 beta 5001 a one-to-one-to-one ternary association Functional dependencies emp_id project_name notebook_no emp_id notebook_no project_name project_name notebook_no emp_id Figure 5.6 UML ternary and n-ary relationships 98 CHAPTER 5 Transforming the Conceptual Data Model to SQL Employee Each employee assigned to a project works at only one location for that project but can be at a different location for a different project. At a given location an employee works on only one project. At a particular location there can be many employees assigned to a given project. create table employee emp_id char 10 emp_name char 20 primary key emp_id create table project project_name char 20 primary key project_name create table location loc_name char 15 primary key loc_name create table assigned_to emp_id char 10 project_name char 20 loc_name char 15 not null primary key emp_id project_name foreign key emp_id references employee on .