4.1.2 Perancangan Basis Data Logikal
4.1.2.2 Bentuk Tabel atau Relasi untuk Model Data Logikal
4.1.2.2.9 Atribut multi-value
Pada hubungan multi-value dibuat untuk menggambarkan hubungan dan termasuk beberapa atribut yang merupakan bagian dari relasi. Primary key pada entitas merupakan foreign key pada hubungan entitas yang baru.
Hubungan Employee Memiliki EmployeePhone
Employee_ID di-post ke dalam EmployeePhone sebagai Foreign key
Employee (Employee_ID, Password,
Employee_Name, Position, Gender, Enter_date, Address, Image, Status)
Primary Key Employee_ID
EmployeePhone (Employee_ID, Phone) Primary Key Phone, Employee_ID Foreign Key Employee_ID references
Employee (Employee_ID)
Hubungan Employee Memiliki EmployeeEmail
Employee_ID di-post ke dalam EmployeeEmail sebagai Foreign key
Employee (Employee_ID, Password,
Employee_Name, Position, Gender, Enter_date, Address, Image, Status)
Primary Key Employee_ID
EmployeeEmail (Employee_ID, Email) Primary Key Email, Employee_ID Foreign Key Employee_ID references
Employee (Employee_ID)
Hubungan S ubKon Memiliki S ubKonEmail
SubKon (SubKon_ID, SubKon_Name,
Address)
Primary Key SubKon_ID
SubKonEmail (SubKon_ID, Email) Primary Key SubKon_ID, Email Foreign Key SubKon_ID references
SubKon (SubKon_ID)
Hubungan S ubKon Memiliki S ubKonPhone
SubKon_ID di-post ke dalam SubKonPhone sebagai Foreign key
SubKon (SubKon_ID, SubKon_Name,
Address)
Primary Key SubKon_ID
SubKonPhone (SubKon_ID,
Phone)
Primary Key SubKon_ID, Phone Foreign Key SubKon_ID
references SubKon (SubKon_ID)
Hubungan S ubKon Memiliki S ubKonFax
SubKon_ID di-post ke dalam SubKonFax sebagai Foreign key
SubKon (SubKon_ID, SubKon_Name,
Address)
Primary Key SubKon_ID
SubKonFax (SubKon_ID, Fax) Primary Key SubKon_ID, Fax Foreign Key SubKon_ID
Hubungan S ubKon Memiliki S ubKonEMP
SubKon_ID di-post ke dalam SubKonEMP sebagai Foreign key
SubKon (SubKon_ID, SubKon_Name,
Address)
Primary Key SubKon_ID
SubKonEMP (SubKon_ID,
SubKon_EM P_Name)
Primary Key SubKon_ID,
SubKon_EM P_Name
Foreign Key SubKon_ID
references SubKon (SubKon_ID)
Hubungan Client Memiliki ClientEmail
Client_ID di-post ke dalam ClientEmail sebagai Foreign key
Client (Client_ID, Client_Name, Address) Primary Key Client_ID
ClientEmail (Client_ID, Email) Primary Key Client_ID, Email Foreign Key Client_ID references
Hubungan Client Memiliki ClientPhone
Client_ID di-post ke dalam ClientPhone sebagai Foreign key
Client (Client_ID, Client_Name, Address) Primary Key Client_ID
ClientPhone (Client_ID, Phone) Primary Key Client_ID, Phone Foreign Key Client_ID references
Client (Client_ID)
Hubungan Client Memiliki ClientFax
Client_ID di-post ke dalam ClientFax sebagai Foreign key
Client (Client_ID, Client_Name, Address) Primary Key Client_ID
ClientFax (Client_ID, Fax) Primary Key Client_ID, Fax Foreign Key Client_ID references
Client (Client_ID)
Hubungan BOQ Memiliki BOQFile
BOQ (BOQ_ID, Employee_ID, BOQ_Date,
Tower, Wide_Area, Wide_Site, Price, Revision, Information)
Primary Key BOQ_ID
Foreign key Employee_ID references
Employee(Employee_ID)
BOQFile (BOQ_File, BOQ_ID,
BOQ_File_Date, Shop_Drawing_File)
Primary Key BOQ_ID, BOQ_File Foreign Key BOQ_ID references
BOQ (BOQ_ID)
Hubungan Invoice memiliki InvoiceDescription
Invoice_ID di-post ke dalam InvoiceDescription sebagai Foreign key
Invoice (Invoice_ID, Employee_ID,
Invoice_Date, Invoice_Due_Date, Revision, Information)
Primary Key Invoice_ID
Foreign Key Employee_ID references
Employee (Employee _ID)
InvoiceDescription (Invoice_ID,
Description, QTY, Price)
Primary Key Invoice_ID,
Description
Foreign Key Invoice_ID
references Invoice (Invoice_ID)
Hubungan Invoice memiliki InvoiceFile
Invoice (Invoice_ID, Employee_ID,
Invoice_Date, Invoice_Due_Date, Revision, Information)
Primary Key Invoice_ID
Foreign Key Employee_ID references
Employee (Employee _ID)
InvoiceFile (Invoice_ID,
Invoice_File, Invoice_File_Date)
Primary Key Invoice_ID,
Invoice_File
Foreign Key Invoice_ID
references Invoice (Invoice_ID)
Hubungan S PK Memiliki S PKFile
SPK_ID di-post ke dalam SPKFile sebagai Foreign key
S PK (SPK_ID, SubKon_ID, Employee_ID,
SPK_Date, Job, Specification, TO_Implement, Pay_System, Price, Representative, Revision, Information)
Primary Key SPK_ID
Foreign Key SubKon_ID references
SubKon (SubKon_ID)
Foreign Key Employee_ID references
Employee (Employee _ID)
S PKFile (SPK_File, SPK_ID,
SPK_File_Date)
Primary Key SPK_File, SPK_ID Foreign Key SPK_ID references SPK
Hasil Relasi
BOQ BOQ_ID, Employee_ID, BOQ_Date, Tower, Wide_Area, Wide_Site, Price, Revision, Information
Primary Key BOQ_ID
Foreign key Employee_ID references Employee
(Employee_ID)
BOQDetail BOQ_ID, M aterial_ID
Primary Key BOQ_ID, M aterial_ID
Foreign key BOQ_ID references BOQ (BOQ_ID) Foreign key M aterial_ID references BOQ (M aterial_ID)
BOQFile BOQ_File, BOQ_ID, BOQ_File_Date, Shop_Drawing_File
Primary Key BOQ_ID, BOQ_File
Foreign Key BOQ_ID references BOQ (BOQ_ID)
Client Client_ID, Client_Name, Address
Primary Key Client_ID
ClientEmail Client_ID, Email
Primary Key Client_ID, Email
Foreign Key Client_ID references Client (Client_ID)
ClientFax Client_ID, Fax
Primary Key Client_ID, Fax
Foreign Key Client_ID references Client (Client_ID)
ClientPhone Client_ID, Phone
Primary Key Client_ID, Phone
Foreign Key Client_ID references Client (Client_ID)
Employee Employee_ID, Password, Employee_Name, Position, Gender, Enter_date, Address, Image, Status
Primary Key Employee_ID EmployeeEmail Employee_ID, Email
Primary Key Employee_ID, Email
Foreign Key Employee_ID references Employee
(Employee_ID)
EmployeePhone Employee_ID, Phone
Primary Key Employee_ID, Phone
(Employee_ID)
Invoice Invoice_ID, Employee_ID, Invoice_Date, Invoice_Due_Date, Revision, Information
Primary Key Invoice_ID
Foreign Key Employee_ID references Employee (Employee
_ID)
InvoiceDescription Invoice_ID, Description, QTY, Price
Primary Key Invoice_ID, Description
Foreign Key Invoice_ID references Invoice (Invoice_ID) InvoiceFile Invoice_ID, Invoice_File, Invoice_File_Date
Primary Key Invoice_ID, Invoice_File
Foreign Key Invoice_ID references Invoice (Invoice_ID) Material M aterial_ID, M aterial_Name, QTY, Type
Primary key M aterial_ID
Message M essage_ID, Employee_ID, M essage_Date, Subject, Sender, Content, File, Status
Primary Key M essage_ID
Foreign Key Employee_ID references Employee (Employee
_ID)
PO PO_ID, Employee_ID, Client_ID, PO_Name, PO_Date, PO_Date_Printed, Contract, TO_Payment, Start_Date, Finish_Date, PO_File, Status, Information
Primary Key PO_ID
Foreign Key Client_ID references Client (Client_ID) Foreign Key Employee_ID references Employee
(Employee_ID)
Progress Activity
Primary Key Activity
Project Site_ID, PO_ID, Employee_ID, Site_Name, Project_Name, Area, Address, Province, SOW, QTY, Price, Ttk_Koor_N, Ttk_Koor_E, Information
Primary Key Site_ID, SOW
Foreign Key PO_ID references PO (PO _ID)
Foreign Key Employee_ID references Employee (Employee
S PK SPK_ID, SubKon_ID, Employee_ID, SPK_Date, Job, Specification, TO_Implement, Pay_System, Price, Representative, Revision, Information
Primary Key SPK_ID
Foreign Key SubKon_ID references SubKon (SubKon_ID) Foreign Key Employee_ID references Employee (Employee
_ID)
S PKFile SPK_File, SPK_ID, SPK_File_Date
Primary Key SPK_File, SPK_ID
Foreign Key SPK _ID references SPK (SPK _ID)
SubKon SubKon_ID, SubKon_Name, Address
Primary Key SubKon_ID
SubKonEmail SubKon_ID, Email
Primary Key SubKon _ID, Email
Foreign Key SubKon _ID references SubKon (SubKon _ID)
SubKonFax SubKon_ID, Fax
Primary Key SubKon _ID, Fax
Foreign Key SubKon _ID references SubKon (SubKon _ID)
SubKonPhone SubKon_ID, Phone
Primary Key SubKon _ID, Phone
Foreign Key SubKon _ID references SubKon (SubKon _ID)
SubKonEMP SubKon_ID, SubKon_EM P_Name
Primary Key SubKon_ID, SubKon_EM P_Name
Foreign Key SubKon_ID references SubKon (SubKon_ID) TransProjectS PK SPK_ID, Site_ID, SOW
Primary Key SPK_ID, Site_ID, SOW
Foreign Key SPK_ID references SPK (SPK_ID) Foreign Key Site _ID references Project (Site_ID) Foreign Key SOW references Project (SOW) TransProjectInvoice Invoice_ID, Site_ID, SOW
Primary Key Invoice_ID, Site_ID, SOW
Foreign Key Invoice_ID references Invoice (Invoice_ID) Foreign Key Site _ID references Project (Site_ID) Foreign Key SOW references Project (SOW)
TransProjectProgress Activity, Site_ID, SOW, Start_Date_P, Finish_Date_P,
Start_Date_A, Finish_Date_A, Percent, Remark
Primary Key Activity, Site_ID, SOW
Foreign Key Activity references Progress (Activity) Foreign Key Site _ID references Project (Site_ID) Foreign Key SOW references Project (SOW) TransProjectBOQ BOQ_ID, Site_ID, SOW
Primary Key BOQ_ID, Site_ID, SOW
Foreign Key BOQ_ID references BOQ (BOQ_ID) Foreign Key Site _ID references Project (Site_ID) Foreign Key SOW references Project (SOW) Tabel 4.16 Tabel Hasil Relasi