久久久久久久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 中存儲(chǔ)日歷數(shù)據(jù)

        Storing Calendar Data in MySQL(在 MySQL 中存儲(chǔ)日歷數(shù)據(jù))
        • <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 中存儲(chǔ)日歷數(shù)據(jù)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  只是一個(gè)關(guān)于存儲(chǔ)日歷數(shù)據(jù)的快速架構(gòu)問(wèn)題.

                  Just a quick architecture question really on storing calendar data.

                  基本上,我有一個(gè)租賃服務(wù)數(shù)據(jù)庫(kù).在前端,有一個(gè)日歷顯示未來(lái)每個(gè)日期的可用"或不可用".在后端,用戶可以在 jQuery 日歷上將任何日期/日期范圍設(shè)置為可用或不可用(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.

                  我的問(wèn)題是您將如何將這些數(shù)據(jù)存儲(chǔ)在 mysql 中并在前端檢索它?

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

                  可能有所有可用的日期并存儲(chǔ)不可用的日期?然后,如果它們?cè)俅卧O(shè)置為可用,則刪除該日期的記錄?

                  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

                  推薦答案

                  可能有所有可用的日期并存儲(chǔ)不可用的日期?然后,如果它們?cè)俅卧O(shè)置為可用,則刪除該日期的記錄?

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

                  是的,我會(huì)這樣做,除非我不會(huì)在租用到期時(shí)刪除記錄 - 您很容易知道租用已過(guò)期,因?yàn)樗沁^(guò)去的,因此您也會(huì)自動(dòng)保留租用歷史記錄.

                  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.

                  畢竟,可用日期的數(shù)量是無(wú)限的1,因此如果您反過(guò)來(lái)(和存儲(chǔ)的免費(fèi)日期),則必須人為地限制支持的日期范圍.

                  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 未來(lái).而且,在某種意義上,過(guò)去也是如此.

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

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

                  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!

                  由于租用的粒度是一整天,我覺得你看的數(shù)據(jù)庫(kù)結(jié)構(gòu)是這樣的:

                  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 中設(shè)置 START_DATE 和 END_DATE,但這需要明確的范圍重疊檢查,可能無(wú)法理想地?cái)U(kuò)展.

                  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.

                  這篇關(guān)于在 MySQL 中存儲(chǔ)日歷數(shù)據(jù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

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

                    • <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. 主站蜘蛛池模板: 亚洲日本乱码在线观看 | 亚洲欧洲日韩 | 久久精品国产99国产精品亚洲 | 日本久久精品 | 91视频在线 | 午夜精品久久久久久久久久久久 | 91大神在线资源观看无广告 | www.国产精| 亚洲精品久久久蜜桃 | 精品久久久久久久人人人人传媒 | 嫩草视频免费 | 国产精品久久久久久久久婷婷 | 国产日韩一区二区三免费 | 久久狠狠| 国产一级毛片精品完整视频版 | 91超碰在线 | 视频三区| 国产黄色大片 | 韩日一区 | 久久视频精品在线 | 国产日韩一区二区三免费高清 | 人操人免费视频 | 欧美自拍第一页 | 成人性视频免费网站 | 国产成人精品免高潮在线观看 | 黄色国产在线播放 | 国产精品观看 | 欧美国产91 | 久久另类| 国产精品网页 | av色站| 香蕉久久a毛片 | 精品欧美一区二区在线观看视频 | 亚洲一区二区三区四区在线观看 | 国产精品日韩一区 | 亚洲视频一区在线 | 精品久久不卡 | 国产精品视频999 | 一区二区三区欧美 | 免费看淫片 | 亚洲一区成人 |