武汉理工大学 数据库系统原理总复习题(完整版含答案)

武汉理工大学 数据库系统原理总复习题(完整版含答案)
武汉理工大学 数据库系统原理总复习题(完整版含答案)

武汉理工大学数据库系统原理总复习题(完整版含答案)1. Questions

1.1What is the purpose of a database?

ANSWER:The purpose of a database is to help people track of things.

1.2What is the most commonly used type of database?

ANSWER: the most commonly used type of database is the relational database.

1.7 Define the terms data and information. Explain how the two terms differ.

ANSWER: Data are recorded facts and numbers.

we can now define information as:

●Knowledge derived from data.

●Data presented in a meaningful context.

●Data processed by summing, ordering, averaging, grouping, comparing or

other similar operations.

1.10 What problem can occur when a database is processed by more than one user?

ANSWER: When more than one user employs a database application, these is always the chance that one user's work may interfere with other's.

1.12 What is the purpose of the largest databases at e-commerce companies such as https://www.360docs.net/doc/ca545319.html,?

ANSWER: The largest databases are those that track customer browser behavior.(用来记录用户的浏览行为的。)

1.13 How do the e-commerce companies use these databases? .

ANSWER: E-commerce companies use Web activity databases to determine which items on a Web page are popular and successful and which are not.

1.14 How do digital dashboard and data mining applications differ from transaction processing applications?

ANSWER: Digital dashboards and other reporting systems assess past and current performance. Data mining applications predict future performance.

1.15 Explain why a small database is not necessarily simpler than a large one. What are the functions of application programs?

ANSWER: Supposed we have 2 company which are different in sales but have similar database. Though the difference in sale, both have the same kinds of data, about the same number of tables of data, and the same level of complexity in data relationships. Only the amount of data varies from one to the other. Thus, although a database for a small business may be small, it is not necessarily simple.

1.18 What is Structured Query Language (SQL), and why is it important?

ANSWER: Structured Query Language (SQL) is an internationally recognized standard language. Because it can be understood by all commercial DBMS products, in database processing and the fact that database applications typically send SQL statements to the DBMS for processing.

1.19 What does DBMS stand for?

ANSWER: The database management system.

1.20 What are the functions of the DBMS?

ANSWER: It can be used to create, process, and administer the database.

1.21 Name three vendors of DBMS products.

ANSWER: IBM, Microsoft, Oracle.

1.22 Define the term database.

ANSWER: A database is a self-describing collection of integrated tables.

1.23 Why is a database considered to be self-describing?

ANSWER: A database is self-describing because it contains a description of itself. Thus, databases contain not only tables of user data, but also tables of data that describe that user data.

1.24 What is metadata? How does this term pertain to a database?

ANSWER: databases contain not only tables of user data, but also tables of data that describe that user data. Such descriptive data is called metadata because it is data about data.

1.25 What advantage is there in storing metadata in tables?

ANSWER: Because metadata is stored in tables, you can use SQL to query it. Thus, by learning how to write SQL to query user tables, you will also learn how to write SQL to query metadata.

1.26 List the components of a database other than user tables and metadata.

? Tables of user data

? Metadata

? Indexes

? Stored procedures

? Triggers

? Security data

? Backup/recovery data

1.27 Is Microsoft Access a DBMS? Why or why not?

ANSWER: No, Microsoft Access is not just a DBMS. Rather, it is a personal database system: a DBMS plus an application generator.

Because although Microsoft Access contains a DBMS engine that creates, processes, and administers the database, it also contains form, report, and query components that are the Microsoft Access application generator

1.37 List several consequences of a poorly designed database.

ANSWER:

-They may require application developers to write overly complex and contrived SQL to get –wanted data.

-they may be difficult to adapt to new and changing requirements.

-they may fail in some other way.

1.38 Explain two ways that a database can be designed from existing data.

ANSWER:

The first type of database design involves databases that are constructed from existing Data.

A second way that databases are designed is for the development of new information systems.

1.39 What is a data warehouse? What is a data mart?

ANSWER: The data warehouse and data mart databases store data specifically organized for research and reporting purposes, and these data often are exported to other analytical tools, such as SAS‘s Enterprise Miner, IBM's SPSS Data Modeler, or TIBCO's Spot fire Metrics.

1.40 Describe the general process of designing a database for a new information system.

ANSWER: First, the team creates a data model from the requirements statements and then transforms that data model into a database design.

1.41 Explain two ways that databases can be redesigned.

ANSWER:

In the first, a database is adapted to new or changing requirements. This process sometimes is called database migration. In the migration process, tables may be created, modified, or removed; relationships may be altered; data constraints may be changed; and so forth.

The second type of database redesign involves the integration of two or more databases. This type of redesign is common when adapting or removing legacy systems. It is also common for enterprise application integration, when two or more previously separate information systems are adapted to work with each other.

1.42 What does the term database migration mean?

ANSWER: The process of a database is adapted to new or changing requirements.

1.43 Summarize the various ways that you might work with database technology.

ANSWER: In our career, we may work with database technology as either a user or as a database administrator.

As a user, you may be a knowledge worker who prepares reports, mines data, and does other types of data analysis or you may be a programmer who writes applications that process the database.

Alternatively, you might be a database administrator who designs, constructs, and manages the database itself. Users are primarily concerned with constructing SQL statements to get and put the data they want. Database administrators are primarily concerned with the management of the database.

1.44 What job functions does a knowledge worker perform?

ANSWER: preparing reports, mining data, and doing other types of data analysis.

1.45 What job functions does a database administrator perform?

ANSWER: designing, constructing, and managing the database itself.

1.47 What need drove the development of the first database technology?

ANSWER: The need for data integration drove the development of the first database technology.

1.48 What are Data Language/I and CODASYL DBTG?

ANSWER:

Data Language/I (DL/I) used hierarchies or trees (see Appendix G) to represent relationships.

This subcommittee developed a standard data model that came to bear its name—the CODASYL DBTG model. It was an unnecessarily complicated model. This data relationship used data structures called networks.

1.49 Who was E. F. Codd?

ANSWER: E.F.Codd was a little-known IBM engineer published a paper in the Communications of the ACM3 in which he applied the concepts of a branch of mathematics called relational algebra to the problem of ―shared data banks,‖ as databases were then known. The results of this work are now the relational model for databases, and all relational database DBMS products are built on this model.

1.50 What were the early objections to the relational model?

1.51 Name two early relational DBMS products.

ANSWER: Oracle Database, DB2.

1.52 What are some of the reasons for the success of Oracle Database?

ANSWER:

1, it would run on just about any computer and just about any operating system.

2, Oracle Database had, and continues to have, an elegant and efficient internal design.

1.53 Name three early personal computer DBMS products.

ANSWER: dBase, R:base, Paradox.

1.55 What was the purpose of OODBMS products? State two reasons that OODBMS products were not successful.

ANSWER: They were designed to make it easy to store the data encapsulated in OOP objects.

There were two reasons for their lack of acceptance. First, using an OODBMS required that the relational data be converted from relational format to object-oriented format. By the time OODBMS emerged, billions upon billions of bytes of data were stored in relational format in organizational databases. No company was willing to undergo the expensive travail of converting those databases to be able to use the new OODBMS.

Second, object-oriented databases had no substantial advantage over relational databases for most commercial database processing. As you will see in the next chapter, SQL is not object oriented. But it works, and thousands of developers have created programs that use it. Without a demonstrable advantage over relational databases, no organization was willing to take on the task of converting their data to OODBMS format.

1.56 What characteristic of HTTP was a problem for database processing applications?

ANSWER: HTTP is a stateless protocol; a server receives a request from a user, processes the request, and then forgets about the user and the request. Many database interactions are multistage. A customer views products, adds one or more to a shopping cart, views more products, adds more to the shopping cart, and eventually checks out. A stateless protocol cannot be used for such applications.

1.57 What is an open source DBMS product? Which of the five DBMS products that you named in answering Review Question 1.36 is historically an open source DBMS product?

ANSWER: the MySQL DBMS.这套试卷没有1.36题啊。

1.58 What has been the response of companies that sell proprietary DBMS products to the open source DBMS products? Include two examples in your answer.

ANSWER: One interesting outcome of the emergence of open source DBMS products is that companies that typically sell proprietary (closed source) DBMS products now offer free versions of their products. For example, Microsoft now offers SQL Server 2008 R2 Express (www.microsoft. com/express/Database), and Oracle Corporation makes its Oracle Database 10g Express Edition available for free.

1.59 What is XML? What comment did Bill Gates make regarding XML?

ANSWER: XML means Extensible Markup Language.

Bill Gates said that ―XML is the lingua-franca of the Internet Age.‖

1.60 What is the NoSQL movement? Name two applications that rely on NoSQL databases.

ANSWER: It‘s the work is really on databases are often based on XML.

Two applications that rely on NoSQLdatabases: Facebook and Twitter.

2.1 What is a business intelligence (BI) system?

ANSWER: Application refers to the collection of commercial information, the integration, analysis and the technical reports.

2.2 What is an ad-hoc query?

ANSWER: ad-hoc SQL queries is how SQL is used to ―ask questions‖ about the data in the database.

2.3 What does SQL stand for, and what is SQL?

ANSWER: SQL stand for Structured Quqery Language. SQL is not a complete programming language, like Java or C#. Instead, it is called a data sublanguage, because it has only those statements needed for creating and processing database data and metadata.

2.4 What does SKU stand for? What is an SKU?

SKU stand for stock-keeping unit. SKU is a unique identifier for each particular item that Cape Codd sells.

2.5 Summarize how data were altered and filtered in creating the Cape Codd data extraction.

ANSWER: the ORDER_ITEM table stores an extract of the items purchased in each order. There is one row in the table for each item in an order, and this item is identified by its SKU.

The OrderNumber Column in ORDER_ITEM relates each row in ORDER_ITEM to the corresponding OrderNumber in the RETAIL_ORDER table. SKU identifies the actual item purchased by its stock-keeping unit number. Further, the SKU column in ORDER_ITEM relates each row in ORDER_ITEM to its corresponding SKU in the SKU_DATA table

2.6 Explain, in general terms, the relationships among the RETAIL_ORDER, ORDER_ITEM,and SKU_DATA tables.

ANSWER: In general, RETAIL_ORDER, ORDER_ITEM, and SKU_DATA. The RETAIL_ORDER table has data about each retail sales order, the ORDER_ITEM table has data about each item in an order, and the SKU_DATA table has data about each stock-keeping unit (SKU)

2.7 Summarize the background of SQL.

ANSWER: SQL was developed by the IBM Corporation in the late 1970s. It was endorsed as a national standard by the American National Standards Institute (ANSI) in 1986 and by the International Organization for Standardization (ISO).

2.8 What is SQL-92? How does it relate to the SQL statements in this chapter?

ANSWER: Subsequent versions of SQL were adopted in 1989 and 1992. The 1992 version is sometimes referred to as SQL-92, or sometimes as ANSI-92 SQL. 2.9 What features have been added to SQL in versions subsequent to the SQL-92?

ANSWER: All the new versions of SQL support for Extensible Markup Language (XML) and there are many other common language features.

2.10 Why is SQL described as a data sublanguage?

ANSWER: Because it has only those statements needed for creating and processing database data and metadata. You can use SQL statements in many different ways. You can submit them directly to the DBMS for processing. You can embed SQL statements into client/server application programs. You can embed them into Web pages, and you can use them in reporting and data extraction programs. You also can execute SQL statements directly from Visual https://www.360docs.net/doc/ca545319.html, and other development tools.

2.11 W hat does DML stand for? What are DML statements?

ANSWER: DML stand for Data Manipulation Language, which is a category of SQL. Data manipulation language (DML) statements, which are used for querying, inserting, modifying, and deleting data.

2.12 What does DDL stand for? What are DDL statements?

ANSWER: DDL stand for Data definition language, which is a category of SQL. Data definition language (DDL) statements, which are used for creating tables, relationships, and other structures

2.13 What is the SQL SELECT/FROM/WHERE framework?

ANSWER: The basic form of SQL queries uses the SQL SELECT/FROM/WHERE framework.

In this framework:

? T he SQL SELECT clause specifies which columns are to be listed in the query results.

? The SQL FROM clause specifies which tables are to be used in the query.

? The SQL WHERE clause specifies which rows are to be listed in the query results.

2.14 Explain how Microsoft Access uses SQL.

ANSWER: Every time you process a form, create a report, or run a query Microsoft Access generates SQL and sends that SQL to Microsoft Access‘ internal ADE DBMS engine. To do more than elementary database processing, you need to uncover the SQL hidden by Microsoft Access. Further, once you know SQL, you will find it easier to write a query statement in SQL rather than fight with the graphical forms, buttons.

2.15 Explain how enterprise-class DBMS products use SQL

ANSWER: Enterprise-class DBMSs such as Microsoft SQL Server 2008 R2, Oracle Database 11g, Oracle MySQL 5.5, and IBM DB2 require that you know SQL. With these products, all data manipulation is expressed using SQL.

2.16 The Cape Codd Outdoor Sports sale extraction database has been modified to include two additional tables, the INVENTORY table and the WAREHOUSE table. The table schemas for these tables, together with the SKU table, are as follows: RETAIL_ORDER (OrderNumber, StoreNumber, StoreZip, OrderMonth, OrderYear, OrderTotal) ORDER_ITEM (OrderNumber, SKU, Quantity, Price, ExtendedPrice) SKU_DATA (SKU, SKU_Description, Department, Buyer)

WAREHOUSE (WarehouseID, WarehouseCity, WarehouseState, Manager, Squarefeet)

INVENTORY (WarehouseID, SKU, SKU_Description, QuantityOnHand, QuantityOnOrder)

The five tables in the revised Cape Codd database schema are shown in Figure 2-23. The column characteristics for the WAREHOUSE table are shown in Figure 2-24, and the column characteristics for the INVENTORY table are shown in Figure 2-25. The data for the WAREHOUSE table are shown in Figure 2-26, and the data for the INVENTORY table are shown in Figure 2-27.

If at all possible, you should run your SQL solutions to the following questions against an actual database. A Microsoft Access database named Cape-Codd.accdb is available on our Web site (https://www.360docs.net/doc/ca545319.html,/kroenke) that contains all the tables and data for the Cape Codd Outdoor Sports sales data extract database. Also available on our Web site are SQL scripts for creating and populating the tables for the

Cape Codd database in SQL Server, Oracle Database, and MySQL.

2.16 There is an intentional flaw in the design of the INVENTORY table used in these exer-cises. This flaw was purposely included in the INVENTORY tables so that you can answer some of the following questions using only that table. Compare the SKU and INVENTORY tables, and determine what design flaw is included in INVENTORY . Specifically, why did we include it? ORDER_ITEM OrderNumber SKU_Description RETAL_ORDER

OrderNumber StoreNumber WarehouseID SKU_Description WAREHOUSE WarehouseID WarehouseCity WarehouseState Figure 2-23 The Cape Codd Database with the WAREHOUSE and INVENTORY tables

Use only the INVENTORY table to answer Review Questions 2.17 through 2.40:

2.17 Write an SQL statement to display SKU and SKU_Description.

SELECT *

FROM INVENTORY

WHERE Column name=‖SKU‖ OR Column name=‖SKU_Description‖;

2.18 Write an SQL statement to display SKU_Description and SKU.

SELECT *

FROM INVENTORY

WHERE Column name=‖SKU_Description‖ OR Column name=‖SKU‖;

2.19 Write an SQL statement to display WarehouseID.

SELECT WarehouseID

FROM WAREHOUSE;

2.20 Write an SQL statement to display unique WarehouseIDs.

SELECT DISTINCT WarehouseID

FROM WAREHOUSE;

2.21 Write an SQL statement to display all of the columns without using the SQL asterisk(*) wildcard character.

ANSWER:

Let‘s take the table ―WAREHOUSE‖ as an example.

SELECT WarehouseID, WarehouseCity, WarehouseState, Manager, SquareFeet FROM WAREHOUSE.

2.22 Write an SQL statement to display all of the columns using the SQL asterisk (*)wildcard character.

Let‘s take the table ―WAREHOUSE‖ as an example.

SELECT *

FROM WAREHOUSE.

2.23 Write an SQL statement to display all data on products having a QuantityOnHand greater than 0.

SELECT *

FROM INVENTORY

WHERE QuantityOnHand>0;

2.24 Write an SQL statement to display the SKU and SKU_Description for products having QuantityOnHand equal to 0.

SELECT SKU, SKU_Description

FROM INVENTORY

WHERE QuantityOnHand=0;

2.25 Write an SQL statement to display the SKU, SKU_Description, and WarehouseID for products having QuantityOnHand equal to 0. Sort the results in ascending order by WarehouseID.

SELECT SKU, SKU_Description, WarehouseID

FROM INVENTORY

WHERE QuantityOnHand=0

ORDER BY WarehouseID;

2.26 Write an SQL statement to display the SKU, SKU_Description, and WarehouseID for products that have a QuantityOnHand greater than 0. Sort the results in descending order by WarehouseID and in ascending order by SKU.

SELECT SKU, SKU_Description, WarehouseID

FROM INVENTORY

WHERE QuantityOnHand>0

ORDER BY WarehouseID DESC, SKU ASC;

2.27 Write an SQL statement to display SKU, SKU_Description, and WarehouseID for all products that have a QuantityOnHand equal to 0 and a QuantityOnOrder greater than 0. Sort the results in descending order by WarehouseID and in ascending order by SKU.

SELECT SKU, SKU_Description, WarehouseID

FROM INVENTORY

WHERE QuantityOnHand=0 AND QuantityOnOrder>0

ORDER BY WarehouseID DESC, SKU ASC;

2.28 Write an SQL statement to display SKU, SKU_Description, and WarehouseID for all products that have a QuantityOnHand equal to 0 or a QuantityOnOrder equal to 0. Sort the results in descending order by WarehouseID and in ascending order by SKU.

SELECT SKU, SKU_Description, WarehouseID

FROM INVENTORY

WHERE QuantityOnHand=0 OR QuantityOnOrder=0

ORDER BY WarehouseID DESC, SKU ASC;

2.29 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, and QuantityOnHand for all products having a QuantityOnHand greater than 1 and less than 10. Do not use the BETWEEN keyword.

SELECT SKU, SKU_Description, WarehouseID, QuantityOnHand

FROM INVENTORY

WHERE QuantityOnHand>1 AND QuantityOnOrder<10

2.30 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, and QuantityOnHand for all products having a QuantityOnHand greater than 1 and less than 10. Use the BETWEEN keyword.

SELECT SKU, SKU_Description, WarehouseID, QuantityOnHand

FROM INVENTORY

WHERE QuantityOnHand BETWEEN 1 AND 10;

2.31 Write an SQL statement to show a unique SKU and SKU_Description for all products

having an SKU description starting with ?Half-dome‘.

SELECT DISTINCT SKU, SKU_Description

FROM INVENTORY

2.32 Write an SQL statement to show a unique SKU and SKU_Description for all products having a description that includes the word 'Climb'.

SELECT DISTINCT SKU, SKU_Description

FROM INVENTORY

WHERE SKU_Description LIKE ‘ %Climb% ‘;

2.33 Write an SQL statement to show a unique SKU and SKU_Description for all products having a ?d‘ in the third position from the left in SKU_Description.

SELECT DISTINCT SKU, SKU_Description

FROM INVENTORY

WHERE SKU_Description LIKE ‘ __d% ‘;

2.34 Write an SQL statement that uses all of the SQL built-in functions on the QuantityOn-Hand column. Include meaningful column names in the result.

SELECT SUM(QuantityOnHand) AS QuantitySum

A VG(QuantityOnHand) AS QuantityAvg

MIN(QuantityOnHand) AS QuantityMin

MAX(QuantityOnHand) AS QuantityMax

COUNT(QuantityOnHand) AS QuantityCount

FROM INVENTORY;

2.35 Explain the difference between the SQL built-in functions COUNT and SUM.

ANSWER: The build-in function COUNT means that calculating how many number are there in the table. But the function SUM means that adding all the number in the table which match the condition to get the sum.

2.36 Write an SQL statement to display the WarehouseID and the sum of QuantityOnHand,grouped by WarehouseID. Name the sum TotalItemsOnHand and display the results in descending order of TotalItemsOnHand.

SELECT WarehouseID , SUM (QuantityOnHand) AS TotalItamsOnHand

FROM INVENTORY

GROUP BY WarehouseID

ORDER BY TotalItemsOnHand DESC;

2.37 Write an SQL statement to display the WarehouseID and the sum of QuantityOnHand, grouped by WarehouseID. Omit all SKU items that have 3 or more items on hand from the sum, and name the sum TotalItemsOnHandLT3 and display the results in descending order of TotalItemsOnHandLT

3.

SELECT WarehouseID , SUM (QuantityOnHand) AS TotalItamsOnHandLT3

FROM INVENTORY

GROUP BY WarehouseID

ORDER BY TotalItemsOnHandLT3 DESC

HA VING SUM(Quantity)<3;

2.38 Write an SQL statement to display the WarehouseID and the sum of QuantityOn- Handgrouped by WarehouseID. Omit all SKU items that have 3 or more items on hand from the sum, and name the sum TotalItemsOnHandLT

3. Show WarehouseID only for warehouses having fewer than 2 SKUs in their TotalItemesOnHandLT3 and display the results in descending order of TotalItemsOnHandLT3.

SELECT WarehouseID , SUM (QuantityOnHand) AS TotalItamsOnHandLT3, COUNT (SKU)

FROM INVENTORY

GROUP BY WarehouseID

ORDER BY TotalItemsOnHandLT3 DESC

HA VING SUM(Quantity)<3 AND COUNT(SKU)<2;

2.39 In your answer to Review Question 2.39, was the WHERE clause or the HA VING clause applied first? Why?

ANSWER: WHERE clause applied first. Because WHERE clause filters the records before GROUP BY clause, but HA VING clause filters the records after GROUP BY clause.

Use both the INVENTORY and WAREHOUSE tables to answer Review Questions 2.40 through 2.52:

2.40 Write an SQL statement to display the SKU, SKU_Description, and WarehouseID, WarehouseCity, and WarehouseState for all items stored in the Atlanta, Bangor, or Chicago warehouse. Do not use the IN keyword.

ANSWER:

SELECT SKU, SKU_Description, WarehouseID, WarehouseCity, WarehouseState

FROM INVENTORY, WAREHOUSE

WHERE WarehouseCity=‘Atlanta‘ OR WarehouseCity=‘Chicago‘ OR WarehouseCity=‘Bangor‘ ;

WarehouseID, WarehouseCity, and WarehouseState for all items stored in the Atlanta, Bangor, or Chicago warehouse. Use the IN keyword.

SELECT SKU, SKU_Description, WarehouseID, WarehouseCity, WarehouseState

FROM INVENTORY, WAREHOUSE

WHERE WarehouseCity IN (?Atlanta‘, ‘Chicago‘, ‘Bangor‘);

2.42 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, Ware-houseCity, and WarehouseState of all items not stored in the Atlanta, Bangor, or Chicago warehouse. Do not use the NOT IN keyword.

SELECT SKU, SKU_Description, WarehouseID, WarehouseCity, WarehouseState

FROM INVENTORY, WAREHOUSE

WHERE WarehouseCity= ‘Seattle‘;

2.43 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, Ware-houseCity, and WarehouseState of all items not stored in the Atlanta, Bangor, or Chicago warehouse. Use the NOT IN keyword.

SELECT SKU, SKU_Description, WarehouseID, WarehouseCity, WarehouseState

FROM INVENTORY, WAREHOUSE

WHERE WarehouseCity NOT IN (?Atlanta‘, ‘Chicago‘, ‘Bangor‘);

2.44 Write an SQL statement to produce a single column called ItemLocation that combines the SKU_Description, the phrase ―is in a warehouse in‖,and WarehouseCity. Do not be concerned with removing leading or trailing blanks.

SELECT DISTINCT RTRIM (SKU_Description)+‘is in a warehouse‘ + RTRIM (WarehouseCity)

FROM INVENTORY, WAREHOUSE;

2.45 Write an SQL statement to show the SKU, SKU_Description, WarehouseID for all items stored in a warehouse managed by ?Lucille Smith‘. Use a subquery.

SELECT SKU, SKU_Description, WarehouseID

FROM INVENTORY, WAREHOUSE

WHERE WarehouseID IN

(SELECT WarehouseID

FROM WAREHOUSE

WHERE Manager=‘Lucille Smith‘);

all items stored in a warehouse managed by ?Lucille Smith‘. Use a join.

SELECT SKU, SKU_Description, WarehouseID

FROM INVENTORY, WAREHOUSE

WHERE INVENTORY.WarehouseID=WAREHOUSE.WarehouseID AND WAREHOUSE.Manager= ?Lucille Smith‘;

2.47 Write an SQL statement to show the WarehouseID and average QuantityOnHand of all items stored in a warehouse managed by ?Lucille Smith‘. Use a subquery.

SELECT WarehouseID, A VG(QuantityOnHand)

FROM INVENTORY

WHERE WarehouseID IN

(SELECT WarehouseID

FROM WAREHOUSE

WHERE Manager=‘ Lucille Smith‘);

2.48 Write an SQL statement to show the WarehouseID and average QuantityOnHand of all items stored in a warehouse managed by ?Lucille Smith‘. Use a j oin.

SELECT WarehouseID, A VG(QuantityOnHand)

FROM INVENTORY

WHERE INVENTORY.WarehouseID=WAREHOUSE.WarehouseID AND WAREHOUSE.Manager=‘ Lucille Smith‘;

2.49 Write an SQL statement to display the WarehouseID, the sum of QuantityOnOrder, and the sum of QuantityOnHand, grouped by WarehouseID and QuantityOnOrder. Name the sum of QuantityOnOrder as TotalItemsOnOrder and the sum of QuantityOnHand as TotalItemsOnHand.

SELECT WarehouseID, SUM(QuantityOnOrder) AS TotalItemsOnOrder, SUM(QuantityOnHand) AS TotalItemsOnHand

FROM INVENTORY

GROUP BY WarehouseID, QuantityOnOrder;

2.50 Write an SQL statement to show the WarehouseID, WarehouseCity, WarehouseState,Manager, SKU, SKU_Description, and QuantityOnHand of all items with a Manager of ?Lucille Smith‘. Use a join.

SELECT WarehouseID, WarehouseCity, WarehouseState, Manager, SKU, SKU_Description, QuantityOnHand

FROM INVENTORY, WAREHOUSE

WHERE INVENTORY.WarehouseID=WAREHOUSE.WarehouseID AND WAREHOUSE.manager=‘ Lucille Smith;‘

2.52 Explain how subqueries and joins differ.

ANSWER: The subqueries would create a new table which contain the information needed by the next query. But the joins only use the existed information in the recent tables.

3.5 Describe the characteristics of a table that make it a relation.

3.6 Give an example of two tables that are not relations.

ANSWER:

The table in Figure 3-7 is not a relation, because the entries for employees Caruthers and Caldera require a particular row arrangement. If the rows in this table were rearranged, we would not know which employee has the indicated Fax and Home numbers.

3.7 Suppose that two columns in two different tables have the same column name. What convention is used to give each a unique name?

ANSWER:For example, supposing we have two different tables named T1 and T2. The same column name of them is ―number‖. So w e can name them as ―T1.number‖and ―T2.number‖as a unique name for each.

3.8 Must all the values in the same column of a relation have the same length? ANSWER:Even though every cell of a relation must have a single value, this does not mean that all values must have the same length.

3.9 Explain the three different sets of terms used to describe tables, columns, and rows.

ANSWER:

① As defined by Codd, the column of a relation is called attribute, and the rows of a relation is called tuple. The most of practitioners mean relation when they say table.

②Some practitioners use the terms file, field, and record for the terms table, column, and row respectively. These terms arose from traditional data processing and they are common in connection with legacy systems.

3.10 Explain the difference between functional dependencies that arise from equations and those that do not.

ANSWER:Functional dependencies that arise from equations can let us compute the actual value. Functional dependencies that do not arise from equations tells us the character of the relationship between the different objects.

3.11 Intuitively, what is the meaning of the functional dependency :

PartNumber →PartWeight

ANSWER:PartNumber determines PartWeight

3.12 Explain the following statement: ―The only reason for having relations is to store instances of functional dependencies.

ANSWER:ObjectColor → (Weight, Shape)

For example, if there were a formula by which we could take ObjectColor and somehow compute Weight and Shape, then we would not need the table. We would just make the computation.

3.13 Explain the meaning of the expression:

(FirstName, LastName) → Phone

ANSWER:FirstName, and LastName determine Phone.

3.14 What is a composite determinant?

ANSWER:For example :(Quantity, UnitPrice) → ExtendedPrice

the composite determinant is the composite (Quantity, UnitPrice)

武汉理工大学考试试题纸

武汉理工大学考试试题纸 课程名称:知识产权法学专业班级:级法学 题号一二三四五六七八九十总分 题分 第一部分选择题(共分) 一、单项选择题(本大题共小题,每小题1分,共分)在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在题后的括号内。错选、多选或未选均无分。 .下列选项,哪项中含有保护期限不受时间限制的知识产权?() .著作权、外观设计专利权、植物新品种权 .商标权、商业秘密权、集成电路布图设计权 .计算机软件著作权、邻接权、实用新型专利权 .发明专利权、商标权、植物新品种权 .甲在创作武侠小说《神腿》的过程中,乙提供了辅助活动。小说创作完成后,由出版社丙出版。该书的著作权应归属于() .甲.甲和乙.丙.甲和丙 .以下诸权利中,保护期受限制的有() .署名权.修改权 .发表权.保护作品完整权 .张某经过努力创作出一篇学术论文,依我国著作权法的规定() . 张某只有在其论文发表后才能享有著作权 . 张某的论文不论是否发表都能享有著作权 . 张某的论文须经登记后才能享有著作权 . 张某的论文须加注版权标记后才能享有著作权 .下列各项作品中,其著作权由法人或其他组织享有的是() .记者为所在报社采编的人物专访 .设计人员利用单位物质技术条件创作的工程设计图 .教师为完成教学任务编写的教案 .专业作家创作的报告文学 .小说《师长》的作者甲授权乙将该小说改编成电影剧本,制片人丙委托导演丁将该剧本拍摄成电影。该片拍摄完成后,其著作权归属于() .甲.乙.丙.丁 .图书出版者对其出版的图书的版式设计所享有的权利的保护期为() .5年.10年.25年.50年 .甲为做博士学位论文,在图书馆复印了乙的两篇论文,根据我国著作权法,甲的这一行为属于().侵权行为.法定许可使用

武汉理工大学模电课设温度控制系统设计

课程设计任务书 学生姓名:张亚男专业班级:通信1104班 指导教师:李政颖 工作单位:信息工程学院 题目: 温度控制系统的设计 初始条件:TEC半导体制冷器、UA741 运算放大器、LM339N电压比较器、稳压管、LM35温度传感器、继电器 要求完成的主要任务: 一、设计任务:利用温度传感器件、集成运算放大器和Tec(Thermoelectric Cooler, 即半导体致冷器)等设计一个温度控制器。 二、设计要求:(1)控制密闭容器内空气温度 (2)控制容器容积>5cm*5cm*5cm (3)测温和控温范围0℃~室温 (4)控温精度±1℃ 三、发挥部分:测温和控温范围:0℃~(室温+10℃) 时间安排:19周准备课设所需资料,弄清各元件的原理并设计电路。 20周在仿真软件multisim上画出电路图并进行仿真。 21周周五前进行电路的焊接与调试,周五答辩。 指导教师签名:年月日 系主任(或责任教师)签名:年月日

温度控制系统的设计 1.温度控制系统原理电路的设计 (3) 1.1 温度控制系统工作原理总述 (3) 1.2 方案设计 (3) 2.单元电路设计 (4) 2.1 温度信号的采集与转化单元——温度传感器 (4) 2.2 电压信号的处理单元——运算放大器 (5) 2.3 电压值表征温度单元——万用表 (7) 2.4 电压控制单元——迟滞比较器 (8) 2.5 驱动单元——继电器 (10) 2.6 TEC装置 (11) 2.7 整体电路图 (12) 3.电路仿真 (12) 3.1 multisim仿真 (12) 3.2 仿真分析 (14) 4.实物焊接 (15) 5.总结及体会 (16) 6.元件清单 (18) 7.参考文献 (19)

全国自考数据库系统原理历年试题及答案

2008年1月高等教育自学考试全国统一命题考试 数据库系统原理试卷 4735 一、单项选择题(本大题共15小题,每小题2分,共30分) 在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在题后的括号内。错选、多选或未选均无分。 1.数据库在磁盘上的基本组织形式是( B ) A.DB B.文件 C.二维表D.系统目录 2.ER(实体联系模型)模型是数据库的设计工具之一,它一般适用于建立数据库的( A ) A.概念模型B.逻辑模型 C.内部模型D.外部模型 3.数据库三级模式中,用户与数据库系统的接口是( B ) A.模式B.外模式 C.内模式D.逻辑模式 4.在文件系统中,所具有的数据独立性是( D ) A.系统独立性

B.物理独立性 C.逻辑独立性 D.设备独立性 5.在DB技术中,“脏数据”是指( D ) A.未回退的数据 B.未提交的数据 C.回退的数据 D.未提交随后又被撤消的数据 6.关系模式至少应属于( A ) A.1NF B.2NF C.3NF D.BCNF 7.设有关系模式R(ABCD),F是R上成立的FD集,F={A→B,B→C},则属性集BD的闭包(BD)+为( B ) A.BD B.BCD C.BC D.CD 8.设有关系R如题8图所示:(C)

R 则 专业,入学年份(R)的元组数为 A.2 B.3 C.4 D.5 9.集合R与S的交可以用关系代数的基本运算表 示为( A ) A.R-(R-S) B.R+(R-S) C.R-(S-R) D.S-(R-S) l0.已知SN是一个字符型字段,下列SQL查询语 句( C ) SELECT SN FROM S WHERE SN LIKE′AB%′;的执行结果为 A.找出含有3个字符′AB%′的所有SN字段 B.找出仅含3个字符且前两个字符为′AB′的SN字段 C.找出以字符′AB′开头的所有SN字段

山东大学网络教育数据库系统原理期末考试试题及参考答案

数据库系统原理—线上 一、选择题 1、数据是以()的方式存储于操作系统(OS)之中的。 A、数据文件 B、日志文件 C、存储类型 D、并行 正确答案:A 2、()是指对数据进行分类、组织、编码、存储、检索和维护,它是数据处理的中心问题。 A、数据管理 B、数据处理 C、数据加工 D、数据收集 正确答案:A 3、数据库管理系统简称() A、DDA B、DB C、DBA D、DBMS 正确答案:D 4、Oracle数据库特点说法正确的是:() 1支持单用户、大事务量的事务处理 2数据安全性和完整性控制 3提供对于数据库操作的接口 4支持集中式数据处理 5可移植性、可兼容性和可连接性 A、12 B、235 C、35 D、25 正确答案:B 5、()是位于用户与操作系统之间的一层数据管理软件。 A、数据库管理系统 B、数据库 C、数据库系统 D、数据库管理员 正确答案:A 6、一般来说,数据库用户账号总是与某一登录账号相关联,但有一个例外那就是()用户 A、sa B、system C、guest D、admin 正确答案:C 7、()以自由软件为主。 A、MySQL B、SQL Server C、Dreanwaver D、Oracle 正确答案:A 8、数据库的简称()A、DAB、DBC、BDD、DD 正确答案:B 9、()是自由软件,因此不属于厂商产品,所以归属于应用中间件软件。 A、MSSQL B、MySQL C、oracle D、linux正确答案:B10、MS SQL Server 能在那两种安全模式下运行A、数据库认证模式 B、WINDOWS认证模式 C、混合模式 D、安全认证模式 正确答案:BC

数据库系统原理(2018年版)课后习题参考答案解析

答案仅供参考 第一章数据库系统概述 选择题 B、B、A 简答题 1.请简述数据,数据库,数据库管理系统,数据库系统的概念。 P27 数据是描述事物的记录符号,是指用物理符号记录下来的,可以鉴别的信息。 数据库即存储数据的仓库,严格意义上是指长期存储在计算机中的有组织的、可共享的数据集合。 数据库管理系统是专门用于建立和管理数据库的一套软件,介于应用程序和操作系统之间。数据库系统是指在计算机中引入数据库技术之后的系统,包括数据库、数据库管理系统及相关实用工具、应用程序、数据库管理员和用户。 2.请简述早数据库管理技术中,与人工管理、文件系统相比,数据库系统的优点。 数据共享性高 数据冗余小 易于保证数据一致性 数据独立性高 可以实施统一管理与控制 减少了应用程序开发与维护的工作量 3.请简述数据库系统的三级模式和两层映像的含义。 P31 答: 数据库的三级模式是指数据库系统是由模式、外模式和内模式三级工程的,对应了数据的三级抽象。 两层映像是指三级模式之间的映像关系,即外模式/模式映像和模式/内模式映像。 4.请简述关系模型与网状模型、层次模型的区别。 P35 使用二维表结构表示实体及实体间的联系 建立在严格的数学概念的基础上 概念单一,统一用关系表示实体和实体之间的联系,数据结构简单清晰,用户易懂易用 存取路径对用户透明,具有更高的数据独立性、更好的安全保密性。

第二章关系数据库 选择题 C、C、D 简答题 1.请简述关系数据库的基本特征。P48 答:关系数据库的基本特征是使用关系数据模型组织数据。 2.请简述什么是参照完整性约束。 P55 答:参照完整性约束是指:若属性或属性组F是基本关系R的外码,与基本关系S的主码K 相对应,则对于R中每个元组在F上的取值只允许有两种可能,要么是空值,要么与S中某个元组的主码值对应。 3.请简述关系规范化过程。 答:对于存在数据冗余、插入异常、删除异常问题的关系模式,应采取将一个关系模式分解为多个关系模式的方法进行处理。一个低一级范式的关系模式,通过模式分解可以转换为若干个高一级范式的关系模式,这就是所谓的规范化过程。 第三章数据库设计 选择题 B、C、C 简答题 1. 请简述数据库设计的基本步骤。 P66 需求分析设计;概念结构设计;逻辑结构设计;物理结构设计;数据库设计;数据库的运行和维护。 2. 请分别举例说明实体之间联系的三种表现情形。 P74 一对一联系:对于实体集A中的每个实体,实体集B中最多只有一个实体与之联系,反之亦然。举例:班级与班长,每个班只有一个班长,每个班长也只在一个班内任职。 一对多联系:对于实体集A中的每个实体,实体集B中有N个实体与之联系,反之,对于实体集B中的每个实体,实体集A中最多只有一个实体与之联系。举例:班级与班级成员,每个班级对应多个班级成员,每个班级成员只对应一个班级。 多对多联系:对于实体集A中的每个实体,实体集B中有N个实体与之联系,反之,对于实体集B中的每个实体,实体集A中有M个实体与之联系。举例:授课班级与任课教师,每个

专升本《数据库系统原理》_试卷_答案

专升本《数据库系统原理》 一、 (共53题,共150分) 1、数据库管理系统DBMS中用来定义模式、内模式与外模式的语言就是( )。 (2分) A、DML B、C C、DDL D、Basic 、标准答案:C 2、保证数据库系统正常工作的的核心软件就是( )。 (2分) A、编译系统 B、数据库 C、操作系统 D、数据库管理系统 、标准答案:D 3、数据库(DB、、数据库系统(DBS)与数据库管理系统(DBMS)三者之间的关系就是( ) (2分) A、DBS包括DB与DBMS B、DBMS包括DB与DBS C、DB包括DBS与DBMS D、DBS就就是DB,也就就是DBMS 、标准答案:A 4、事务的原子性就是指( ) (2分) A、事务中包括的所有操作要么都做,要么都不做 B、事务一旦提交,对数据库的改变就是永久的 C、一个事务内部的操作及使用的数据对并发的其她事务就是隔离的 D、事务必须就是使数据库从一个一致性状态变到另一个一致性状态 、标准答案:A 5、系统能把数据库从被破坏、不正确的状态,恢复到最近一个正确的状态,DBMS 的这种能力称为( ) (2分) A、完整性控制 B、安全性控制 C、可恢复性 D、并发控制 、标准答案:C 6、有两个实体集,并且它们之间存在着一个M:N联系,那么按照E—R模型转换成关系数据库的规则,这个E—R结构转换成表的个数为( )。 (2分) A、1 B、2 C、3 D、4 、标准答案:C 7、把E-R图转换为关系模型的过程,属于数据库设计的( ) (2分) A、概念设计 B、逻辑设计 C、需求分析 D、物理设计 、标准答案:B 8、若用如下的SQL语句创建一个student表: 可以插入到student表中的记录就是( )。 (2分) A、(‘1031’,‘曾华’,男,23) B、(‘1031’,‘曾华’,NULL,NULL) C、(NULL,‘曾华’,‘男’,‘23’) C、(‘1031’,NULL,‘男’,23) 、标准答案:B 9、 SQL语言中,删除一个视图的命令就是( )。 (2分) A、DELETE B、DROP C、CLEAR D、REMOVE 、标准答案:B 10、在SQL语言中的视图VIEW就是数据库的( )。 (2分) A、外模式 B、模式 C、内模式 D、存储模式 、标准答案:A 11、 ( )构成了关系模型的三要素。 (3分) A、三级模式 B、关系数据结构 C、专门的关系操作与传统的集合操作 D、关系的三类完整性约束条件 、标准答案:B,C,D 12、如果不进行控制,事务的ACID特性可能在( )情况下遭到破坏。 (3分) A、多个事务并发执行 B、多个事务顺序执行 C、事务在运行过程中强行终止 D、事务运行一半被撤销。 、标准答案:A,C 13、下列SQL命令中属于数据控制的有( )。 (3分) A、SELECT B、UPDATE C、GRANT D、REVOKE 、标准答案:C,D 14、数据库领域中常用的数据模型有( )。 (3分) A、层次模型 B、网状模型 C、关系模型 D、面向对象模型 、标准答案:A,B,C,D 15、现有关系模式: EMP(empno,ename,mgr,sal,workday), DEPT(deptno,dname,loC、在以下视图中,不可能更新的视图为( )。 (3分) A、视图V1,由1970年以后参加工作的雇员组成 B、视图V2,由部门号与各部门的平均工资组成 C、视图V3,由雇员姓名与其领导者姓名组成 D、视图V4,由薪金超出所有雇员平均薪金以上的雇员组成 、标准答案:B,D 16、简述数据库系统的三级模式两级映象结构?这种结构的优势何在? (5分) 标准答案:数据库系统的三级模式结构就是指外模式,模式与内模式。两级映象就是指外模式/模式映象,模式/内模式映象。三级模式两级映像结构就是数据库实现数据独立性的关键,包括逻辑独立性与物理独立性。 数据逻辑独立性就是指局部逻辑数据结构(外模式即用户视图)与全局逻辑数据结构(模式)之间的独立性。当数据库的全局逻辑数据结构(模式)发生变化(数据定义的修改、数据之间联系的变更或增加新的数据类型等)时,它不影响某些局部的逻辑结构的性质,应用程序不必修改。 物理数据独立性就是指数据的存储结构与存取方法(内模式)改变时,对数据库的全局逻辑结构(模式)与应用程序不必作修改的一种特性,也就就是说,数据库数据的存储结构与存取方法独立与之上的应用程序与模式。

【2017年最新】武汉理工大学考试试题

武汉理工大学考试试题(A 卷) 课程名称:高等数学A (下) 专业班级:2009级理工科专业 题号 一 二 三 四 五 六 七 总分 题分 15 15 24 16 16 8 6 100 备注:学生不得在试题纸上答题(含填空题、选择题等客观题)应按顺序答在答题纸上。 一、单项选择题(35?=15分) 1. 设线性无关的函数123(),(),()y x y x y x 均是二阶非齐次线性微分方程 ()()()y p x y q x y f x '''++=的解,12,c c 是任意常数,则该方程的通解是( ). A .1122123(1)y c y c y c c y =++-- B .11223y c y c y y =++ C .1122123(1)y c y c y c c y =+--- D .1122123()y c y c y c c y =+-+ 2. 曲线23,,x t y t z t ===在点(1,1,1)处的法平面方程为( ). A .236x y z +-= B .236x y z ++= C .236x y z --= D .236x y z -+= 3.设有三元方程ln 1xz xy z y e -+=,根据隐函数存在定理,存在点()0,1,1的一个邻域,在该邻域内该方程只能确定( ). A .一个具有连续偏导数的隐函数(,)z z x y = B .两个具有连续偏导数的隐函数(,)x x y z =和(,)z z x y = C .两个具有连续偏导数的隐函数(,)x x y z =和(,)y y x z = D .两个具有连续偏导数的隐函数(,)y y x z =和(,)z z x y = 4. 设(,)f x y 为连续函数,则二次积分1 40 (cos ,sin )d f r r rdr πθθθ??=( ). A .2 212 (,)x x dx f x y dy -? ? B .2 212 (,)x dx f x y dy -?? C .2 212 (,)y dy f x y dx -? ? D . 2 212 (,)y y dy f x y dx -? ? 5. 级数3 1 sin n n n α ∞ =∑ 的收敛情况是( ). A .绝对收敛 B .收敛性与α有关 C .发散 D .条件收敛

武汉理工大学模电试卷

武汉理工大学考试试题 (A 卷) 课程名称 模拟电子技术基础B 专业班级 软件工程0601 题号 一 二 三 四 五 六 七 八 九 十 总分 题分 20 20 12 8 12 16 12 备注:学生不得在试题纸上答题(含填空题、选择题等客观题) 一. 填空题:(每空1分,共20分) 1.在P 型半导体中,多数载流子为( ),少数载流子为( )。 P 型半导体主要靠( )导电。 2.当PN 结正向偏置时使空间电荷区( ),加剧了多数载流子的( )运动,形成正向电流,此时PN 结处于( )状态。 3.根据导电沟道结构上的不同,场效应管可以分成( )和( )两大类型,他 们的导电过程仅仅取决于( )的运动。 4. 当晶体管工作在放大区时,发射结电压应为( )偏置和集电结电压应为( )偏置。 5.共射放大电路有( )电压增益,( )电流增益,温度升高时,其增益均会( )。 6.对于由晶体管组成的共射极、共集电极和共基极三种基本放大电路,若希望电流放大倍数大,可选用( )和( )组态电路;若希望放大器的高频响应好,应选用( )组态电路。 7.电流源电路的特点是输出电流( ),直流等效电阻( ),交流等效电阻( )。 二.选择填空题(每空1分,共20分) 1.只含三价元素杂质的半导体是( )。 ① P 型半导体;② N 型半导体;③ 本征型半导体 2. 设二极管的端电压为U ,则二极管的电流方程是( )。 ①. I S e U ②. T U U I e S ③. )1e (S -T U U I 3.如果晶体管的基极——发射极短路,则( )。 ① 管子深饱和;② 发射结反偏;③ 管子截止;④ 发射结正偏;⑤ 集电结烧坏 4.人们说晶体管具有放大电流的能力,这是指它在电路中采用( )和( )。 ① 共发射极接法时;② 共基极接法时;③ 共集点极接法时;④ 任何接法时 5. U GS =0V 时,能够工作在恒流区的场效应管有( ) 。 ①. 结型管 ②. 增强型MOS 管 ③. 耗尽型MOS 管 6.检查放大电路中的BJT 在静态时是否进入截止区,最简单可靠的是测量( )。 ① BQ I ;② BE U ;③ CQ I :④ CEQ U 7. 工作在放大区的某三极管,如果当I B 从12μA 增大到22μA 时,I C 从1mA 变为2mA , 那么它的β约为( )。 ①. 83 ②. 91 ③. 100

数据库系统原理试题答案3

全国2008年10月自学考试 一、单项选择题(本大题共15小题,每小题2分,共30分) 1.数据库是长期存储在计算机内、有组织的、统一管理的相关( B ) A.文件的集合 B.数据的集合 C.命令的集合 D.程序的集合 2.在数据库的三级模式中,描述数据库中全部数据的整体逻辑结构的是( C ) A.外模式 B.内模式 C.逻辑模式 D.存储模式 3.数据库系统中存放三级结构定义的DB称为( B )A.DBS B.DD C.DDL D.DBMS 4.教师实体中有教师号、姓名、部门、任教时间、教龄等属性,其中教龄是一个( A ) A.派生属性 B.多值属性 C.复合属性 D.NULL属性 5.对关系的描述不正确的是( C ) A.关系是一个集合 B.关系是一张二维表 C.关系可以嵌套定义 D.关系中的元组次序可交换 6.若属性X函数依赖于属性Y时,则属性X与属性Y之间具有( B ) A.一对一联系 B.一对多联系 C.多对一联系 D.多对多联系 7.设F是关系模式R的FD集,如果对F中每个非平凡的FD X—Y,都有X是R的超键,则( C ) A.R属于2NF,但不一定属于3NF B.R属于3NF,但不一定属于BCNF C.R属于BCNF,但不一定属于4NF D.R属于4NF 8.关系Rl和R2如下表所示: A.1 B.3 C.6 D.9 9.设四元关系R(A,B,C,D),则下面不正确的是( ) A. )R(B D, ∏ 为取属性D,B的两列组成新关系B. )R( 4,2 ∏ 为取属性的值是4,2的两列组成新关系 C. )R(B D, ∏ 与 )R( 4,2 ∏ 是等价的D. )R(B D, ∏ 与 )R( 2,4 ∏ 是相同关系 10.下列叙述正确的是( ) A.在ORDER BY子句后只能有一个属性 B.ORDER BY子句所产生的输出只是逻辑排序效果,并没有影响表的实际内容 C.进行有序输出时,如果列中有空值则在升序输出时首先列出空值项,而在降序时最后列出空值项 D.ORDER BY子句中必须指明是升序或降序,不能缺省 12.现要查找缺少成绩(G)的学生学号(S#)和课程号(C#),下面SQL语句中WHERE子句的条件表达式应是:SELECT S#,C# FROM SC WHERE( )A.G=0 B.G<=0 C.G=NULL D.G IS NULL 12.数据库恢复的主要依据是( D )A.DBA B.DD C.文档 D.事务日志 13.不能激活触发器执行的事件是( )A.SELECT B.UPDA TE C.INSFRT D.DELETE 14.SQL Server 2000的主要工具中,执行T-SQL的最佳轻量级工具是( A ) A.查询分析器 B.服务管理器 C.企业管理器 D.事件探查器 15.在ODBC体系结构中,为应用程序加载、调用和卸载DB驱动程序的是( B ) A.ODBC数据库应用程序 B.驱动程序管理器 C.DB驱动程序 D.数据源 二、填空题(本大题共10小题,每小题1分,共10分) 请在每小题的空格上填上正确答案。错填、不填均无分。 16.能惟一标识实体的属性或属性集称为___ 实体标识符_____。 17.数据独立性使得修改数据结构时,尽可能不修改外部应用程序________。 18.数据库的物理结构主要指数据库的存储记录格式、存储记录安排和__存取方法______。 19.由于数据的冗余,在对数据操作时常会引起__修改异常______、插入异常、删除异常。 20.关系代数运算中,专门的关系操作有:选择、投影、除和_连接_______。 21.SQL语言的条件表达式中字符串匹配操作符是__like______。 22.DBS运行的最小逻辑工作单位是____数据项____。 23.SQL的基本表约束主要有三种形式:候选键定义、外键定义、__域______定义。 24.在复合数据类型中,相同类型元素的有序集合,并且允许有重复的元素,称为__列表类型______。 25.SQL Server 2000引擎对外使用Net-Library抽象层来支持不同的__网络协议______。 1

《数据库系统原理》复习题(答案)

(一)填空题 1.数据管理经历了_______阶段、________阶段到________阶段的变迁。(手工管理、 文件管理、数据库管理) 2.实体之间联系的基本类型有______、_______、_______。(一对一、一对多、多对多) 3.在E-R图中,用____表示实体,用______表示联系,用______表示属性。(矩形框、菱形框、椭圆框) 4.数据库的三层模式结构是________、_________、_______。(外模式、逻辑模式、内模式) 5.关系模型中一般讲数据完整性分为三类:_________、___________、__________。 (实体完整性、参照完整性、用户定义完整性) 6.数据模型由三部分组成:数据结构、数据操作和____________。(数据的约束条件或数据完整性规则) 7.SQL语言是一种标准的数据库语言, 包括数据的查询、定义、操纵和______四部分功能。(控制) 8.视图是从其它________或视图导出的虚表。(基本表) 9.在关系模式R 中,若属性或属性组X 不是关系R 的关键字,但X 是其他关系模式的关键字,则称X 为关系R 的___________。(外关键字) 10.访问SQL server数据库对象时,需要经过身份验证和_________两个阶段,其中身份验证分为Windows验证模式和_______验证模式。(权限验证、混合) 11._______是存储在文件中的一系列SQL语句,即一系列按顺序提交的批处理。(脚本) 12.SQL语言中行注释的符号为_________;块注释的符号为_________。(--、/**/) 13.SQL server中的变量分为两种,全局变量和局部变量。其中全局变量的名称以_______字符开始,有系统定义和维护。局部变量以__________字符开始,由用户自己定义和赋值。(@@、@) 14.在SQL server中,其权限分为三类,即_________权限、_________权限和_________权限。(对象、语句、隐含) 15.用户对数据进行添加、修改和删除时,自动执行的存储过程称为_________。(触发器) 16.角色是一组用户所构成的组,可以分为服务器角色和_______角色。(数据库) 17.触发器有3种类型,即INSERT类型、_______和_______。(UPDATE类型、DELETE类型) 18.如果要计算表中的行数,可以使用聚合函数______。(COUNT()) 19.在SQL Server中修改表的结构应使用关键字,修改表中的数据应使用关键字。(ALTER 、UPDA TE) (二)单项选择题 1.一个仓库可以存放多种产品,而一种产品只能存放于一个仓库中。仓库与产品之间的联系类型是 (C )。 A、一对一的联系 B、多对一的联系 C、一对多的联系 D、多对多的联系 2.不属于传统数据模型的是(D)。 A、层次数据模型 B、网状数据模型 C、关系数据模型 D、面向对象数据模型 3.声明了变量:declare @i int,@c char(4),现在为@i赋值10,为@c赋值'abcd',正确的语句是(C)。 A、set @i=10,@c='abcd' B、set i=10 , set @c='abcd' C、select @i=10,@c='abcd' D、select @i=10, select @c='abcd' 4.长期存储在计算机内的有组织、可共享的数据集合是(C)。 A、数据库管理系统 B、数据库系统 C、数据库 D、文件组织

数据库系统原理试卷和答案

第一学期期末考试试卷和答案 试卷代码:03115A 授课课时:96 课程名称:数据库系统原理适用对象:本科选课班 一、选择题(从下列各题四个答案中选出一个正确答案,每小题1分,共10分) 1、在数据库技术发展的几个阶段中,数据独立性最高的是_____阶段。 A、数据库系统 B、文件系统 C、人工管理 D、数据项管理 2、在SQL的SELECT语句中,与选择运算对应的命令动词是_____。 A、SELECT B、FROM C、WHERE D、ORDER BY 3、在数据库中,下列说法___是不正确的 A、数据库避免了一切数据的重复 B、若系统是完全可以控制的,则系统可确保更新的一致性 C、数据可以共享 D、数据库减少了冗余 4、在数据库系统中,模式/外模式映像用于解决数据的___ A、结构独立性 B、物理独立性 C、逻辑独立性 D、分布独立性 5、关系代数的5种基本运算是___。 A、并、差、选择、投影、自然连接 B、并、差、交、选择、投影 C、并、差、交、选择、笛卡尔积 D、并、差、选择、投影、笛卡尔积 6、在SQL语句中,谓词“EXISTS”的含义是____。 A、全称量词 B、存在量词 C、自然连接 D、等值连接 7、规范化过程主要为克服数据库逻辑结构中的插入异常、删除异常、更新异常以及___的缺陷 A、数据不一致性 B、结构不合理 C、冗余度大 D、数据丢失 8、数据库数据的正确性和相容性是数据库的______。

A、安全性 B、可维护性 C、完整性 D、并发控制 9、数据库三级模式体系结构主要的目标是确保数据库的___。 A、数据安全性 B、数据独立性 C、最小冗余 D、数据结构规范化 10、后援副本的用途是_____。 A、安全性保障 B、一致性控制 C、故障后的恢复 D、数据的转储 二、简答题(回答要点,并简明扼要作解释。每题5分,共20分) 1、简述数据库系统从哪些方面来保证数据的完整性。 2、简述事务的ACID特性。 3、简述并发控制不当带来的数据不一致性问题。 4、简述数据库系统从哪些方面来保证数据的安全性。 三、编程与关系运算(每题5分,共20分) 设有四个关系 学生表(学号char(5),姓名varchar(10),姓别char(2),所属系varchar(20))Student(sno,sname,sex,dept) 课程表(课程号char(3),课程名varchar(20),先修课程char(3),学分tinyint,任课教师char(5)) Course(cno,cname,precno,ceredit,tno) 教师表(教师号char(5),教师名称varchar(10),姓别char(2)) Teacher(tno,tname,sex) 选课表(学号char(5)、课程号char(3),成绩tinyint) SC(sno,cno,grade) 1、编写一个触发器,当对学生表进行修改时其性别只能是男和女。 2、编写一个存储过程,依据输入的学号参数,统计该学生的平均分和总分,要 求使用游标,不可以使用sum和avg命令。 3、使用关系代数语言查询选修了’刘红’老师所授的所有课程的同学学号。 4、使用元组演算语言查询同时选修了‘001’和‘002’两门课程号的同学姓名。

武汉理工大学考试试题

武汉理工大学考试试题 课程:知识产权B卷 班级姓名 一、简述题(每小题8分,共计24分) 1、简述著作权的内容。 2、简述知识产权的范围。 3、简述商业秘密的构成要件。 二、论述题(16分) 4、论述获得专利权的实质条件。 三、案例分析题(5小题,20分;6小题,30分,共计60分) 5、原告广州冲击波音像实业有限公司,住所地广东省广州市天河区体育东路羊城国际贸易中心西塔1101室。 被告河北纪元光电有限公司,住所地河北省石家庄市高新区海河道29号。 被告山东文化音像出版社,住所地山东省济南市历城区山大北路27号。 被告湖南王一实业集团精彩生活超市有限公司,住所地湖南省长沙市晚报大道218号。 原告冲击波公司诉称,原告系《神秘园》(《Secret Garden》)系列曲目的著作权人环球唱片有限公司授权在中国大陆的唯一合法版权享有者,享有《神秘园》(《Secret Garden》)系列曲目在中国大陆的独家复制、出版、发行权,该权利已经国家版权局审核登记,并获得文化部批准。2006年10月16日,原告在被告精彩生活超市发现并购买一套音像制品,外包装盒面标有“神秘园”、“山东文化音像出版社”、“ISRC CN-E26-05-377-00/A.J6”字样,该音像制品的SID码为ifpiG420。经查,该侵权光碟由被告纪元光电公司接受被告山东文化音像出版社委托复制。原告认为上述三被告的行为侵犯了原告的合法权益,给原告造成了巨大的经济损失,特诉至人民法院,请求依法判令:1、三被告立即停止侵权行为;2、被告纪元光电公司、山东文化音像出版社连带赔偿原告经

济损失50万元;3、被告纪元光电公司、山东文化音像出版社连带赔偿原告为制止侵权行为发生的合理费用5000元;4、被告纪元光电公司、山东文化音像出版社承担本案的诉讼费用。 被告纪元光电公司辩称:1、原告对《神秘园》作品没有合法授权,无权主张任何权利,原告提交的证据,无法证明其有《神秘园》的著作权,反而证明《神秘园》作品的合法权利人是辽宁文化艺术音像出版社,而不是原告;2、我公司不侵权,亦没有任何过错,不应承担任何责任。我公司是根据山东文化音像出版社的委托制作《神秘园》光碟,不负责该光碟的出版、销售,即使侵权,也应该由委托方山东文化音像出版社承担责任。故请求人民法院依法驳回原告的诉讼请求。 被告精彩生活超市辩称,我公司出售的是经合法授权的《神秘园》光碟,不侵权。我公司的供货商是长沙振雄音像公司,该公司得到了原告冲击波公司的授权。 被告精彩生活超市以三份证据证明其购进和经营《神秘园》音像制品的渠道是合法的。 2005年6月,被告山东文化音像出版社作为委托方,被告纪元光电公司作为受托方,共同签订了《录音录像制品复制委托书》(No.0522918),其主要内容为:山东文化音像出版社委托纪元光电公司复制《神秘园》CD两万张。 2006年10月16日,原告工作人员在被告精彩生活超市购得被控侵权CD《神秘园》,一套三张,共计54首乐曲,其中包含了原告请求保护的51首曲目,并取得销售发票(发票号:143010520431)。该CD外包装盒上标有“神秘园Secret Garden、山东文化音像出版社、ISRC CN-E26-05-377-00/A.J6”字样,其中A、B、C三张光盘均刻有激光数码储存片来源识别码(SID码)“ifpiG420”。经查,该SID码属于河北纪元光电有限公司。此外,原告工作人员还在北京、衡阳等地发现并购买了被控侵权CD《神秘园》。 另查明,原告冲击波公司为调查、制止涉案三被告的侵权行为所发生的合理费用为2504元。 问题:

模电课设—温度控制系统的设计

目录 1.原理电路的设计 (1) 1.1总体方案设计 (1) 1.1.1简单原理叙述 (1) 1.1.2设计方案选择 (1) 1.2单元电路的设计 (3) 1.2.1温度信号的采集与转化单元——温度传感器 (3) 1.2.2电压信号的处理单元——运算放大器 (4) 1.2.3电压表征温度单元 (5) 1.2.4电压控制单元——迟滞比较器 (6) 1.2.5驱动单元——继电器 (7) 1.2.6 制冷部分——Tec半导体制冷片 (8) 1.3完整电路图 (10) 2.仿真结果分析 (11) 3 实物展示 (13) 3.1 实物焊接效果图 (13) 3.2 实物性能测试数据 (14) 3.2.1制冷测试 (14) 3.2.2制热测试 (18) 3.3.3性能测试数据分析 (20) 4总结、收获与体会 (21) 附录一元件清单 (22) 附录二参考文献. (23)

摘要 本课程设计以温度传感器LM35、运算放大器UA741、NE5532P及电压比较器LM339N 为电路系统的主要组成元件,扩展适当的接口电路,制作一个温度控制系统,通过室温的变化和改变设定的温度,来改变电压传感器上两个输入端电压的大小,通过三极管开关电路控制继电器的通断,来控制Tec制冷片的工作。这样循环往复执行这样一个周期性的动作,从而把温度控制在一定范围内。学会查询文献资料,撰写论文的方法,并提交课程设计报告和实验成品。 关键词:温度;测量;控制。

Abstract This course is designed to a temperature sensor LM35, an operational amplifier UA741, NE5532P and a voltage comparator LM339N circuit system of the main components. Extending the appropriate interface circuit, make a temperature control system. By changing the temperature changes and set the temperature to change the size of the two input ends of the voltage on the voltage sensor, an audion tube switch circuit to control the on-off relay to control Tec cooling piece work. This cycle of performing such a periodic motion, thus controlling the temperature in a certain range. Learn to query the literature, writing papers, and submitted to the curriculum design report and experimental products. Key words: temperature ; measure ;control

数据库系统原理试题(二)

《数据库原理及应用》复习题及参考答案 一、判断题 1.采用规范的方法,使分解后的模式属于第二或第三范式,只能保证无损连接,不能绝对保持依赖。(×) 2.原则上,两个不同的对象所具有的属性值不能相同,但在给定关系中的元组可以是完全相同的。(×) 3.概念设计可以独立于数据库管理系统。(√) 5.在视图中插入一个元组,该元组会同时插入到基本表中。(√) 6.对象查询语言中,可以用运算符ELEMENT从多个元素的聚集中提取单个元素。 (×) 7.对于表只能有惟一的主键码,但可有任意数量的UNIQUE属性或属性集。 (√) 8.如果一个关系没有一个属性能由所有其他属性函数决定,则该关系根本不存在非平凡函数依赖。(√) 9.超类可以自动继承子类的所有特性。(×) 二、选择题 1.实体联系模型属于( D )。 A. 层次模型 B. 网状模型 C. 关系模型 D 概念模型 2.在一个关系中,任意两个元组的值( C )。 A. 可以全同 B. 必须全同 C. 不能全同 D. 以上都不是4.SQL是( C )的缩写. A. Standard Query Language B. Select Query Language C. Structured Query Language D. 以上都不是 6.在数据库设计中,当合并局部E---R图时,职工在某一局部应用中被除数当作实体,而在另一局部应用中被除数当作属性,那么被称之为( A )冲突。 A.结构 B.命名 C.联系 D.属性 7.在关系中的各元组的( B )。 A.顺序不能任意排列,一定要按照输入的顺序排列 B.顺序可以任意排列 C.顺序一定要按照关键字段值的顺序排列

武汉理工大学考试试题纸(A卷)(闭卷)

武汉理工大学考试试题纸(A 卷)(闭卷)

————————————————————————————————作者:————————————————————————————————日期:

武汉理工大学考试试题纸(A 卷)(闭卷) 课程名称 概率统计 专业班级 题号 一 二 三 四 五 六 七 八 九 十 总分 题分 备注: 学生不得在试题纸上答题(含填空题、选择题等客观题) 1.填空题(15分) (1)设随机事件A ,B 互不相容,且3.0)(=A P ,6.0)(=B P ,则=)(A B P (2)设随机变量X 服从(-2,2)上的均匀分布,则随机变量2X Y =的 概率密度函数为=)(y f Y . (3)设随机变量X 和Y 的期望分别为2-和2,方差分别为1和4,0.5XY ρ=-, 由切比雪夫不等式,(6)________P X Y +≥≤ . (4)设某种清漆干燥时间),(~2 σμN X (单位:小时),取容量为n 的样本,其 样本均值和方差分别为2,X S ,则μ的置信度为1-α的单侧置信上限为: . (5)设),,,(21n X X X Λ为取自总体),(~2σμN X 的样本,参数2 ,σμ均未知, ∑==n i i X n X 11,21 2 )(X X Z n i i -=∑=,则对于假设00=μ: H 作t 检验时,使用 的检验统计量T = (用X 与Z 等表示). 2.(10分)设有一箱同类产品是由三家工厂生产的,其中1/2是第一家工厂生产的,其余两家各生产1/4,又知第一、二、三家工厂生产的产品分别有2%、4%、5%的次品,现从箱中任取一件产品,求:(1)取到的是次品的概率;(2)若已知取到的是次品,它是第一家工厂生产的概率。 3. (10分)设随机变量X 的概率分布为f x A x x ()=<

数据库系统原理试题

哈尔滨工业大学(威海)2009/2010学年 秋 季学期 数据库系统试题卷(A ) 考试形式(开、闭卷):闭卷答题时间: 105(分钟) 本卷面成绩占课程成绩50 % (注:平时成绩占课程总成绩的30%,实验成绩占课程总成绩的20%) 答题说明: 本试题卷一共有七道大题,共计11页,总成绩100分。另加一道10分的附加题,在第12页,供选做,附加题的成绩只记入平时成绩,不计入本次试卷成绩。其中第一页为客观试题(第一题、第二题和第三题)的答题卡,要求将第一题、第二题和第三题的答案填写在该答题卡上,其它问题的答案填写在相应题目的后面。 第一题,填空题答案填写在下面相应空白处: (1)外模式 (2)模式 (3)内模式 (4)实体完整性 (5)参照完整性(6)用户自定义完整性(7) 属性值在计算机中实际存储 (8) 基数 (9)不能延迟检查的约束(10) 可以延迟检查的约束 第二题,选择题答案填写在下面相应空格处: 第三题,判断题答案填写在下面相应空格处: 姓名: 班级: 学号: 遵 守 考 试 纪 律 注 意 行 为 规 范

一、填空题(每空0.5分,共10分) 1.数据库的三级模式是、模式和内模式。 2.关系模型的完整性包括、参照完整性和用户自定义完整性。 3. 实体的基属性是的属性。 4. 关系中元组的个数称为关系的。 5. 定义关系的约束包括和可以延迟检查的约束两种类型。 6. SQL 语言具有数据定义、数据操作和三种功能。 7.死锁是多个事务由于而不能执行的一种状态。 8. JDBC 的三层结构从上到下依次是JDBC API 、JDBC 驱动程序管理器和。 9.在关系模式R(U,F)中,如果R 1NF ,且不存在非码属性对码的传递函数依赖, 则称R 满足。 10.弱实体集的主码由强实体集的主码和组成。 二、选择题(全为单选,每小题1分,共10分) 1.一般地,数据库的逻辑层包含数据库中哪些对象() A 、全部表和全部视图。 B 、部分表和部分视图。 C 、全部表。 D 、全部视图。 2.一个企业的不同职能部门之间形成一种隶属关系,这种隶属关系的映射基数是 () A 、1:1 B 、1:n C 、m :n D 、不确定 3.关于关系中的NULL 值,以下说法错误的是() A 、NULL 值不能作为主码的值。 B 、NULL 值不能作为外码的值。 C 、对NULL 值的测试不同于对整数类型值的测试。 D 、两个取值为NULL 值的属性列是相等的。 4.关于视图,以下说法正确的是() A 、视图是一个虚表,也是一个永久的数据库对象。

相关文档
最新文档