pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="ook0cui" id='lwROd'><tfoot id='lwROd'></tfoot><dl id='lwROd'><fieldset id='lwROd'></fieldset></dl></div>
      2. 在 MySQL 中存儲日歷數(shù)據(jù)

        Storing Calendar Data in MySQL(在 MySQL 中存儲日歷數(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="msiowmq" id='2pnk0'><tfoot id='2pnk0'></tfoot><dl id='2pnk0'><fieldset id='2pnk0'></fieldset></dl></div>

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

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

                  問題描述

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

                  Just a quick architecture question really on storing calendar data.

                  基本上,我有一個租賃服務數(shù)據(jù)庫.在前端,有一個日歷顯示未來每個日期的可用"或不可用".在后端,用戶可以在 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.

                  我的問題是您將如何將這些數(shù)據(jù)存儲在 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.

                  畢竟,可用日期的數(shù)量是無限的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!

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

                  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 中存儲日歷數(shù)據(jù)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數(shù)根據(jù) 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 函數(shù)的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環(huán)數(shù)組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發(fā)生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫表作為 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="cscsy00" id='RqXD3'><tfoot id='RqXD3'></tfoot><dl id='RqXD3'><fieldset id='RqXD3'></fieldset></dl></div>

                          1. 主站蜘蛛池模板: 重庆网站建设,重庆网站设计,重庆网站制作,重庆seo,重庆做网站,重庆seo,重庆公众号运营,重庆小程序开发 | 高压贴片电容|贴片安规电容|三端滤波器|风华电容代理南京南山 | 模具钢_高速钢_不锈钢-万利钢金属材料 | 挖掘机挖斗和铲斗生产厂家选择徐州崛起机械制造有限公司 | 高博医疗集团上海阿特蒙医院| 818手游网_提供当下热门APP手游_最新手机游戏下载 | 心肺复苏模拟人|医学模型|急救护理模型|医学教学模型上海康人医学仪器设备有限公司 | 泰州物流公司_泰州货运公司_泰州物流专线-东鑫物流公司 | 欧景装饰设计工程有限公司-无锡欧景装饰官网 | 仓储货架_南京货架_钢制托盘_仓储笼_隔离网_环球零件盒_诺力液压车_货架-南京一品仓储设备制造公司 | 水厂自动化|污水处理中控系统|水利信息化|智慧水务|智慧农业-山东德艾自动化科技有限公司 | 【MBA备考网】-2024年工商管理硕士MBA院校/报考条件/培训/考试科目/提前面试/考试/学费-MBA备考网 | 机械立体车库租赁_立体停车设备出租_智能停车场厂家_春华起重 | 杭州可当科技有限公司—流量卡_随身WiFi_AI摄像头一站式解决方案 | 首页|专注深圳注册公司,代理记账报税,注册商标代理,工商变更,企业400电话等企业一站式服务-慧用心 | 制丸机,小型中药制丸机,全自动制丸机价格-甘肃恒跃制药设备有限公司 | 深圳货架厂_仓库货架公司_重型仓储货架_线棒货架批发-深圳市诺普泰仓储设备有限公司 | 螺旋丝杆升降机-SWL蜗轮-滚珠丝杆升降机厂家-山东明泰传动机械有限公司 | 呼末二氧化碳|ETCO2模块采样管_气体干燥管_气体过滤器-湖南纳雄医疗器械有限公司 | 冷库安装厂家_杭州冷库_保鲜库建设-浙江克冷制冷设备有限公司 | 广东护栏厂家-广州护栏网厂家-广东省安麦斯交通设施有限公司 | 紫外可见光分光度计-紫外分光度计-分光光度仪-屹谱仪器制造(上海)有限公司 | 厂厂乐-汇聚海量采购信息的B2B微营销平台-厂厂乐官网 | 并网柜,汇流箱,电控设备,中高低压开关柜,电气电力成套设备,PLC控制设备订制厂家,江苏昌伟业新能源科技有限公司 | 水厂自动化-水厂控制系统-泵站自动化|控制系统-闸门自动化控制-济南华通中控科技有限公司 | X光检测仪_食品金属异物检测机_X射线检测设备_微现检测 | 工业胀紧套_万向节联轴器_链条-规格齐全-型号选购-非标订做-厂家批发价格-上海乙谛精密机械有限公司 | CNC机加工-数控加工-精密零件加工-ISO认证厂家-鑫创盟 | 软装设计-提供软装装饰和软装配饰及软装陈设的软装设计公司 | 臻知网大型互动问答社区-你的问题将在这里得到解答!-无锡据风网络科技有限公司 | 办公室家具_板式办公家具定制厂家-FMARTS福玛仕办公家具 | 加气混凝土砌块设备,轻质砖设备,蒸养砖设备,新型墙体设备-河南省杜甫机械制造有限公司 | 路面机械厂家| 德国EA可编程直流电源_电子负载,中国台湾固纬直流电源_交流电源-苏州展文电子科技有限公司 | 高压互感器,电流互感器,电压互感器-上海鄂互电气科技有限公司 | 东莞市超赞电子科技有限公司 全系列直插/贴片铝电解电容,电解电容,电容器 | 魔方网-培训咨询服务平台| 艺术漆十大品牌_艺术涂料加盟代理_蒙太奇艺术涂料厂家品牌|艺术漆|微水泥|硅藻泥|乳胶漆 | 登车桥动力单元-非标液压泵站-非标液压系统-深圳市三好科技有限公司 | 艺术涂料_进口艺术涂料_艺术涂料加盟_艺术涂料十大品牌 -英国蒙太奇艺术涂料 | 智能气瓶柜(大型气瓶储存柜)百科 |