From 53fe875209ddf89a0783210ce6672a9d9cc6ffaf Mon Sep 17 00:00:00 2001 From: sberhe Date: Wed, 5 Feb 2025 06:55:10 -0800 Subject: [PATCH] add interfaces slides --- dms/index.html | 257 ++++++++++++++++++++++++++++++++++++- dms/templates/flowers.html | 6 +- 2 files changed, 255 insertions(+), 8 deletions(-) diff --git a/dms/index.html b/dms/index.html index 6f92425..f79d1f2 100644 --- a/dms/index.html +++ b/dms/index.html @@ -3203,7 +3203,9 @@
What is a Admin Tool Interface?
Today: February 5, 2025
@@ -3215,7 +3217,8 @@
PostgreSQL: An Introduction
  • What is PostgreSQL? Open-source, enterprise-class relational database
  • License: PostgreSQL License (permissive open-source)
  • ACID Compliance: Ensures data integrity
  • -
  • Extensibility: Supports custom functions and data types
  • +
  • Extensibility: Supports custom functions and data types +
  • Advanced Features: JSON, full-text search, geospatial support
  • Concurrency Control: Uses MVCC for efficient transactions
  • Cross-Platform: Runs on Linux, Windows, macOS, and cloud
  • @@ -3229,7 +3232,7 @@
    PostgreSQL: A Timeline
  • 1986: Developed at UC Berkeley by Michael Stonebraker
  • 1989: POSTGRES 1.0 released
  • 1994: Renamed to PostgreSQL
  • -
  • 1996: Open-source development begins
  • +
  • 1996: Open-source development begins
  • 2000: MVCC introduced in PostgreSQL 7.0
  • 2005: Native Windows support added
  • 2010: Streaming replication introduced
  • @@ -3239,21 +3242,265 @@
    PostgreSQL: A Timeline
    +
    +
    PostgreSQL: Open Source License Requirements
    + + + + + + + + + + + + + + + + +
    DatabaseLicenseRestrictions
    SQLitePublic DomainNo restrictions, free for any use
    PostgreSQLPostgreSQL License (BSD-style)Requires keeping copyright notice
    +
    + +
    +
    PostgreSQL License Notice
    +
    +        PostgreSQL Database Management System
    +        Copyright (c) 1996-2024, The PostgreSQL Global Development Group
    +        
    +        Permission to use, copy, modify, and distribute this software and its 
    +        documentation for any purpose, without fee, and without a written 
    +        agreement is hereby granted, provided that the above copyright notice 
    +        and this paragraph appear in all copies.
    +        
    +        IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
    +        CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
    +        TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE 
    +        SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +          
    +
    +
    Why Was PostgreSQL Invented?
    -
    + + +
    +

    PostgreSQL Feature Matrix

    +
    + +
    +
    PostgreSQL Query Transformer
    +

    View Code

    +
    + +
    +
    Relational Database Admin Interfaces
    +
    + +
    +
    Neon Database Admin Functions
    + +
    + +
    + Neon Database Console +
    + +
    +
    pg_stat_statements
    + +
    + +
    +
    Questions?
    +
    + +
    +
    Task 1: Creating a Database Backup
    +

    Is this an Admin Task, Developer Task, or User Task?

    +
    + +
    +
    Task 2: Writing a New API Endpoint
    +

    Is this an Admin Task, Developer Task, or User Task?

    +
    + +
    +
    Task 3: Managing User Permissions
    +

    Is this an Admin Task, Developer Task, or User Task?

    +
    + +
    +
    Task 4: Debugging an Application Error
    +

    Is this an Admin Task, Developer Task, or User Task?

    +
    + +
    +
    Task 5: Updating Software Dependencies
    +

    Is this an Admin Task, Developer Task, or User Task?

    +
    + +
    +
    Relational Database Developer Interfaces
    +
    + +
    +
    Developers: The Bridge
    + +
    + +
    +
    Backend to Database Connection
    + +
    + +
    +
    PostgreSQL API Connection String Breakdown
    + +
    + +
    +
    Backend to Frontend via REST API
    + +
    + +
    +
    REST API Request Example
    +
    
    +            @app.route('/flowers')
    +            def manage_flowers():
    +                conn = get_db_connection()
    +                cur = conn.cursor()
    +                cur.execute("SELECT * FROM flowers")
    +                flowers = cur.fetchall()
    +                cur.close()
    +                conn.close()
    +                return render_template('flowers.html', flowers=flowers)
    +          
    +
    + +
    +
    Task 1: Designing a Database Schema
    +

    Is this a Backend Database Developer Task?

    +
    + +
    +
    Task 2: Implementing a REST API
    +

    Is this a Backend Database Developer Task?

    +
    + +
    +
    Task 3: Styling a Web Page
    +

    Is this a Backend Database Developer Task?

    +
    + +
    +
    PostgreSQL Backend Code Example
    + + GitHub: SE4CPS DMS - PostgreSQL + +
    + +
    +
    Questions?
    +
    + +
    +
    Relational Database User Interfaces
    +
    + +
    +
    Frontend Database-Related Tasks
    + +
    + +
    +
    PostgreSQL Backend Code Example
    + + GitHub: SE4CPS DMS - PostgreSQL + +
    + +
    +
    Question 1
    +

    Is fetching data from an API a frontend or backend task?

    +
    + +
    +
    Question 2
    +

    Who is responsible for validating user input before storing it in the database?

    +
    + +
    +
    Question 3
    +

    Does the frontend directly modify the database?

    +
    + +
    +
    Questions?
    +
    + +
    +
    Python and GitHub
    +
    Homework 2, Lab 2, Project Part 1
    + +
    Module 5
    Relational Database Advanced SQL
    diff --git a/dms/templates/flowers.html b/dms/templates/flowers.html index 8593b4a..e518c7a 100644 --- a/dms/templates/flowers.html +++ b/dms/templates/flowers.html @@ -11,10 +11,10 @@

    Flower Management

    - + - - + +