.


:




:

































 

 

 

 





 

SQL Server 2000 (database). SQL Server 2000 (). , , . SQL Server 2000 : . SQL Server 2000 .

, . , : , , . . , , . , , , , , , . SQL Server 2000 . , , .

, , . , , , , , .

. SQL Server 2000 , . , . . .

. , . . SQL Server 2000 :

1. (data file). , . , , , , ;

2. (transaction log file). SQL Server 2000 . , , .

, .. , , 2. .

:

- Primary File (, , ). . , . , . , , . mdf (Master Data File);

- Secondary File(, , ). . . . .

Transaction Log File ( ), . . , .

. , , , , , . , , , , , , . . , , :

- (tables). , ;

- (views). (virtual tables), , . ;

- (indexes). , . , ;

- (keys). . . , , ;

- (defaults). , , ;

- (rules). , ;

- (constraints). , . ;

- (stored procedures). Transact-SQL, . . , , ;

- (triggers). , , . , ;

- (user-defined data types, UDDT). , ;

- (user-defined function). Transact-SQL, .

 

 

, . . - , . . . , . , , . , . , .

, . , , , . , . .

(transaction) , , .. , . , . , (distributed transaction) . SQL Server 2000 , , , .

Transact-SQL . , . . , ACID (Atomicity, Consistency, Isolation Durability), , .

ACID , .. , . SQL Server 2000, , ACID, . , , SQL Server 2000 (locks). (locks) , .

, . , . , , . . , . . .

ACID SQL Server 2000, . -, . . , -. , . , . . , , . . , - . , , , , , (deadlock).

. SQL Server 2000 , , . . , , , . , , .

(distributed transaction) , . , . , . - , , , . SQL Server 2000 MSDTC.

(MSDTC, Microsoft Distributed Transaction Coordinator) , . , . SQL Server 2000. MSDTC SQL Server 2000, , .

. . . , , (Concurrency Control).

, , , . , . : sp_configure locks, num_locks.

num_locks , . 0, . num_locks 5000 2 147 483 647.

. Teop (Concurrency control theory) :

1. (Optimistic Concurrency Control). . , . , . , , - .

2. (Pessimistic Concurrency Control). ACID. . , , . . . , .

SQL Server 2000 . , . , .

 

 

SQL Server 2000 , . . , SQL Server 2000. - . , (database owner). dbo .

C Transact-SQL, Enterprise Manager Create Database Wizard. , , . , . , . (primary) .

, sysdatabases Master , . filename . , , , .

, sysdatabases ( dbid), ( sid), ( crdate), ( cmptlevel) .

Enterprise Manager.

, , . Enterprise Manager Transact-SQL , . Enterprise Manager create database, .

SQL Server 2000 Databases (. 12), . , . , , . , Enterprise Manager , . Registered SQL Server Properties (. 13) Show system databases and system objects. Edit SQL Server Registration Properties.

Database Properties (. 14). :

- Databases New Database;

- New Database;

- Enterprise Manager New Database;

- Action New Database.

, Enterprise Manager .

 

 

, Database Properties . . General (. . 14) , . Create Database, General database_name COLLATE collation_name.

General . , (Unknown) () None ().

, Name, , Create Database. , , Collation name. (Server default), , SQL Server 2000. .

Data Files (. 15), ,

Data Files Database files, . File Name . Location . , Location . Locate Database File, , Location.

Initial size (MB) , . - , , .

Filegroup , . primary.

, Database files, , , . File properties, Data Files.

Transaction Log (. 16) . , Data Files. , .

 

, , Enterprise Manager . create database . Enterprise Manager .

. , , Delete.

sysdatabases, . , . , , .

 

 

. , . , , . . .

. , , , , , . SQL Server 2000 Enterprise Manager, Transact-SQL. , SQL Server 2000 .

, , , , . . , . , , .

, , , , , , . (constraints) , . SQL Server 2000 :

- Check , ;

- Null ;

- Default ;

- Unique ;

- Primary Key ;

- Foreign Key ;

- No Action ;

- Cascade .

(data type). , . , Transact-SQL. , cursor table. , , .. , , . timestamp, text, ntext image. , , .

, Enterprise Manager Tables.

New Table (. 17), Tables New Table.

NewTable . , , . , .. . , .

:

- Column Name. , . . . ;

- Data Type. , , ;

-Length. , . (char, nvarchar, binary .) , , . (, int, datetime ..), Length ;

-Allow Nulls. null. , , , null .

. , , Set Primary Key. , , . 17 id.

NewTable , . . , pac :

-Description. , ;

- Default Value. , ;

- Precision. , , . , (decimal). numeric decimal. ( ) , (approximately), , real float, (24 53 ) . (tinyint, smallint, int bigint);

-Scale. , . , ;

-Identity. Yes, -. :

1. Identity Seed. , -;

2. Identity Increment. , - ;

3. Is RowGuid. , uniqueidentifier, Yes No. , rowguidcol create table. Default Value newid (). , . . uniqueidentifier newid ();

-Formula. , . , (computed columns). , , , . , , . , , , , null, , ;

-Collation. , , , . , , ( <database default>).

, . Save, . Choose Name, , .

.

Delete . Design Table .

 





:


: 2016-11-18; !; : 1017 |


:

:

, .
==> ...

1389 - | 1241 -


© 2015-2024 lektsii.org - -

: 0.083 .