Sunday 25 February 2018

SQL Training - 03

Identity Field:

  • Indexed 
  • No duplicate 
  • Auto Increment 
  • sorted
  • Indexed 

Side Effect of Identity Field:
  • Values cannot be changed 
  • Gaps 
Normalization:
  • we need it to prevent redundancy (Place are repeated)
  • To avoid repeated columns (Address, 2 , 3)
  • To avoid repeated rows 
  • Referential integrity (Relations to make full record)
  • Unity: each table must contains all related data
  • Atomic: each cell must be one value 
  • Dependency
  • To prevent orphan rows (customer without address or addresses without customers)
  • No Transitive 
- Use begin transaction and end transaction to execute more-than one sql statement 
- In One to many relations; you add in many table and after that you add in one table.
- In Addresses table; you can add email1, email2, phone1, phone2, telephone1, telephone2, fax1, fax2

SW Engineering:
  • Gathering info
    • Structured 
    • OO
      • Noun: classes
      • Verbs: functions
      • Each property in class is a field in DB
    • Structred
      • Verbs only 
  • UML classes
  • Class contains 
    • Class Members
      • Properties (Name, Age)
      • Methods  (Add, Delete)
      • Events(WhenDeleted, WhenAdded)
PrimMinister, Manager, Employee, Driver, Heads of Units, Drivers, Cleaners are Persons 
so the initial table is Person, 



No comments:

Post a Comment