精通数据库系列之入门-技巧篇3_MySQL
作者:思索 整理:南海
下面,笔者还为各位网友准备了一套数据库大餐,这就是在
MS-SQL Server下的Client/Server结构编程示例:
MS-SQL SERVER是微软公司生产的中型关系数据库管理系统,它有如下的一些特点:
客户/服务器体系结构
图形化的用户界面,使系统的管理更加直观和简单。
丰富的编程接口,为用户进行应用程序设计提供了更大的选择余地。
与Windows NT操作系统的有机集成,多线程体系结构设计,提高了系统对用户并发访问的速度。
对Web技术的支持,使用户能够很容易的将数据库中的数据发布到网上。
价格上的优势。与其它一些大型数据库系统如Oracle、Sybase等相比,SQL Server的价格非常便宜。
由于SQL Server数据库管理系统具有突出的有点,所以其用户越来越多。本文中陈述的是一些使用SQL Server的方法和体会(以SQL Server6.5为例)。
一、系统的安装
SQL Server要求安装在Windows NT操作系统平台下,它可以和NT一起运行在Intel x86、Alpha AXP或者MIPS等不同体系结构的微处理器环境。系统的内存和硬盘空间最小要求是16MB和96MB。在安装时,启动光盘上i386目录下的setup.exe程序,根据安装程序的提示可以很容易的完成系统安装。
安装过程中系统主要生成了SQL Enterprise Manager、SQL Web Assistant、ISQL_W、SQL Books Online等系统工具,其中SQL Enterprise Manager是最重要的一个工具,它可以实现对SQL Server数据库系统的全面操作和维护。
系统安装完毕后,有以下方法可以启动SQL Server服务:
使用net start mssqlserver命令启动SQL Server服务。
系统自动启动。
使用系统管理工具SQL Enterprise Manager或SQL Service Manager启动服务。
使用Windows NT控制面板里的服务选项启动SQL Server服务。
二、数据库的建立
从SQL Enterprise Manager的数据库管理窗口选择“新建”按钮,弹出新建数据库对话框(如下页图所示)。在这个对话框中输入新建数据库的名称,选择存储数据库及其日志所使用的设备,输入它们的空间大小(以MB为单位),再根据需要选择Create for Load复选框(该复选框说明是否从一个备份库中向新建的数据库加载数据),然后选择“OK”按钮即可创建一个新的数据库。
另外,使用SQL语句也可以创建数据库:
CREATE DATABASE MyDataBase
[ON {DEFAULT | database_device}[=size]
[,database_device [=size]] …]
[LOG ON database_device [=size]
[,database_device [=size]] … ]
[FOR LOAD]
其中size是以MB为单位。
三、表格的建立
从SQL Enterprise Manager的数据库管理窗口选择DataBases->DataBaseName-> Objects->Tables,弹出新建数据表对话框(如图所示)。
在这个对话框里设置属性的名称、数据类型、字段长度、是否可以为空以及缺省值等。
设置完毕后点击“存储”的图标,完成表单的存储。
四、使用前端开发工具编程操纵数据库
本例中前端开发工具采用Inprise Delphi4.0,通过前端程序实现对后台数据库的操作,这也是Client/Server的标准结构。
首先在Delphi的表单上(Form)放置一些必须的控件,分别是:DataBase、Table、DataSource、DBGrid、DBNavigator。其中DataBase的属性设置为: (数据库服务器的地址) (数据库的用户名) (这里假设口令为123456)
然后将Table的DataBaseName属性设置为和DataBase控件的DataBaseName属性相同。TableName属性选择成为么操纵的数据库。
再将DataSource控件的DataSet设为Table1(Table控件的Name)。DBGrid和DBNavigator的DataSource属性都为DataSource1(DataSource控件的Name)。
进行以上的设置之后,就完成了一个可以操纵数据库表单的最简单的程序,程序的运行界面如下:
以上实现的是基于Client/Server结构的数据库编程,在Windows NT 4.0+MS SQL Server6.5下调试通过(PIII550,256M RAM)。
另外,我们还有基于MS-SQL Server的Browser/Server结构程序设计示例,将在以后的JSP/ASP讲座中实现。
本讲到此结束,祝各位朋友愉快!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Kimi: In just one sentence, in just ten seconds, a PPT will be ready. PPT is so annoying! To hold a meeting, you need to have a PPT; to write a weekly report, you need to have a PPT; to make an investment, you need to show a PPT; even when you accuse someone of cheating, you have to send a PPT. College is more like studying a PPT major. You watch PPT in class and do PPT after class. Perhaps, when Dennis Austin invented PPT 37 years ago, he did not expect that one day PPT would become so widespread. Talking about our hard experience of making PPT brings tears to our eyes. "It took three months to make a PPT of more than 20 pages, and I revised it dozens of times. I felt like vomiting when I saw the PPT." "At my peak, I did five PPTs a day, and even my breathing was PPT." If you have an impromptu meeting, you should do it

In the early morning of June 20th, Beijing time, CVPR2024, the top international computer vision conference held in Seattle, officially announced the best paper and other awards. This year, a total of 10 papers won awards, including 2 best papers and 2 best student papers. In addition, there were 2 best paper nominations and 4 best student paper nominations. The top conference in the field of computer vision (CV) is CVPR, which attracts a large number of research institutions and universities every year. According to statistics, a total of 11,532 papers were submitted this year, and 2,719 were accepted, with an acceptance rate of 23.6%. According to Georgia Institute of Technology’s statistical analysis of CVPR2024 data, from the perspective of research topics, the largest number of papers is image and video synthesis and generation (Imageandvideosyn

We know that LLM is trained on large-scale computer clusters using massive data. This site has introduced many methods and technologies used to assist and improve the LLM training process. Today, what we want to share is an article that goes deep into the underlying technology and introduces how to turn a bunch of "bare metals" without even an operating system into a computer cluster for training LLM. This article comes from Imbue, an AI startup that strives to achieve general intelligence by understanding how machines think. Of course, turning a bunch of "bare metal" without an operating system into a computer cluster for training LLM is not an easy process, full of exploration and trial and error, but Imbue finally successfully trained an LLM with 70 billion parameters. and in the process accumulate

Editor of the Machine Power Report: Yang Wen The wave of artificial intelligence represented by large models and AIGC has been quietly changing the way we live and work, but most people still don’t know how to use it. Therefore, we have launched the "AI in Use" column to introduce in detail how to use AI through intuitive, interesting and concise artificial intelligence use cases and stimulate everyone's thinking. We also welcome readers to submit innovative, hands-on use cases. Video link: https://mp.weixin.qq.com/s/2hX_i7li3RqdE4u016yGhQ Recently, the life vlog of a girl living alone became popular on Xiaohongshu. An illustration-style animation, coupled with a few healing words, can be easily picked up in just a few days.

Retrieval-augmented generation (RAG) is a technique that uses retrieval to boost language models. Specifically, before a language model generates an answer, it retrieves relevant information from an extensive document database and then uses this information to guide the generation process. This technology can greatly improve the accuracy and relevance of content, effectively alleviate the problem of hallucinations, increase the speed of knowledge update, and enhance the traceability of content generation. RAG is undoubtedly one of the most exciting areas of artificial intelligence research. For more details about RAG, please refer to the column article on this site "What are the new developments in RAG, which specializes in making up for the shortcomings of large models?" This review explains it clearly." But RAG is not perfect, and users often encounter some "pain points" when using it. Recently, NVIDIA’s advanced generative AI solution

The Xiaomi Mi 15 series is expected to be officially released in October, and its full series codenames have been exposed in the foreign media MiCode code base. Among them, the flagship Xiaomi Mi 15 Ultra is codenamed "Xuanyuan" (meaning "Xuanyuan"). This name comes from the Yellow Emperor in Chinese mythology, which symbolizes nobility. Xiaomi 15 is codenamed "Dada", while Xiaomi 15Pro is named "Haotian" (meaning "Haotian"). The internal code name of Xiaomi Mi 15S Pro is "dijun", which alludes to Emperor Jun, the creator god of "The Classic of Mountains and Seas". Xiaomi 15Ultra series covers

Since the Huawei Mate60 series went on sale last year, I personally have been using the Mate60Pro as my main phone. In nearly a year, Huawei Mate60Pro has undergone multiple OTA upgrades, and the overall experience has been significantly improved, giving people a feeling of being constantly new. For example, recently, the Huawei Mate60 series has once again received a major upgrade in imaging capabilities. The first is the new AI elimination function, which can intelligently eliminate passers-by and debris and automatically fill in the blank areas; secondly, the color accuracy and telephoto clarity of the main camera have been significantly upgraded. Considering that it is the back-to-school season, Huawei Mate60 series has also launched an autumn promotion: you can enjoy a discount of up to 800 yuan when purchasing the phone, and the starting price is as low as 4,999 yuan. Commonly used and often new products with great value

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps
