5_Database Creation Concepts

Embed Size (px)

Citation preview

  • 7/25/2019 5_Database Creation Concepts

    1/12

    DATABASE

    CREATIONCONCEPTS

    RAYMOND S. BERMUDEZ

    Instructor, College of Computer Studies - MSEUF

    LESSON 4

  • 7/25/2019 5_Database Creation Concepts

    2/12

    BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    rg&ni(ing "&t&

    Your )rst step in org&ni(ing d&t& is toidentif' t*e indi+idu&l felds*e speci)c +&lue, or content, of & )eld

    is c&lled t*e feld valueA set of )eld +&lues is c&lled & record

    !et, 'ou group rel&ted )elds toget*erinto tables

  • 7/25/2019 5_Database Creation Concepts

    3/12

    BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    Rel&tions*ips

    A collection of rel&ted t&les isc&lled & relato!al database

    You connect t*e records in t*e

    sep&r&te t&les t*roug* & co""o!feld

    A #r"ar$ %e$ is & )eld, or &collection of )elds, /*ose +&lues

    uni0uel' identif' e&c* record in &t&le

    1*en 'ou include t*e prim&r' 2e'

    from one t&le &s & )eld in & secondt&le to form & rel&tions*i et/een

  • 7/25/2019 5_Database Creation Concepts

    4/12

    BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    Rel&tions*ips

  • 7/25/2019 5_Database Creation Concepts

    5/12

    BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    Rel&tion&l "&t&&seM&n&gement S'stemsA database "a!a'e"e!t s$ste"

    (DBMS) is & soft/&re progr&m t*&t lets'ou cre&te d&t&&ses &nd t*enm&nipul&te d&t& in t*em

    In & relato!al database"a!a'e"e!t s$ste", d&t& isorg&ni(ed &s & collection of t&les

  • 7/25/2019 5_Database Creation Concepts

    6/12

    BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    3uidelines for "esigning"&t&&sesIdentif' &ll t*e )elds needed to produce

    t*e re0uired inform&tionrg&ni(e e&c* piece of d&t& into its

    sm&llest useful p&rt3roup rel&ted )elds into t&les"etermine e&c* t&le4s prim&r' 2e'Include & common )eld in rel&ted

    t&lesA+oid d&t& redund&nc'"etermine t*e properties of e&c* )eld

  • 7/25/2019 5_Database Creation Concepts

    7/12BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    Tra!sact*S+, 5S6% in MS S6% Ser+er7889 is +er' ;eile /*en it comes ton&mes. In f&ct, it is +er' less restricti+et*&n most ot*er computer l&ngu&ges.Still, t*ere &re rules 'ou must follo//*en n&ming & d&t&&se:

    A n&me c&n st&rt /it* eit*er & letter 5&,, c, d, e, f, g, *, i,

  • 7/25/2019 5_Database Creation Concepts

    8/12BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    After t*e )rst c*&r&cter 5letter, digit,underscore, or s'mol, t*e n&me c&n*&+e comin&tions of underscores,letters, digits, or s'mols. E&mples &re-!23or act-42-t

    A n&me c&n include sp&ces. E&mple

    &re c5u!tres st6ts, 'ov"!t(records), or 'l5b7 8urve$99

    "&t&&se

  • 7/25/2019 5_Database Creation Concepts

    9/12BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    RECMME!"E"

    Unless st&ted ot*er/ise 5/e /illmention t*e eceptions, for e&mple

    /it* +&ri&les, t&les, etc, & n&me /illst&rt /it* eit*er & letter 5&, , c, d, e, f,g, *, i,

  • 7/25/2019 5_Database Creation Concepts

    10/12BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    A n&me /ill not st&rt /it* t/ounderscores

    If t*e n&me is & comin&tion of /ords,

    &t le&st t*e second /ord /ill st&rt inupperc&se. E&mples &re Cou!tresStatstcs, :lobal Surve$,-RealS#ort, ;ullNa"e, orDrvers,ce!seNu"ber

    After cre&ting &n o

  • 7/25/2019 5_Database Creation Concepts

    11/12BY: Mr. RAYM!" S. BERMU"E#, - Instructor, College of Computer Studies, MSEUF $ %ucen& Cit'

    CREATE DATABASEDatabaseName

    *e CREATE DATABASEepression isre0uired. *e DatabaseNamef&ctor is t*en&me t*&t t*e ne/ d&t&&se /ill *&+e.

    Alt*oug* S6% is not c&se-sensiti+e, 'ou

    s*ould m&2e it & *&it to e &/&re of t*ec&ses 'ou use to n&me 'our o

  • 7/25/2019 5_Database Creation Concepts

    12/12

    DATABASE

    CREATIONCONCEPTS

    RAYMOND S. BERMUDEZ

    Instructor, College of Computer Studies - MSEUF

    LESSON 4