Analysis of real questions for system architects (4)-database model and paradigm

Analysis of real questions for system architects (4)-database model and paradigm

1 Analysis of the real question

Commodity relationship model P (commodity code, product name, supplier, contact information, inventory quantity) of a shopping mall s commodity database, functional dependency set F={commodity code product name, (commodity code, supplier) inventory, Supplier Contact Information}. The commodity relationship model P reaches (7); the relationship model is decomposed into (8) and has the characteristics of lossless connection and can maintain functional dependence.

(7) A. 1NF B. 2NF C. 3NF D. BCNF

(8) A.P1 (commodity code, contact information), P2 (commodity name, supplier, inventory) B.P1 (commodity name, contact information), P2 (commodity code, supplier, inventory) C.P1 (Commodity code, product name, contact information), P2 (supplier, inventory) D.P1 (commodity code, product name), P2 (commodity code, supplier, inventory), P3 (supplier, contact information)

P (commodity code, product name, supplier, contact information, inventory), functional dependency set F={commodity code product name, (commodity code, supplier) inventory, supplier contact information}, specify the product The primary key of the relational pattern P is (product code, supplier).

Look at the option (7), indicating that the relationship model may have reached 1NF and above. According to the definition of 2NF, all non-primary attributes must be completely dependent on the primary attributes. The product code product name, that is, the product name only partially depends on the product code in the main attribute. So it can only be 1NF.

Relational model decomposition, that is, decomposition according to the functional dependency set F, is lossless connection. The functional dependency set F and the option D have a one-to-one correspondence.

Answer : (7) A (8) D

2 Involving knowledge points

  1. 4.relational paradigms.
  2. Lossless connection characteristics.

Reference material: database model and paradigm