Skip to content

Complete Assignment 2: Logical Model and Advanced SQL#3

Open
andreero0 wants to merge 1 commit intomainfrom
assignment-two
Open

Complete Assignment 2: Logical Model and Advanced SQL#3
andreero0 wants to merge 1 commit intomainfrom
assignment-two

Conversation

@andreero0
Copy link
Copy Markdown
Owner

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

  • Completed Assignment 2 for the SQL course
  • Designed a logical model for a small bookstore
  • Created two Entity-Relationship Diagrams (ERDs)
  • Implemented advanced SQL queries covering:
    • COALESCE
    • Windowed Functions
    • String Manipulations
    • UNION
    • Cross Join
    • INSERT, DELETE, and UPDATE operations

What did you learn from the changes you have made?

  • Deepened understanding of logical data modeling
  • Learned about Slowly Changing Dimensions (Type 1 and Type 2)
  • Practiced advanced SQL techniques like windowed functions and string manipulations
  • Gained experience in designing relational database schemas

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

  • For the Customer Address table, I considered alternative approaches:
    1. A hybrid SCD approach that combines elements of Type 1 and Type 2
  • Using a separate historical tracking table instead of embedding history in the main table

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

  • Designing a logical model that balances simplicity and comprehensive information
  • Understanding the nuances between Type 1 and Type 2 Slowly Changing Dimensions
  • Implementing complex SQL queries, particularly windowed functions
  • Overcame challenges through careful research, iterative design, and consulting course materials

How were these changes tested?

  • Verified SQL queries in DB Browser for SQLite
  • Manually checked query results against expected outcomes
  • Reviewed ERDs for logical consistency
  • Ensured all assignment requirements were met

A reference to a related issue in your repository (if applicable)

Checklist

  • I can confirm that my changes are working as intended

- Added Entity-Relationship Diagrams
- Completed Assignment2.md with written responses
- Finished SQL queries in assignment2.sql
- Included farmersmarket.db
Copy link
Copy Markdown

@efantinatti efantinatti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear Eromosele Ikhalo

Session 1:
1 - OK.

Session 2:
2 - OK.

Session 3:
3 - Partial.
-- Cross Join - Q1: Query is almost correct. Check how you could group the results.

Final:
4 - All good and you can merge your feature branch 'assignment-two' to 'main'.

Mark: 68 points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants