返回課程
DSAI2202 本科

PolyU | 資料庫原理

一門本科課程,透過關聯式資料操作、精確系統狀態保留及 SQL 驗證,探討資料庫原理,並涵蓋人工智能時代的應用。

4.9
70.0h
1131 學習者
22 堂課
36 讚好
人工智能
開始學習

課程總覽

內容摘要

這是一門大學部課程,探索資料庫原理,涵蓋關聯式資料操作、精確系統狀態保存,以及在 AI 時代中的 SQL 驗證。

以資料操作思考,以 SQL 表達。

作者: 程然

致謝: 本課程基於 DSAI2202 資料庫原理課程教材。

學習目標

  1. 學習者應理解什麼是數位資料,以及它如何表示現實世界中的資訊。
  2. 學習者應理解長期保存資料時,持久化儲存的必要性。
  3. 學習者應理解現代資料庫管理系統所管理的主要操作職責。
  4. 學習者應鞏固對資料庫、持久化儲存與 AI 之間互動關係的理解。
  5. 學習者將理解如何分析真實世界的領域以擷取資料需求。
  6. 學習者將理解建立完整概念性 ER 模型的步驟。
  7. 學習者將理解主鍵在強制唯一性和資料列識別中所扮演的角色。
  8. 學習者將複習從概念領域模型轉換到關聯式資料表的核心原則。
  9. 學習者將理解從資料庫中檢索特定資料的根本目的。
  10. 學習者將應用比較運算子來指定精確條件或範圍條件。
  11. 學習者將限制查詢傳回的資料列數。
  12. 學習者將複習檢索與篩選資料庫資料的基礎原則。

課程

Lesson

Lab

This lab introduces the fundamentals of PostgreSQL, guiding students through the installation of the database server and the pgAdmin 4 management tool. Students will learn how to connect to their local database, execute basic SQL queries, and understand the core architecture of a relational database management system.

This lesson explains why flat spreadsheets are inefficient for managing complex data due to issues like redundancy and update anomalies. It introduces relational database design as a solution, teaching students how to identify entities and structure tables to ensure data integrity and consistency.

This lab teaches students how to identify and filter student-progress data in PostgreSQL by categorizing fields into identity, risk evidence, and decision status. Students will learn to construct queries that select specific columns and apply logical conditions to prioritize support for at-risk students.

This lab teaches how to safely maintain a PostgreSQL student database by handling four requests—adding, updating, standardizing, and deleting records—while ensuring only the intended rows are affected. You'll learn to inspect table constraints, restore a known starting state, and use INSERT, UPDATE, and DELETE statements with correct targets and expected row counts.

In Lab 5, students learn how to group and summarise data in PostgreSQL using a university course performance dataset. Key topics include writing aggregate functions like COUNT, SUM, AVG, MIN, and MAX, handling NULL values, and using DISTINCT to generate accurate registrar reports.

本实验旨在学习如何使用 PostgreSQL 中的 INNER JOIN 将学生、课程和选课表关联起来,从而生成包含完整信息的选课报告。通过实践,学生将掌握如何利用外键匹配相关数据,并理解连接操作如何根据匹配条件合并多表记录。

Topic

This lesson introduces database transactions as single, indivisible units of work that ensure data integrity through atomicity, durability, and visibility control. Students learn how transactions manage failure handling and state boundaries using commit and rollback operations.