[Database] Four Paradigms

prerequisite knowledge


  • What is a keycode?
    If an attribute or a set of multiple attributes {A,B,C,D….} satisfies the following conditions, it is called the key code of the relation R.
  • These property functions determine all other properties of the relationship.
  • No proper subset of A,B,C,D….} can functionally determine other properties of R, that is, {A,B,C,D….} must be minimal.

  • What is the main attribute?
    The property where the key code is located becomes the primary property.

  • What is a non-primary attribute?
    Properties that are not key codes are called non-primary properties.

    Example:
    write picture description here
    For example, in the above figure, Snosum Cnameis the main attribute, and the others are non-main attributes. {Sno,Cname}for the key code.




four paradigms


  • first normal form

If a relational schema is in 所有属性都是不可分割的基本属性the first normal form

  • second normal form

If a relational schema is in first normal form, where 所有非主属性都完全函数依赖于键码, is in second normal form

  • third normal form

If a relational schema is in first normal form, where 所有非主属性都不传递依赖于键码, is in third normal form

  • BC paradigm

If a relational schema is in first normal form, where 所有属性都不传递依赖于键码, is in BC normal form

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324688802&siteId=291194637