Yukino
    • 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
    • Invite by email
      Invitee

      This note has no invitees

    • 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
    • Note Insights New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
  • Invite by email
    Invitee

    This note has no invitees

  • 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # OpenDB 11/10 ## 參與人員 - Solomon, Ashley, Sabrina, Selena, Ryan, Yukino, Ellie, Dequan, Louise ## SQLite - 重複輸入的問題以解決 - policestationID 還需要改 - 目前都是數字1(只能查到一個派出所) - 有用到 foreign key,影響到匯資料 - 這周末會將資料匯入 ### Q&A - [name=Ashley] policeStation的 s 有大寫或小寫是故意的嗎 - [name=Ellie] 沒有注意到,之後會統一用大寫 - [name=Ashley] camera 相關錯誤訊息沒有修正 - [name=Ashley] 派出所、行政區、路口的 expression 是可以用的嗎? 廠商的結尾會跟我們設計的一樣? - [name=Ashley] cameraID 的六碼數字是有規定的嗎 - [name=Ellie] 有建議警局,如果他們有採用,就沒有這樣的規定 - [name=Ashley] ENENT 的 eventID 是不是應該要 primary - [name=Ellie] 不小心動到的,是 primary 沒錯 - [name=Ashley] policeStation 有兩個 primary key - [name=Ellie] 會改成 unique - [name=Ashley] 行政區沒有 not null - [name=Ashley] SEARCH errorType 要存什麼資料,已知道搜尋時會記錄錯誤到 Log,但正確時,應該不會有錯誤訊息? - [name=Ellie] 正確的話 errorType 會是 200 - [name=Ashley] 所以成功失敗都要存是嗎 - [name=Ellie] 是 - [name=Ashley] SEARCH Log 的大小寫要注意 - [name=Ellie] 會再修正,但 SQLite 應該不影響 ## Flask - unit test - 回傳 content, message, status - 多個錯誤都會回傳 (list) - 插入資料 - 錯誤訊息 content: 欄位缺失 - 獲取所有辨識紀錄: 沒想到會有什麼錯誤 - 透過 eventID 獲取辨識紀錄 - 錯誤訊息 content: 沒有 body - 透過車牌查詢軌跡 - 新增搜尋紀錄 - 錯誤訊息 content: 欄位缺失 - 沒有 invalid - 獲取搜尋紀錄 - 透過 searchID 獲取搜尋紀錄 - - 錯誤訊息 content: 404 - 提醒 SQLite: 錯誤訊息只有 'insert 錯誤',必填資料缺失應該需要有額外的訊息 ### Q&A - [name=Ashley] name, reason, caseID 是必填? - [name=Ryan] 是,必須記錄是誰查詢的 - [name=Ashley] 所以是會 insert 到 TCASE 跟 PERSON 嗎 - [name=Ellie] PERSON 不會動到 - [name=Solomon] TCASE 應該由誰 insert? (Which API?) - [name=Ellie] 還沒搞清楚 - [name=Ashley] 目前版本還不會 insert TCASE, PEARSON - [name=Ryan] 但有個 search_history 的 API - [name=Ashley] 只會動到 SEARCH - [name=Ryan] 所以需要新增新的 API 嗎 (insert TCASE, PEARSON) - [name=Ashley] 等 SQLite 決定 - [name=Ryan] 對 response, message 的欄位有疑惑 - [name=Ryan] (insert) 錯誤訊息應該放在 message,content 則是回傳資料,這跟 API 及其他 unit test 格式有衝突 - [name=Yukino] content 是當初測試時沒有刪除的 - [name=Ashley] 另一個原因是 insert 的錯誤訊息不夠詳細。這樣要請 SQLite 多設計,LOG 才看得出錯誤 - [name=Ellie] LOG 存的是 應該是讓 Flask 進資料庫看的 (mapping table) - [name=Solomon] 兩邊都有道理,但這應該命名為 'ERROR TABLE' 而不是 LOG - [name=Ellie] 那 Flask 還需要 'ERROR TABLE' 嗎? - [name=Ashley] 目前是直接寫在程式,用資料庫可查能會影響時間 - [name=Solomon] 程式開始時直接存到記憶體 - [name=Solomon] 所以現在錯誤訊息會直接存在 SEARCH? SEARCH 只有一個欄位,那詳細資訊呢 - [name=Ellie] 會到 LOG 查找 - [name=Solomon] 有 $2^5$ 種可能,但 errorType 沒這麼多 - [name=Sabrina] 如果查詢資料失敗 SEARCH 裡不就沒有資料嗎 - [name=Solomon] 看起來查詢失敗也會記錄 - [name=Ellie] 多個錯誤應該 Log 多筆資料,不然需要 $2^5$ 種訊息 - [name=Solomon] 這樣如何? - 1. 正確的才會 insert 進 SEARCH table. - 2. 不正確的查詢則 log 在另一個 table 中。 - ``` CREATE TABLE ErrorLog ( searchID INTEGER, searchTime DATETIME, sqlCommand TEXT ); ``` - [name=Sabrina] 查詢人在 API 為非必填,但 SEARCH 為 not null,這樣會有衝突 - [name=Ryan] 查詢人應該改成必填 - [name=Ellie] 需要紀錄 insert 的錯誤嗎 - [name=Solomon] 通常對資料庫的所有操作都會記錄(直接紀錄 SQL command 再加時間) - [name=Solomon] 如果不是收 SQL command, 而是收 JSON, 也可以改成 json TEXT - [name=Ashley] 必填欄位都需要有錯誤訊息 - [name=Ellie] 覺得 TCASE 的設計有點不良,想要討論 - [name=Ellie] 搜尋的案由會 insert 到哪 - [name=Ashley] 目前沒有任何 API 會 insert - [name=Ellie] RESTful 有設計 相關 API 嗎 - [name=Ryan] 案由應該是 builtin 的 table - [name=Ellie] 應該要可以手動輸入 - [name=Ellie] 把 TCASE 刪掉, reason detail 放到 SEARCH,用來填寫(手動輸入) - [name=Ryan] 應該是加一個備註到 SEARCH,而不是用 reason detail ### RESTful - 目前還沒進行壓力測試的研究 - API 跟 SQLite 有出入,所以這周在修改,讓雙方有互相對應 ### Q&A - [name=Ryan] camera 已分出去一個 table,EVENT 只需要 cameraID,這樣警局還需要回傳地址嗎 - [name=Ellie] 不需要,只需要 cameraID - [name=Ryan] 這樣要跟警局說,不然 Flask 程式可能會遇到問題 - [name=Ashley] table 是警局給的所以他們應該會有 cameraID - [name=Ellie] 目前警局也會傳其他資料 - [name=Ashley] 要要求他們 - [name=Ellie] 案由有 detail 跟選單嗎 - [name=Ellie] 需要新增一個 detail 的欄位 - [name=Ryan] SQLite 新增後再通知 RESTful 修改 ## 其他 - [name=Solomon] PI 要派人整理完整的會議紀錄 - [name=Sabrina] Selena 目前不再,會後會再找他討論 ## 下次進度 - RESTful 壓力測試 - [name=Ryan] & [name=Sabrina] 到實驗室進行壓力測試 - SQLite 修改 table、建立測試資料 - [name=Ryan] 要注意產生的時間有沒有問題 - Flask 配合 SQLite 跟 API 做更動

    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