【正文】
=“ Select * From 學生成績表 Where 學號 =‘ ”++“ ’ And 課程號 =‘ ” ++“ ’ ” StrSQL ‘ 第二步:如果關鍵字重復,則退出程序 If Not Then (本小點 3 分) MsgBox “ 記錄已存在,不能繼續(xù)增加 ” Exit Sub End If ‘ 第三步:將結果 插入到學生成績表中 StrSQL=“ Insert Into 學生成績表 (學號 ,課程號 ,成績 ) Values(‘” ++“ ’ ,‘” ++“ ’ , ”+Str(Val())+“ )” StrSQL End Sub 設學生成績表的結構為 (學號、課程號、成績),程序運行界面如圖 1 所示。進入界面后,用戶輸入所有數(shù)據(jù),點擊“確認”按鈕,將結果插入到課程表 courses中。請補充完成下列程序代碼。 圖 2“修改記錄”窗體運行界 Private Sub Command1_Click() ‘ 聲明一個字符串變量 Dim strSQL AS String ‘ 第一步:拼寫 Update語句 strSQL=“ Update 職工工資表 Set 工資數(shù) =“ +Text3+” Where 職工編號 =‘ “ ++” ’ And 工資項編號 =‘ “ ++” ’” ‘ 第二步:執(zhí)行 Update語句 strSQL End Sub Visafree policy brings Chengdu biz, tourism boost. Making national headlines several times, Chengdu39。s ancient indigenous religion, while Du jiang yan is considered to be the oldest functioning watercontrol project in the world. Chengdu ranked third in tourist facilities, management and services among 60 Chinese cities in a customer satisfaction survey released last year. But, Li added that efforts are still needed to develop more touris m products, improve English services and provide accurate translation of traffic signs and scenic billboards. Zhao Yun, chairwoman of British Chamber of Commerce Southwest China, told China Daily that his colleagues found the policy very convenient. A British client once flew here and stayed for just one day to check her ordered goods, she said. Zhao was born in Shanxi province, but she has lived in Chengdu for more than 10 years. My life was like a running race moving from place to place. I also lived in Beijing and Shanghai before, she said. But Chengdu is a place that you never want to leave once settling down. It is now my second hometown, she said. If the environment is further improved, the city will attract more people to visit and live, with the 72hour visafree policy and pelling conditions in transportation, culture, climate and cuisine, he said. Foreigners also gave positive feedback on the policy. A spokesman from Dell Inc said the pany has a global hub of operation in Chengdu, so the threeday visa has an immediate and positive influence on the pany39。an. Lou held a joint interview with 27 media, including China Daily, the first in a series of interviews entitled Chinese Media Along the Silk Road. The interviews will be in Shaanxi and Gansu provinces and the Xinjiang Uygur autonomous region, as well as Kazakhstan, Uzbekistan and Turkey. The media group held the first interview on Wednesday morning in Xi39。s public security bureau shows some 100 foreign visitors enjoyed the 72hour policy by the end of March, most of them from the United States, the United Kingdom and Germany. Chengdu also reported robust growth in its overall tourist industry last year. Official statistics show that it received some 150 million tourists last year, an increase of 28 percent from 2021. Around million came from abroad, an increase of 12 percent. Total revenue from touris m surpassed 133 billion yuan ($). During his visit to Kazakhstan in September, Chinese President Xi Jinping proposed that China and Central Asia join hands to build a Silk Road economic belt to boost cooperation. The idea has been widely echoed in Central Asian countries, being an encouraging blueprint for Chinese areas along the Silk Road that has linked Asia and Europe for more than 2,000 years. In the next three weeks, China Daily reporters will travel through the belt in China and in Kazakhstan, Uzbekistan and Turkey. They will show the progress and expectations of the countries, businesses and peoples on the route. Shaanxi the start of the ancient Silk Road has positioned itself as the new starting point for the development of the Silk Road Economic Belt, which will strengthen China39。s level of internationalization. The policy will also bring direct economic revenue, Li said. Chengdu has many cultural legacies and is also a paradise for panda lovers with the world39。進入界面后,用戶首先選擇職工編號( Combo1)、工資項編號 (Combo2),職工姓名 (Text1)和工資項名稱 (Text2)從數(shù)據(jù)庫中自動讀入;然后,用戶修改對應的工資數(shù)( Text3),點擊“確認”按鈕后,將結果更新到學生成績表中。 圖 2“增加記錄”窗體運行界面 Private Sub Command1_Click() ‘ 聲明一個記錄集對象 Dim ADOrs As New Recordset ‘ 將記錄集對象與已 建立的數(shù)據(jù)庫聯(lián)接對象 ADO 綁定 =ADO 第一步:在課程表 Courses 中查詢是否存在關鍵字相同的記錄 strSQL=“ Select CNo From courses Where Cno=‘” + Text1 + “’” StrSQL ‘ 第二步:如果記錄已經存在,則退出程序 If Not Then MsgBox “ 記錄已存在,不能繼續(xù)增加 ” Exit Sub End If ‘ 第三步:將結果插入到課程表 Courses中 strSQL = “ Insert Into courses(Cno,CName) Values(‘” +Text1+“’ ,‘” +Text2+“’ )” strSQL (本小點 6 分) End Sub 接第五大題第 2 小題,現(xiàn)要求開 發(fā)物資管理信息系統(tǒng), 物資臺帳錄入功能的界面如圖 1 所示,其中 Text1 為物資編號、 Text2為物資名稱、 Text3 為物資單價。請補充完成下列程序代碼。進入界面后, 用戶首先選擇學號( Combo1)、課程號 (Combo2),姓名 (Text1)和課程名 (Text2)從數(shù)據(jù)庫中自動讀入;然后,用戶輸入對應的成績( Text3),點擊“確認”按鈕后,將結果插入到學生成績表中。 Cno 是該表主鍵,字符型(長度 10)。 TNo是主鍵,請用 SQL 語句創(chuàng)建該數(shù)據(jù)表 T。該數(shù)據(jù)表與物資臺賬數(shù)據(jù)表 T 之間存在外鍵約束,即物資臺賬數(shù)據(jù)表 T 中不存在的記錄不能夠出現(xiàn)在該表中。 CREATE TABLE T ( TNo CHAR(20) PRIMARY KEY, TN CHAR(20), TD Money )。課程表 Courses 包括課程號 CNo,課程名 CName 兩個字段;成績表 marks 包括學號 SNo,課程號 CNo 和成績 mark三個字段。 SNo 和 SName 均為字符型(長度 10), SD 為日期型。 .用 SQL語句創(chuàng)建數(shù)據(jù)表 在上題基礎上 ,假設還存在教師教授課程關系 TC,包括教師編號 TNo 和課程號 CNo。模式匹配過程中,常規(guī)字符必須與字符串中指定的字符完 全匹配。在使用事務的情況下, SQL Server 可以保證,所有的記錄要么全部處理,要么一行也不處理。它是 SQL 復雜程序設計必不可少的內容。更嚴格意義上講,備份應該是一種把數(shù)據(jù)從硬盤上復制到其他可移動介質上的操作過程。 規(guī)范化使用的理論是函數(shù)依賴。 為什么要進行規(guī)范化?規(guī)范化的相關理論是什么?請簡要說明。 ( 3)復合索引:是針對基本表中兩個或兩個以上列建立的索引。 實際的索引通常是這兩大類 5 種方式的組合。狹義上講,數(shù)據(jù)庫系統(tǒng)主要指數(shù)據(jù)庫和數(shù)據(jù)庫管理系統(tǒng),由于這二者在應用中的相互依賴性,所以在一般不引起混淆的情況下常常把數(shù)據(jù)庫系統(tǒng)簡稱為數(shù)據(jù)庫。數(shù)據(jù)庫所保存的數(shù)據(jù)是指長期儲存在計算機內、有組織的、可共享的數(shù)據(jù)集合。事務日志文件主要用于存儲數(shù)據(jù)庫的更新情況等事務日志信息。 數(shù)據(jù)字典( Data Diction