Info Systems (Final Exam Slides) Flashcards
ERD
Entity Relationship Diagram- when we collect a picture, how the diagram is related to each other
Explains:
Entities, Attributes, and relationships
Entities
What are the nouns we are talking about for our business problem?
Attributes
What are the fields we want to capture for each instance of an entity?
Relationships
How are they related to other entities on the diagram?
Notation Stlyes
Crows Feet Circles Symbols
The point is to capture 1 to many relationships
There should never be a many to many relationship, as this can’t be handled in a relational database - instead use a mitigating table to capture the relationship as two different 1 to many relationships.
Normalization
KNOW:
Normalization
Normal form
Most people stop at third normal form- anything after that may be too much
Storage used to be very expensive, so reduced redundancy with normalization
Documentation
The whole point is that drawing pictures helps you talk through how you’re going to capture and use the data available. Just like writing software specifications is easier than writing software, the same is true with ERDs - easier to draw pictures than build tables and find out later you had an assumption wrong.
Documentation Helps At Multiple Points
Write software specifications
Create use cases from the user perspective
Draw ERD’s
Comment your code - SQL has options /* */
and two dashes - - for single line
Commenting Code - Standards
Be Clear and Concise: Use clear and concise language to explain the purpose of the code.
Comment Complex Logic: Comment on complex logic, algorithms, or non-obvious code sections.
Avoid Over-Commenting: Don’t comment on every line of code, especially for simple statements.
Use Consistent Formatting: Use consistent formatting for comments to improve readability.
Update Comments as Code Changes: Keep comments up-to-date as you modify the code.