Microsoft SQL Server 2000 Super Management Manual (10)

xiaoxiao2021-03-06  67

10. Establish a database

Basic work deployment

Basic concept of data sheet

Establish a data sheet in the archive group

Use null values

Add Identity property

Establish data sheet with Enterprise Manager

Summary of this chapter

When the database is established (the database includes archives and archive groups), the next step is to establish a data table object to save information. Establishing a data sheet is a complex process, which will introduce the considerations required to establish a data sheet. We will first introduce the basic requirements of the establishment of the data sheet, study the project, and finally the example introduction.

This chapter will introduce the type of user data type and the user's self-reservation, and how to store the information table, NULL value, and the Identity property in the archive group. You will also learn how to use Enterprise Manager and Transact-SQL (T-SQL) to build a data sheet, and the restrictions of the data sheet, the preset value and index of the data sheet.

note

Before building a data sheet, you must first become familiar with the above information and elements mentioned above.

Before the deployment of basic work, before designing the data sheet, you must have some architectural decisions on the information form. These decisions can make you have a outline of the entire information form, and you will design each of the information sheets one by one by one. What are your decisions you should take into account: What information will the information list contain? What information is to store information? What is the name of these information? How to set the information range and type of information? Is the data line contain NULL values? Can you use a preset value? (Use the NULL value to be more than a preset value). What information is set to a primary index button, which is set to an external index key? Which condition is constrained? Which type of index (cluster or non-cluster) is this? Which of which types of indexes need to be set?

The user's access to the data sheet is designed as possible before the establishment of the database. The structure of the entire data sheet can be draced on paper, simulate the mode of access data, such as which information table should be set, which information list may insert, delete, or add information; which materials are often inquired, which information It is often searched, etc., to determine if the information is stored. The structure of the information sheet can determine how to establish a data sheet, index, qualified data line data and preset values. The following will begin to establish a data sheet by the basics. In this section, we will review some simple but important ideas. Through examples, the basic elements, learning system data type, and how to establish and delete the user-reserved data type. Defining the Data Sheet Data Sheet is the database object, which contains all data in the database, and stores the information through the combination of information columns and data lines. The data sheet is defined by the information, and the information can be classified in a similar electronic data sheet. As shown in Table 10-1, Table 10-1 is a sample repository data table named product_info. In the example we will build this information table in the MYDB database (the database of Chapter 9). Product_Info data sheet is used to store the information of each item in the store. When the shelf is on the goods, the information sheet will add a new information column. This information form has three column five-column data, the name of the data line is Product_ID, Product_name, Description, Price, and Brand_ID, respectively. We can also use T-SQL instructions to establish a data sheet (do not need actual input information), which will be introduced in this chapter

CopyRight © 2020 All Rights Reserved
Processed: 0.036, SQL: 9