資料庫期末專案
- 課程名稱:資料庫系統
- 授課老師:張雅惠老師
- 修課學期:112-1
Introduction
功能介紹
此系統是提供給資工系的學生互相交流與學習,使用者可以註冊並登入此系統,登入後即可開始上傳、修改、刪除筆記以及程式練習題目,就算沒有帳號的使用者也可以瀏覽或查詢別人分享的筆記以及程式練習題目。
ER-Diagram
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- note 跟 code_practice 的 id,是指他們各自的文章ID,也是他們的 primary key
- title、description、topic、course_name、url、userid,分別指他們各自的標題、描述、主題、相關課程、網址、作者ID(foreign key)
表格定義與正規型式分析
Tables
- user (userid, password, username)
- note (id, title, description, topic, course_name, url, userid)
- code_practice (id, title, description, topic, course_name, url, userid)
Table user
Normalization
F={
userid→password
userid→username
}
此表格符合3NF和BCNF
- userid代表一個特定的user,所以可以決定唯一的username。
- userid代表一個特定的user,且為一個特定的帳號,所以可以決定唯一的password。
- userid是一個candidate key
Table note
Normalization
F={
id→title
id→description
id→topic
id→course_name
id→url
id→userid
}
此表格符合3NF和BCNF
- id代表一個特定的noteID,所以可以決定唯一的title、description、topic、course_name、url、userid
- id是一個candidate key
Table code_practice
Normalization
F={
id→title
id→description
id→topic
id→course_name
id→url
id→userid
}
此表格符合3NF和BCNF
- id代表一個特定的noteID,所以可以決定唯一的title、description、topic、course_name、url、userid。
- id是一個candidate key