主頁 > 後端開發 > 如何在Access中維護對拆分資料庫的更新

如何在Access中維護對拆分資料庫的更新

2022-03-08 04:34:12 後端開發

過去幾天我一直在研究這個問題,因為我準備使用拆分資料庫的第一個系統交付 3 個階段中的第一個。我想聽聽您的建議,因為我還沒有找到足夠的資訊來做出全面的決定。

目前我正在開發一個未拆分的資料庫。當我在現場拆分它時,我會復制這兩個部分,但是在第 2 階段我該如何處理它們呢?

我在想,在重新鏈接表(因為我已經有效地移動了后端)之后,我現在將它們作為我的開發版本,這意味著我不再使用未拆分的資料庫。這是正確的方法嗎?

在將第 2 階段上線時,我認為除了手動將表更新應用到實時后端(一旦備份)之外,我別無選擇。對于實時前端,我只是用我的開發前端替換它然后重新鏈接表還是將更改匯出到實時前端?我想我可以根據正在更改/新的物件的數量來做。那正確嗎?然后,我將復制并將它們作為第 3 階段的開發版本。

最后在開發中,我有表單和報告模板以及測驗表單、報告和查詢,這些是實時不需要的,所以我應該為每個部署洗掉它們,然后將它們全部重新添加到新的開發前端,還是只是把它們放在現場?通常我會把它們拿出來,但它們有很多,而且我不知道有什么快速的方法可以將它們重新添加,所以你會怎么做?

我的問題主要是從風險的角度提出的——哪些步驟可以最好地降低現場搞砸的風險。

更新: 對于那些正在尋找這個答案的人,除了下面的很好的回答,我發現以下內容可能也有幫助:
如何持續開發和部署 Access 2010 資料庫應用程式

uj5u.com熱心網友回復:

為了降低風險:您應該擁有您的開發版本、實時測驗版本和實時版本。您正在開發中開發客戶測驗測驗中的更改(使用測驗資料),然后您開始生活

為了從開發到測驗,我創建了一個更新/遷移腳本。在此腳本中包含需要在后端完成的所有更改。我使用腳本來創建測驗版本,通過它我可以檢查它是否正常作業。如果有我無法在腳本中反映的資料庫更改(技能不足或資料庫的限制),我會將它們添加到我的清單中。

我正在使用版本控制來查看開發程序中的更改并將模塊、查詢等匯入新版本。

通過匯入最新版本(不需要不需要的表格/報告)來更新前端。

uj5u.com熱心網友回復:

目前我正在開發一個未拆分的資料庫。W

不要,一個非常糟糕的主意。這是如何作業的?

好吧,在開始時可以肯定的是,您正在構建大量新表、更改關系并以高開發速度構建表。

因此,此時,您可以開發未拆分。

然后你會在一段時間后發現創建新表的速度(和需要),并且改變所謂的“資料庫模式”會平靜下來,變成一種沉悶的咆哮。

此時您仍在開發中 - 尚未部署。

那么,在這一點附近的某個地方?你想分裂。你真的很想這樣做。

這有很多原因,但有幾個是:

while a split vs non split is "very similar", they are not the same!
Thus, you can't and don't want to develop code that NOT really tested
as to HOW the code will run in the real world

因此,許多問題可能會在開發程序中發生變化或出現,在運行拆分時會有所不同。因此某些命令(例如 seek())不起作用,并且可能會出現其他一些問題。您不想開發一整周,然后拆分,現在發現 20 個難以修復代碼中的錯誤。因此,通過盡快拆分開發,那么隨著您的開發,出現的任何和所有問題都會被看到,從而可以及時修復、看到和處理這些問題。更糟糕的是撰寫一堆代碼,準備部署,然后發現新的錯誤。

下一步:擁有一個拆分系統很棒,因為說客戶可能會讓你遠程進入他們的系統。您可以下載他們的資料副本,重新鏈接您的表格以從您的“測驗資料”指向真實的實時生產資料。

或者,說您在現場進行開發。您可能想要測驗一些危險的洗掉代碼或修改資料的代碼。所以,你不能冒險處理生產資料,所以現在你重新鏈接并指向你的測驗后端。因此,此設定允許您測驗代碼,但更重要的是,可以輕松地在資料庫副本上進行測驗。

它還允許您進行異地開發。你可以為他們的系統使用最新的前端,也許得到他們最新的資料檔案,也許沒有。但是您現在可以輕松簡單地更改您的應用程式運行的資料庫。

另一個大問題?假設您在現場作業,并在網路檔案夾中擁有他們的測驗資料庫。您撰寫一些代碼,測驗新報告。你發現它跑得像烏龜一樣慢。你檢查你的代碼,也許添加一些索引,然后繁榮!- 您的報告現在運行良好。

如果您測驗未拆分,則可能會出現大量性能問題,但在開發周期中不會出現。再一次,您不想開發數周或其他任何時間,拆分,現在發現一大堆表單和代碼運行速度真的很慢。

那么,這里的目標和想法是什么?

你想盡快分手嗎?

多久?

嗯,這是只有你才能知道的事情之一!!!

正如我所說,在開發開始時,當然,從不拆分開始。

一旦表格設計相當穩固,您就可以拆分。然后,您總是會發展為拆分(以及上面列出的原因串列非常短-還有更多原因)。

現在,問題當然是拆分?假設您要向表中添加新列?

Well, it is MORE work, since now ANY AND ALL changes to the data schema are done in the back end. So, you have to close down the front end (FE), open the back end, and now use the table designer to add that one column. (or maybe change or setup a new relationship between some tables. Or maybe add a new table).

This is a "bit more" work, since now you close down the BE, and open the FE, and now you MUST re-link tables. And if you added new tables to the BE, then you have to add that/those new table links.

Because this "dance" is extra work, that is why you wait as long as possible to split. As I stated, you "just know" when that time has arrived to split. (when table and schema tables changes settles down to a low rate of change). Since the rate of change is now low in regards to table changes, then it not much work nor pain to have to do the above every time you want to change the table structures.

In fact, think of any program you buy? It has a applcation part, and then a data file part. In effect, once you split, you have the same two parts, and in fact in some applications I written, they are allowed to use "different" back ends - not unlike any other applcation in which you launch the applcation, and THEN choose the datafile to work with.

So, what about developing off site? Well, that can be REALLY difficult, since you have your own copy of the FE and the BE.

If you HAVE TO make changes to the BE? I open up a work document. And if I add a new column to say tblCusotmers?

Then I enter this:

Add new column TaxRate, Currency, to table tblCustomers

So, you build up a "log" of changes. Now, when you travel to the customer site, and want to roll out and deploy the new FE? Well, you have to FIRST open up their BE, and make the above changes to their production BE database.

Now in some cases, where is was not possible for me to be on site? (in fact, I had a automatic update system to automatic roll out a new version of my software - and it would automatic down load from the internet. In this case? I had to write code in the FE on startup that would use VBA code to MAKE the changes to the data tables. This can be REALLY hard to do, but is possible. I just recommend the plane jane word document, and you keep track of your changes.

So, the above is quite much how this development process works.

Since you will have to re-link the tables? Then near everyone has googled for a VBA table re-link routines. You want that, since having such code is MUCH easier then say using the linked table manager each time. And we even often have a table in the FE that saves the BE server location, and on startup will check, and if the location of the files don't match, we launch the re-link code.

that way, you can deploy the applcation to different sites, and have it automatic re-link. Another way is to have a simple text file in the same location as the FE on each computer, and on startup read the text file with the BE location - and re-link if required.

So, the typical process to role out a new FE (which is placed on each work station - do NOT break this rule!!!).

So, I point/relink my front end to the production BE. I then compile down to a accDE, and then deploy that new compiled FE to all the work stations. In fact, I have some code in VBA at start up that compares a version number, and if the version number is lower, then the VBA code will copy down the next FE sitting in a folder.

This might not be a big deal if you have 2-4 users. But, if you have two sites, and each has 35 users, then you want to figure out a automated approach.

However, do not prolong jumping over to the split development cycle, as you really for all practical purposes MUST develop in a split environment. So, for the first part, you can develop un-split. But, once you split - that's it, and from that point on-wards, you are to develop as split. There are boatloads of benefits, but it also really quite much standard approach from a developer point of view.

So, you have to master the linked table manager rite quick, and then VERY much consider adding some re-link code, since you want with great ease to point to a different back end - including at deployment time.

so, as a general rule, you should think of your FE like a .exe program, for a new version roll out, yes, you copy (over write) their existing FE's on each work station. And as noted, in most cases, it should be a compiled accDE, and not a un-compiled accDB for the FE.

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/439027.html

標籤:毫秒访问 ms-access-2016

上一篇:使用VB.net在Access資料庫中按特定日期搜索

下一篇:使用基于Access中另一個表的計算欄位進行查詢

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 【C++】Microsoft C++、C 和匯編程式檔案

    ......

    uj5u.com 2020-09-10 00:57:23 more
  • 例外宣告

    相比于斷言適用于排除邏輯上不可能存在的狀態,例外通常是用于邏輯上可能發生的錯誤。 例外宣告 Item 1:當函式不可能拋出例外或不能接受拋出例外時,使用noexcept 理由 如果不打算拋出例外的話,程式就會認為無法處理這種錯誤,并且應當盡早終止,如此可以有效地阻止例外的傳播與擴散。 示例 //不可 ......

    uj5u.com 2020-09-10 00:57:27 more
  • Codeforces 1400E Clear the Multiset(貪心 + 分治)

    鏈接:https://codeforces.com/problemset/problem/1400/E 來源:Codeforces 思路:給你一個陣列,現在你可以進行兩種操作,操作1:將一段沒有 0 的區間進行減一的操作,操作2:將 i 位置上的元素歸零。最終問:將這個陣列的全部元素歸零后操作的最少 ......

    uj5u.com 2020-09-10 00:57:30 more
  • UVA11610 【Reverse Prime】

    本人看到此題沒有翻譯,就附帶了一個自己的翻譯版本 思考 這一題,它的第一個要求是找出所有 $7$ 位反向質數及其質因數的個數。 我們應該需要質數篩篩選1~$10^{7}$的所有數,這里就不慢慢介紹了。但是,重讀題,我們突然發現反向質數都是 $7$ 位,而將它反過來后的數字卻是 $6$ 位數,這就說明 ......

    uj5u.com 2020-09-10 00:57:36 more
  • 統計區間素數數量

    1 #pragma GCC optimize(2) 2 #include <bits/stdc++.h> 3 using namespace std; 4 bool isprime[1000000010]; 5 vector<int> prime; 6 inline int getlist(int ......

    uj5u.com 2020-09-10 00:57:47 more
  • C/C++編程筆記:C++中的 const 變數詳解,教你正確認識const用法

    1、C中的const 1、區域const變數存放在堆疊區中,會分配記憶體(也就是說可以通過地址間接修改變數的值)。測驗代碼如下: 運行結果: 2、全域const變數存放在只讀資料段(不能通過地址修改,會發生寫入錯誤), 默認為外部聯編,可以給其他源檔案使用(需要用extern關鍵字修飾) 運行結果: ......

    uj5u.com 2020-09-10 00:58:04 more
  • 【C++犯錯記錄】VS2019 MFC添加資源不懂如何修改資源宏ID

    1. 首先在資源視圖中,添加資源 2. 點擊新添加的資源,復制自動生成的ID 3. 在解決方案資源管理器中找到Resource.h檔案,編輯,使用整個專案搜索和替換的方式快速替換 宏宣告 4. Ctrl+Shift+F 全域搜索,點擊查找全部,然后逐個替換 5. 為什么使用搜索替換而不使用屬性視窗直 ......

    uj5u.com 2020-09-10 00:59:11 more
  • 【C++犯錯記錄】VS2019 MFC不懂的批量添加資源

    1. 打開資源頭檔案Resource.h,在其中預先定義好宏 ID(不清楚其實ID值應該設定多少,可以先新建一個相同的資源項,再在這個資源的ID值的基礎上遞增即可) 2. 在資源視圖中選中專案資源,按F7編輯資源檔案,按 ID 型別 相對路徑的形式添加 資源。(別忘了先把檔案拷貝到專案中的res檔案 ......

    uj5u.com 2020-09-10 01:00:19 more
  • C/C++編程筆記:關于C++的參考型別,專供新手入門使用

    今天要講的是C++中我最喜歡的一個用法——參考,也叫別名。 參考就是給一個變數名取一個變數名,方便我們間接地使用這個變數。我們可以給一個變數創建N個參考,這N + 1個變數共享了同一塊記憶體區域。(參考型別的變數會占用記憶體空間,占用的記憶體空間的大小和指標型別的大小是相同的。雖然參考是一個物件的別名,但 ......

    uj5u.com 2020-09-10 01:00:22 more
  • 【C/C++編程筆記】從頭開始學習C ++:初學者完整指南

    眾所周知,C ++的學習曲線陡峭,但是花時間學習這種語言將為您的職業帶來奇跡,并使您與其他開發人員區分開。您會更輕松地學習新語言,形成真正的解決問題的技能,并在編程的基礎上打下堅實的基礎。 C ++將幫助您養成良好的編程習慣(即清晰一致的編碼風格,在撰寫代碼時注釋代碼,并限制類內部的可見性),并且由 ......

    uj5u.com 2020-09-10 01:00:41 more
最新发布
  • Rust中的智能指標:Box<T> Rc<T> Arc<T> Cell<T> RefCell<T> Weak

    Rust中的智能指標是什么 智能指標(smart pointers)是一類資料結構,是擁有資料所有權和額外功能的指標。是指標的進一步發展 指標(pointer)是一個包含記憶體地址的變數的通用概念。這個地址參考,或 ” 指向”(points at)一些其 他資料 。參考以 & 符號為標志并借用了他們所 ......

    uj5u.com 2023-04-20 07:24:10 more
  • Java的值傳遞和參考傳遞

    值傳遞不會改變本身,參考傳遞(如果傳遞的值需要實體化到堆里)如果發生修改了會改變本身。 1.基本資料型別都是值傳遞 package com.example.basic; public class Test { public static void main(String[] args) { int ......

    uj5u.com 2023-04-20 07:24:04 more
  • [2]SpinalHDL教程——Scala簡單入門

    第一個 Scala 程式 shell里面輸入 $ scala scala> 1 + 1 res0: Int = 2 scala> println("Hello World!") Hello World! 檔案形式 object HelloWorld { /* 這是我的第一個 Scala 程式 * 以 ......

    uj5u.com 2023-04-20 07:23:58 more
  • 理解函式指標和回呼函式

    理解 函式指標 指向函式的指標。比如: 理解函式指標的偽代碼 void (*p)(int type, char *data); // 定義一個函式指標p void func(int type, char *data); // 宣告一個函式func p = func; // 將指標p指向函式func ......

    uj5u.com 2023-04-20 07:23:52 more
  • Django筆記二十五之資料庫函式之日期函式

    本文首發于公眾號:Hunter后端 原文鏈接:Django筆記二十五之資料庫函式之日期函式 日期函式主要介紹兩個大類,Extract() 和 Trunc() Extract() 函式作用是提取日期,比如我們可以提取一個日期欄位的年份,月份,日等資料 Trunc() 的作用則是截取,比如 2022-0 ......

    uj5u.com 2023-04-20 07:23:45 more
  • 一天吃透JVM面試八股文

    什么是JVM? JVM,全稱Java Virtual Machine(Java虛擬機),是通過在實際的計算機上仿真模擬各種計算機功能來實作的。由一套位元組碼指令集、一組暫存器、一個堆疊、一個垃圾回收堆和一個存盤方法域等組成。JVM屏蔽了與作業系統平臺相關的資訊,使得Java程式只需要生成在Java虛擬機 ......

    uj5u.com 2023-04-20 07:23:31 more
  • 使用Java接入小程式訂閱訊息!

    更新完微信服務號的模板訊息之后,我又趕緊把微信小程式的訂閱訊息給實作了!之前我一直以為微信小程式也是要企業才能申請,沒想到小程式個人就能申請。 訊息推送平臺🔥推送下發【郵件】【短信】【微信服務號】【微信小程式】【企業微信】【釘釘】等訊息型別。 https://gitee.com/zhongfuch ......

    uj5u.com 2023-04-20 07:22:59 more
  • java -- 緩沖流、轉換流、序列化流

    緩沖流 緩沖流, 也叫高效流, 按照資料型別分類: 位元組緩沖流:BufferedInputStream,BufferedOutputStream 字符緩沖流:BufferedReader,BufferedWriter 緩沖流的基本原理,是在創建流物件時,會創建一個內置的默認大小的緩沖區陣列,通過緩沖 ......

    uj5u.com 2023-04-20 07:22:49 more
  • Java-SpringBoot-Range請求頭設定實作視頻分段傳輸

    老實說,人太懶了,現在基本都不喜歡寫筆記了,但是網上有關Range請求頭的文章都太水了 下面是抄的一段StackOverflow的代碼...自己大修改過的,寫的注釋挺全的,應該直接看得懂,就不解釋了 寫的不好...只是希望能給視頻網站開發的新手一點點幫助吧. 業務場景:視頻分段傳輸、視頻多段傳輸(理 ......

    uj5u.com 2023-04-20 07:22:42 more
  • Windows 10開發教程_編程入門自學教程_菜鳥教程-免費教程分享

    教程簡介 Windows 10開發入門教程 - 從簡單的步驟了解Windows 10開發,從基本到高級概念,包括簡介,UWP,第一個應用程式,商店,XAML控制元件,資料系結,XAML性能,自適應設計,自適應UI,自適應代碼,檔案管理,SQLite資料庫,應用程式到應用程式通信,應用程式本地化,應用程式 ......

    uj5u.com 2023-04-20 07:22:35 more