feb 2nd makeup class
TRANSCRIPT
![Page 1: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/1.jpg)
This 2nd VoiceThread is to makeup for the missed
Feb. 2nd class
Topic: Database Design
By: George Saban
![Page 2: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/2.jpg)
Intro to Database• Binary Digits = bits• US statistician John Tukey invents the term "bit" (binary digit, 0 or 1) for the
smallest element of information to describe a two-state system.
![Page 3: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/3.jpg)
What is a Database?
![Page 4: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/4.jpg)
From bits to Database
![Page 5: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/5.jpg)
The Cabinet Analogy
![Page 6: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/6.jpg)
Pros and Cons of DBMS• Advantages of database processing
• Getting more information from the same amount of data.• Sharing data.• Balancing conflicting requirements.• Controlling redundancy.• Facilitating consistency.• Improving integrity.• Expanding security.• Increasing productivity.• Providing data independence.
• Disadvantages of database processing • Larger file size.• Increased complexity.• Greater impact of failure.• More difficult recovery.
![Page 7: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/7.jpg)
Types of Databases
• 1. Hierarchical• 2. Network• 3. Relational *• 4. OO DB• 5. Hybrid
![Page 8: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/8.jpg)
Relational Database (RDBMS)
• A collection of interrelated tables.
• Types of Relationships: (next slides)
![Page 9: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/9.jpg)
Types of Relationships
• One-to-one relationship
![Page 10: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/10.jpg)
Types of Relationships
• One-to-many relationship
![Page 11: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/11.jpg)
Types of Relationships• Many-to-many relationship
![Page 12: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/12.jpg)
So What?
• Smallest unit of data• Relationship between a record and an object
![Page 13: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/13.jpg)
The Request/Response Cycle
![Page 14: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/14.jpg)
The Big Picture: Business Process Model
![Page 15: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/15.jpg)
Types of Keys• Primary key – is an attribute or set of attributes that will uniquely identify records
in a table. Example: social-security number, driver license, employee-ID, unique sequence number, etc.
• Secondary key – a non-key field that could potentially be used as the primary key. Example: product-ID, UPC-code, etc. This is similar to an alternate key.
• Alternate key – a non-key field that could potentially be used as the primary key. Example: product-ID, UPC-code, etc. This is similar to a secondary key.
• Candidate key – the same as secondary key and alternate key.• Foreign key – it is a non-key field in a table but is actually a primary key of another
table. It exists as a link (to maintain relation) between the two tables.• Non-primary key or non-prime attribute – is an attribute or attributes that is
neither a primary key nor a candidate key. Example: first name, address, etc.• Combination key – is a primary key made up of multiple keys. Example: StudentID
+ lastname + firstname.
![Page 16: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/16.jpg)
The Normalization Process• Step I: Write down all the fields needed to support your application.• Step II: Think if these fields repeat or not. And eliminate fields that can be calculated.• Step III: Yank out fields that repeat and store it in a separate table and leave those fields that
does not repeat into this existing table. Group similar fields into a table.• Step IV: Select the primary key field(s) for each table. And underline the primary key field
(PK).• Step V: Normalize the table by putting the database in first normal form (or 1NF). Meaning,
tables should have no repeating fields.• Step VI: Continue normalization process by putting the database in second normalized form
(or 2NF). Meaning, all non-key fields on a table should be dependent on the entire primary key fields and not just part of it. The table should be already in 1NF and the primary key field should be a combination key field.
• Step VII: Continue normalization process by putting the database in its third normalized form (or 3NF). Meaning, all non-key fields should not be dependent on another non-key field. The table should be already in 2NF.
• Step VIII: Assign names to these tables. • Step IX: Draw table relationships, also called entity relationship diagram (ERD).
![Page 17: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/17.jpg)
Entity Relationship Diagram (ERD)
• Note the interrelationships of tables: a database.• When asked to
draw/design a DB—draw an ERD.
![Page 18: Feb 2nd Makeup Class](https://reader031.vdocuments.mx/reader031/viewer/2022032618/55b73338bb61eb432c8b47d8/html5/thumbnails/18.jpg)
Thank You!
• Thank you for your patience and for being flexible in making up the missed classes.• Comment in as many slides to earn full credit for Week #6.• Please make sure you digested all the artifacts posted in Canvas under
Week #6.• Complete also the deliverable for the week.• I hope to see you on Week #7 to have a conversation regarding
development strategies.