Buổi 7/10

    Mối quan hệ giữa bảng & Normal Form

    180 phút
    Thực hành: 0/12 bài
    📊 Xem sơ đồ dữ liệu mẫu (dùng trong mọi buổi)
    Sơ đồ dữ liệu mẫu của khóa học (chứng khoán)
    1n1n1n1n1n1n1n1n111nCustomerscustomer_idPKcustomer_codefull_namecustomer_typecitystatusreferrer_idFKAccountsaccount_idPKcustomer_idFKaccount_noaccount_typebalancestatusOrdersorder_idPKaccount_idFKsymbolFKsidequantitypriceorder_datestatusTradestrade_idPKorder_idFKsymbolFKquantitypricetrade_dateCustomerStatscustomer_idPK,FKtotal_trade_valuetrade_countPortfolioaccount_idPK,FKsymbolPK,FKquantityavg_costSecuritiessymbolPKcompany_nameexchangesectorMarketPricessymbolPK,FKtrade_datePKclose_pricevolumeAuditLoglog_idPKcustomer_idold_statusnew_statuschanged_at

    PK = khóa chính, FK = khóa ngoài. Đường nối: 1 ở phía bảng 'một', n ở phía bảng 'nhiều'. Đường nét đứt: liên hệ logic (không khai báo FK). Quan hệ n–n giữa Accounts và Securities đi qua bảng Portfolio.