久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <legend id='lwROd'><style id='lwROd'><dir id='lwROd'><q id='lwROd'></q></dir></style></legend>

  • <small id='lwROd'></small><noframes id='lwROd'>

      <bdo id='lwROd'></bdo><ul id='lwROd'></ul>

        <tfoot id='lwROd'></tfoot>
      1. <i id='lwROd'><tr id='lwROd'><dt id='lwROd'><q id='lwROd'><span id='lwROd'><b id='lwROd'><form id='lwROd'><ins id='lwROd'></ins><ul id='lwROd'></ul><sub id='lwROd'></sub></form><legend id='lwROd'></legend><bdo id='lwROd'><pre id='lwROd'><center id='lwROd'></center></pre></bdo></b><th id='lwROd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lwROd'><tfoot id='lwROd'></tfoot><dl id='lwROd'><fieldset id='lwROd'></fieldset></dl></div>
      2. 在 MySQL 中存儲日歷數據

        Storing Calendar Data in MySQL(在 MySQL 中存儲日歷數據)
        • <small id='2pnk0'></small><noframes id='2pnk0'>

            <tbody id='2pnk0'></tbody>

            <bdo id='2pnk0'></bdo><ul id='2pnk0'></ul>
          • <legend id='2pnk0'><style id='2pnk0'><dir id='2pnk0'><q id='2pnk0'></q></dir></style></legend>
            <i id='2pnk0'><tr id='2pnk0'><dt id='2pnk0'><q id='2pnk0'><span id='2pnk0'><b id='2pnk0'><form id='2pnk0'><ins id='2pnk0'></ins><ul id='2pnk0'></ul><sub id='2pnk0'></sub></form><legend id='2pnk0'></legend><bdo id='2pnk0'><pre id='2pnk0'><center id='2pnk0'></center></pre></bdo></b><th id='2pnk0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2pnk0'><tfoot id='2pnk0'></tfoot><dl id='2pnk0'><fieldset id='2pnk0'></fieldset></dl></div>

              <tfoot id='2pnk0'></tfoot>

                  本文介紹了在 MySQL 中存儲日歷數據的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  只是一個關于存儲日歷數據的快速架構問題.

                  Just a quick architecture question really on storing calendar data.

                  基本上,我有一個租賃服務數據庫.在前端,有一個日歷顯示未來每個日期的可用"或不可用".在后端,用戶可以在 jQuery 日歷上將任何日期/日期范圍設置為可用或不可用(1 或 0).

                  Basically, I have a database of services for rental. On the front end, there is a calendar to show either "Available" or "Unavailable" for every future date. In the back-end the user can set any date/date range to available or unavailable (1 or 0) on a jQuery calendar.

                  我的問題是您將如何將這些數據存儲在 mysql 中并在前端檢索它?

                  The question I have is how would you go about storing this data in mysql and retrieving it on the front end?

                  可能有所有可用的日期并存儲不可用的日期?然后,如果它們再次設置為可用,則刪除該日期的記錄?

                  Possible have all dates available and store the unavailable dates? Then if they are set to available again, remove the record for that date?

                  干杯,RJ

                  推薦答案

                  可能有所有可用的日期并存儲不可用的日期?然后,如果它們再次設置為可用,則刪除該日期的記錄?

                  Possible have all dates available and store the unavailable dates? Then if they are set to available again, remove the record for that date?

                  是的,我會這樣做,除非我不會在租用到期時刪除記錄 - 您很容易知道租用已過期,因為它是過去的,因此您也會自動保留租用歷史記錄.

                  Yes, I'd go with that, except I would not remove the record when renting expires - you'll easily know a renting expired because it's in the past, so you automatically keep the history of renting as well.

                  畢竟,可用日期的數量是無限的1,因此如果您反過來(和存儲的免費日期),則必須人為地限制支持的日期范圍.

                  After all, there is infinite number of available dates1, so you'd have to artificially limit the supported range of dates if you went the other way around (and stored free dates).

                  1 未來.而且,在某種意義上,過去也是如此.

                  1 In the future. And, in some sense, in the past as well.

                  另外,我猜您需要一些額外的信息,以防租用服務(例如租用者的姓名),如果租用由不存在的行表示,則無處存儲!

                  Also, I'm guessing you want some additional information in case a service is rented (e.g. name of the renter) and there would be nowhere to store that if renting were represented by a non-existent row!

                  由于租用的粒度是一整天,我覺得你看的數據庫結構是這樣的:

                  Since the granularity of renting is a whole day, I think you are looking at a database structure similar to this:

                  注意 RENTING_DAY PK 如何自然地防止重疊.

                  Note how RENTING_DAY PK naturally prevents overlaps.

                  或者,您可以放棄 RENTING_DAY 并直接在 RENTING 中設置 START_DATE 和 END_DATE,但這需要明確的范圍重疊檢查,可能無法理想地擴展.

                  Alternatively, you might ditch the RENTING_DAY and have START_DATE and END_DATE directly in RENTING, but this would require explicit range overlap checks, which may not scale ideally.

                  這篇關于在 MySQL 中存儲日歷數據的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)

                    • <bdo id='RqXD3'></bdo><ul id='RqXD3'></ul>
                      • <legend id='RqXD3'><style id='RqXD3'><dir id='RqXD3'><q id='RqXD3'></q></dir></style></legend>

                          <small id='RqXD3'></small><noframes id='RqXD3'>

                              <tbody id='RqXD3'></tbody>
                            <tfoot id='RqXD3'></tfoot>
                            <i id='RqXD3'><tr id='RqXD3'><dt id='RqXD3'><q id='RqXD3'><span id='RqXD3'><b id='RqXD3'><form id='RqXD3'><ins id='RqXD3'></ins><ul id='RqXD3'></ul><sub id='RqXD3'></sub></form><legend id='RqXD3'></legend><bdo id='RqXD3'><pre id='RqXD3'><center id='RqXD3'></center></pre></bdo></b><th id='RqXD3'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RqXD3'><tfoot id='RqXD3'></tfoot><dl id='RqXD3'><fieldset id='RqXD3'></fieldset></dl></div>

                          1. 主站蜘蛛池模板: 午夜欧美 | 欧美一区二区三区在线观看 | 亚洲国产成人av好男人在线观看 | 久久丁香| 中文字幕第一页在线 | 亚洲国产aⅴ成人精品无吗 亚洲精品久久久一区二区三区 | 极品的亚洲 | 日本精品免费 | 在线一区二区国产 | 91精品国产色综合久久不卡98口 | 九九天堂网 | 精品久久久久久久久久久 | eeuss国产一区二区三区四区 | 日本久久网 | 欧美人妖网站 | 久久久久久久久精 | 亚洲国产成人精品女人久久久 | 久久久久久久久久久久久久国产 | 99视频在线播放 | 国产精品精品视频一区二区三区 | 少妇久久久 | 亚洲一区二区 | 国产99视频精品免视看9 | 日一日操一操 | 亚洲成色777777在线观看影院 | 在线视频一区二区三区 | 国产成人99久久亚洲综合精品 | www日韩| 2022国产精品| 久久亚洲欧美日韩精品专区 | 国产高清在线观看 | 久久蜜桃资源一区二区老牛 | 91毛片在线看 | 青青久草 | 羞羞色在线观看 | 欧美一区二区在线看 | 成人国产精品久久久 | 国产精品欧美一区二区三区 | 国产精久久久久久久 | 韩日av片| 久久高清国产 |