李樹
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- title: 2025-06-27 Obsidian 資料庫|Slides aliases: - lesson-03-slide dg-publish: true tags: - 🪨自籌Obsidian工作坊 - 🎯學習歷程檔案 create-date: 2025-06-20 16:11 --- # <h1 style="text-align: left"> <font face="noto serif TC"> Obsidian 資料庫 </font> </h1> <br> <br> <br> <div style="text-align: right">── 2025.06.27 @ Obsidian 工作坊</div> --- # Summary - 概念說明 - 筆記屬性/建置資料庫/介紹 Dataview 套件 - 機上操作 - 設定筆記屬性/設定 Dataview/建立第一個資料庫 - 問題與討論 --- ### 筆記屬性 - 在 Markdown 語言中,每一份文件的==第一行==可以輸入 `---` 來形成 `YAML` 區域。 - yaml 區域要求在文件的第一行開始:輸入 `---`可以開啟yaml 區域 - 所有YAML內容結束後,再以 `---` 收尾,夾住的內容就是這份文件的屬性。 --- ### 筆記屬性 ```markdown= --- title: #在 title 輸入標題,可以設定文件的標題 tags: #tags輸入標籤,可以設定文件的標籤 - 標籤一 - 標籤二 date: #在 date 輸入日期,可以設定文件的日期。預設格式為:年年年年-月月-日日;例如:2025-06-21 author: #在 author 輸入人名,可以設定文件的作者 --- ``` --- #### 練習一:新增一份帶有特定屬性的文件 ```markdown --- title: "練習一:新增一份帶有特定屬性的文件" tags: - 練習一 - YAML - 自學筆記 - 程式語言 date: 2025-06-21 author: TreeZi --- ``` - 開啟新的筆記,將上述的內容複製貼到新筆記上。 - 🔔 注意:請記得貼在**文件第一行**。 - 👉 顯示行號:`選單` → `編輯器` → `顯示行號` ✅ --- ### 建置資料庫 - 釐清想要 ==怎麼管理資料== - 先規劃好==資料庫的邏輯== - 哪些筆記要具備哪些屬性? --- #### 練習二:建置資料結構圖 1. 條列自己的工作流程(如果是寫作,條列自己的寫作流程), 2. 思考每個工作流程需要什麼樣類型的筆記。 3. 條列這些筆記需要具備哪些屬性。 4. 將上述的事項畫成「流程圖」。 --- #### 練習二:建置資料結構圖 ![我的工作流程視覺圖](https://hackmd.io/_uploads/S1deo2vNeg.png) --- ### 介紹 Dataview 套件 - 安裝套件 [Dataview](obsidian://show-plugin?id=dataview) - `table`、`list`、`task` --- ##### TABLE`表格,右圖` 和 LIST `清單,左圖` ![TABLE and LIST](https://hackmd.io/_uploads/S1PjYCUNle.png =75%x) --- ### 設定筆記屬性 ![我的工作流程視覺圖](https://hackmd.io/_uploads/S1deo2vNeg.png =75%x) - 依照這張圖上的筆記類別,先來新增不同類型的筆記(請結合上週分享過的內容) [:file_folder: 下載檔案](https://1drv.ms/f/c/1698215ca2d0889b/EtyiQRCAv5tLk9hMHODkn9kB4g9CrugdpIh_H-ELk3unZg?e=dL6KzG) --- ### 基礎使用方式:清單(list) ```markdown= LIST tags + "日期:" + date FROM #自學 SORT file.mtime DESC ``` --- #### 解析與延伸 ```markdown= LIST # 表示用清單的方式顯示資料 tags + "日期:" + date ## tags 表示在每一筆清單資料中加上「tags」 ## 用 `+` 號來連結不同的屬性 ## 如果要再用輸入其他文字,需要用 "這邊是文字" 來表示。 FROM #自學 ## FROM 代表篩選條件,只能用 tags 篩選資料。 ## 如上所示,選擇「自學」之後就只會顯示「tags」中有「自學」的資料 SORT file.mtime DESC ## SORT 是排序方法,分成: ## ASC 順序排,由小到大,由舊到新; ## DESC 倒序排,由大倒小,由新到舊。 ## SORT 的指令為: `SORT <條件> ASC/DESC` ## 條件需要是「文件的屬性」 ## `file.mtime` 代表:文件最後修改時間。 ## 幾個常用的指令如下: ## file.title 文件標題(筆劃) ## file.ctime 文件創立時間 ``` --- ### 基礎使用方式:表格(table) ```markdown= TABLE author as "作者", date as "資料日期", tags as "主題" FROM #自學 SORT file.mtime DESC ``` --- #### 解析與延伸 ```markdown= TABLE # 表示用表格的方式顯示資料 ## 不同欄位之間要用 "," 來區隔 author as "作者", ## 表示把資料中「author」提取呈現, ## 用 AS "標題名稱" 可以自定欄位標題 date as "資料日期", ## 表示把資料中「date」提取呈現, ## 用 AS "標題名稱" 可以自定欄位標題 tags as "主題" ## 表示把資料中「tags」提取呈現, ## 用 AS "標題名稱" 可以自定欄位標題 FROM #自學 ## FROM 代表篩選條件,只能用 tags 篩選資料。 ## 如上所示,選擇「自學」之後就只會顯示「tags」中有「自學」的資料 SORT file.mtime DESC ## SORT 是排序方法,分成: ## ASC 順序排,由小到大,由舊到新; ## DESC 倒序排,由大倒小,由新到舊。 ## SORT 的指令為: `SORT <條件> ASC/DESC` ## 條件需要是「文件的屬性」 ## `file.mtime` 代表:文件最後修改時間。 ## 幾個常用的指令如下: ## file.title 文件標題(筆劃) ## file.ctime 文件創立時間 ``` --- #### 設定複數條件檢閱:`WHERE` ```markdown= WHERE contains(type, "🏷️資料來源") and !contains(file.name, "Template") ## WHERE 是另外一種篩選條件的指令,指令為 contains(<屬性名稱>,"<指定條件>") ## `contains` 表示:包含這個條件。 ## `!contains` 表示:不包含這個條件。 ## 超過一個條件需要輸入 and 來並列,例如: ## WHERE ## contains(屬性1,"條件1") AND ## !contains(屬性2, "條件2") ``` --- #### 以特定文字呈現檔案連結: `link(file.link,<特定文字>)` ```markdown= link(file.link, "<特定文字>") ``` --- #### 組裝文字: `<文字>+<文字>` ```markdown= "<文字1>" + "<文字2>" ``` --- ### 建立第一個資料庫 --- ![建構資料庫](https://hackmd.io/_uploads/rJfTs08Egg.png =60%x) ---

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully