一、基本操作题 在考生文件夹下,samp1.mdb数据库文件中已建立表对象tVisitor,同时在考生文件夹下还存有exam.mdb数据库文件。试按以下操作要求,完成表对象tVisitor的编辑和表对象tLine的导入: (1)设置游客ID字段为主键; (2)设置姓名字段为必填字段; (3)设
在考生文件夹下,“samp1.mdb”数据库文件中已建立表对象“tVisitor”,同时在考生文件夹下还存有“exam.mdb”数据库文件。试按以下操作要求,完成表对象“tVisitor”的编辑和表对象“tLine”的导入:
(1)设置“游客ID”字段为主键;
(2)设置“姓名”字段为“必填”字段;
(3)设置“年龄”字段的“有效性规则”属性为:大于等于10且小于等于60;
(4)设置“年龄”字段的“有效性文本”属性为:“输入的年龄应在10岁到60岁之间,请重新输入。”;
(5)在编辑完的表中输入如下一条新记录,其中“照片”字段数据设置为考生文件夹下的“照片1.bmp”图像文件。
(6)将“exam.mdb”数据库文件中的表对象“tLine”导入到“samp1.mdb”数据库文件内,表名不变。
二、简单应用题
考生文件夹下存在一个数据库文件“samp2.mdb”,里面已经设计好两个表对象“tBand”和“tLine”。试按以下要求完成设计:
(1)创建一个查询,查找并显示“团队ID”、“导游姓名”、“线路名”,“天数”,“费用”,等五个字段的内容,所建查询命名为“qT1”;
(2)创建一个查询,查找并显示旅游“天数”在五到十天之间(包括五天和十天)的“线路名”、“天数”和“费用”,所建查询名为“qT2”;
(3)创建一个查询,能够显示“tLine”表的所有字段内容,并添加一个计算字段“优惠后价格”,计算公式为:优惠后价格=费用*(1-10%),所建查询名为“qT3”;
(4)创建一个查询,删除“tBand”表中出发时间在2002年以前(不含2002年)的团队记录,所建查询命名为“qT4”。
三、综合应用题
考生文件夹下存在一个数据库文件“samp3.mdb”,里面已经设计好表对象“tBand”和“tLine”,同时还设计出以“tBand”和“tLine”为数据源的报表对象“rBand”。试在此基础上按照以下要求补充报表设计:
(1)在报表的报表页眉节区位置添加一个标签控件,其名称为“bTitle”,标题显示为“团队旅游信息表”,字体名称为“宋体”,字体大小为22,字体粗细为“加粗”,倾斜字体为“是”;
(2)在“导游姓名”字段标题对应的报表主体区位置添加一个控件,显示出“导游姓名”字段值,并命名为“tName”;
(3)在报表的报表页脚区添加一个计算控件,要求依据“团队ID”来计算并显示团队的个数。计算控件放置在“团队数:”标签的右侧,计算控件命名为“bCount”;
(4)将报表标题设置为“团队旅游信息表”。
注意:不允许改动数据库文件中的表对象“tBand”和“tLine”,同时也不 允许修改报表对象“rBand”中已有的控件和属性。

In MySQL, sorting uses the ORDERBY clause, and ranking uses the RANK(), DENSE_RANK(), and ROW_NUMBER() functions. 1. Sort: Use ORDERBY clause, such as SELECT*FROMemployeesORDERBYsalaryDESC; 2. Ranking: Use window functions, such as SELECTemployee_name, salary, RANK()OVER(ORDERBYsalaryDESC)ASrankFROMemployees; these operations are based on SQL query optimizer and execution engine, and are often used to sort quickly or merge sort, and ranking depends on window function calculation.

To create and call stored procedures in MySQL, follow the following steps: 1. Create stored procedures: Use the CREATEPROCEDURE statement to define stored procedures, including names, parameters, and SQL statements. 2. Compile stored procedures: MySQL compiles stored procedures into executable code and stores them. 3. Call stored procedure: use CALL statement and pass parameters. 4. Execute stored procedures: MySQL executes the SQL statements in it, processes parameters and returns the result.

The MySQL service can be set to automatically start on Windows, Linux, and macOS. 1) On Windows, use the command "scconfigmysqlstart=auto" to configure. 2) On Linux, enable it using "sudosystemctlenablemysql". 3) On macOS, create and load the launchd configuration file to achieve automatic startup.

The methods to view the MySQL table structure include: 1. Use the DESCRIBE command to view column information; 2. Use the SHOWCREATETABLE command to view table creation statements; 3. Use information_schema to query more detailed information. These methods help to quickly understand table structure and improve work efficiency.

Installing MySQL on macOS can be achieved through the following steps: 1. Install Homebrew, using the command /bin/bash-c"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". 2. Update Homebrew and use brewupdate. 3. Install MySQL and use brewinstallmysql. 4. Start MySQL service and use brewservicesstartmysql. After installation, you can use mysql-u

In MySQL, conditional filtering is implemented through the WHERE clause and grouping is completed through the GROUPBY clause. 1. Use the WHERE clause to filter data, such as finding employees with salary above 5,000. 2. Use the GROUPBY clause to group and aggregate data, such as counting the number of employees by department. 3. Choose the appropriate index to optimize query performance and avoid using functions or expressions as WHERE conditions. 4. Combining subqueries and EXPLAIN commands improve the efficiency of complex queries.

In MySQL, clearing table data but preserving table structure can be implemented through the TRUNCATETABLE and DELETE commands. 1. The TRUNCATETABLE command quickly deletes all records and resets the self-increment column. 2. The DELETE command deletes data line by line, does not reset the self-increment column, and can delete specific records in combination with the WHERE clause.

Deduplication in MySQL mainly uses DISTINCT and GROUPBY. 1.DISTINCT is used to return unique values, such as SELECTDISTINCTname, ageFROMusers. 2. GROUPBY realizes deduplication through grouping and can perform aggregation operations, such as SELECTid, name, MAX(created_at)aslatest_dateFROMusersGROUPBYname.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment
