數據庫系統概述+相關DBMS

數據庫系統概述

1.1.1數據庫技術與信息技術

信息技術(Information TechnologyIT)是當今使用頻率比較高的一個名詞,它隨着計算機技術的發展,在各個行業日益廣泛應用,已經被越來越多的企業所重視,其慢慢體現爲一種標誌,一種趕超世界潮流的標誌,而數據庫技術是信息技術中一個重要支撐,沒有數據庫技術,人們在浩瀚的信息世界中將顯得手足無措。

1968年世界上第一個IMSInformation Manger System)系統誕生,從此,數據庫技術得到了迅猛發展。現在數據庫技術已經成爲信息管理,辦公自動化,計算機輔助設計等應用的主要軟件之一,幫助人們處理各種各樣的信息數據流。

1.1.2數據庫技術的應用及特點

     數據庫最初是在大型企業作爲大規模的事務處理的基礎,後來隨着個人計算機的發展,數據庫技術被移植到PCPersonal Computer)上來,用於單用戶個人數據處理,接着,由於網絡技術的發展,PC機在工作組內聯成網絡,數據庫技術就上升到工作組級,現在,數據庫技術正被Internet和內聯網的諸多應用使用着。

1.1.3 SQL Server 數據庫系統和網絡分佈式操作

SQL Server 是由SybaseMicrosoftAshton-Tate聯合開發的OS/2系統上的數據庫系統,1988年正式投入使用,1990Ashton-Tate公司退出開發,1994Sybase也將重點轉移到UNIX版本上的SQL Server開發,而Microsoft則致力於將其推向NT平臺。1996SQLServer6.5誕生,1998SQLServer7.0發佈,直到2000年,著名的SQLServer2000發佈,在我寫這篇文章時,Microsoft SQL-Server 2005 誕生了。

 

關於更多Microsoft SQL-Server 2005瀏覽http://blog.csdn.net/mssqlserver2005/archive/2005/07/21/430567.aspx

1.1.4網絡數據庫系統編程

     在當今網絡盛行的年代裏,數據庫與Web技術的結合正深刻改變着網絡應用的面貌。有了數據庫的支持,擴展了網頁的功能,設計交互式網頁,構造強大的後臺管理系統,以及網站的更新,維護都將變得輕而易舉,隨着網絡的應用,Web技術的數據庫應用必將顯示出其重要的地位。

     我本身喜歡數據庫,更希望能在這方面有所作爲。

 

數據庫技術的發展

1.2.1人工管理階段

1.2.2文件系統階段

1.2.3數據庫系統階段

1.2.3.1數據庫系統的特點:

數據庫中的數據是結構化的,數據庫中的數據冗餘度小易擴充,較高的數據和程序獨立性,數據庫爲用戶提供了豐富的接口,數據庫的自小存儲單元是數據項。

1.2.3.2數據庫系統的控制功能

數據的安全性(Security)控制,數據的完整性約束,併發控制,數據庫的恢復

1.2.3.2數據庫系統數據管理模型



My-SQL 數據庫系統:

 

History of MySQL

We started out with the intention of using mSQL to connect to our tables using our own fast low-level (ISAM) routines. However, after some testing, we came to the conclusion that mSQL was not fast enough or flexible enough for our needs. This resulted in a new SQL interface to our database but with almost the same API interface as mSQL. This API was designed to allow third-party code that was written for use with mSQL to be ported easily for use with MySQL.

The derivation of the name MySQL is not clear. Our base directory and a large number of our libraries and tools have had the prefix “my” for well over 10 years. However, co-founder Monty Widenius's daughter is also named My. Which of the two gave its name to MySQL is still a mystery, even for us.

The name of the MySQL Dolphin (our logo) is “Sakila,” which was chosen by the founders of MySQLAB from a huge list of names suggested by users in our “Name the Dolphin” contest. The winning name was submitted by Ambrose Twebaze, an Open Source software developer from Swaziland, Africa. According to Ambrose, the feminine name Sakila has its roots in SiSwati, the local language of Swaziland. Sakila is also the name of a town in Arusha, Tanzania, near Ambrose's country of origin, Uganda.

 

The Main Features of MySQL

The following list describes some of the important characteristics of the MySQL Database Software. Internals and Portability

o        Written in C and C++.

o        Tested with a broad range of different compilers.

o        Works on many different platforms. See

o        Uses GNU Automake, Autoconf, and Libtool for portability.

o        APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available. Fully multi-threaded using kernel threads. It can easily use multiple CPUs if they are available.

o        Provides transactional and non-transactional storage engines.

o        Uses very fast B-tree disk tables (MyISAM) with index compression.

o        Relatively easy to add another storage engine. This is useful if you want to add an SQL interface to an in-house database.

o        A very fast thread-based memory allocation system.

o        Very fast joins using an optimized one-sweep multi-join.

o        In-memory hash tables, which are used as temporary tables.

o        SQL functions are implemented using a highly optimized class library and should be as fast as possible. Usually there is no memory allocation at all after query initialization.

o        The MySQL code is tested with Purify (a commercial memory leakage detector) as well as with Valgrind, a GPL tool (http://developer.kde.org/~sewardj/).

o        The server is available as a separate program for use in a client/server networked environment. It is also available as a library that can be embedded (linked) into standalone applications. Such applications can be used in isolation or in environments where no network is available.

·         Column Types

o        Many column types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes long, FLOAT, DOUBLE, CHAR, VARCHAR, TEXT, BLOB, DATE, TIME, DATETIME, TIMESTAMP, YEAR, SET, ENUM, and OpenGIS spatial types. Fixed-length and variable-length records.

·         Statements and Functions

o        Full operator and function support in the SELECT and WHERE clauses of queries. For example:

o                     mysql> SELECT CONCAT(first_name, ' ', last_name)

o                         -> FROM citizen

o                         -> WHERE income/dependents > 10000 AND age > 30;

o        Full support for SQL GROUP BY and ORDER BY clauses. Support for group functions (COUNT(), COUNT(DISTINCT ...), AVG(), STD(), SUM(), MAX(), MIN(), and GROUP_CONCAT()).

o        Support for LEFT OUTER JOIN and RIGHT OUTER JOIN with both standard SQL and ODBC syntax.

o        Support for aliases on tables and columns as required by standard SQL.

o        DELETE, INSERT, REPLACE, and UPDATE return the number of rows that were changed (affected). It is possible to return the number of rows matched instead by setting a flag when connecting to the server.

o        The MySQL-specific SHOW command can be used to retrieve information about databases, database engines, tables, and indexes. The EXPLAIN command can be used to determine how the optimizer resolves a query.

o        Function names do not clash with table or column names. For example, ABS is a valid column name. The only restriction is that for a function call, no spaces are allowed between the function name and the ‘(’ that follows it. See the section called “Treatment of Reserved Words in MySQL”.

o        You can mix tables from different databases in the same query (as of MySQL 3.22).

·         Security

o        A privilege and password system that is very flexible and secure, and that allows host-based verification. Passwords are secure because all password traffic is encrypted when you connect to a server.

·         Scalability and Limits

o        Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows.

o        Up to 64 indexes per table are allowed (32 before MySQL 4.1.2). Each index may consist of 1 to 16 columns or parts of columns. The maximum index width is 1000 bytes (500 before MySQL 4.1.2). An index may use a prefix of a column for CHAR, VARCHAR, BLOB, or TEXT column types.

·         Connectivity

o        Clients can connect to the MySQL server using TCP/IP sockets on any platform. On Windows systems in the NT family (NT, 2000, XP, or 2003), clients can connect using named pipes. On Unix systems, clients can connect using Unix domain socket files.

o        In MySQL versions 4.1 and higher, Windows servers also support shared-memory connections if started with the --shared-memory option. Clients can connect through shared memory by using the --protocol=memory option.

o        The Connector/ODBC (MyODBC) interface provides MySQL support for client programs that use ODBC (Open Database Connectivity) connections. For example, you can use MS Access to connect to your MySQL server. Clients can be run on Windows or Unix. MyODBC source is available. All ODBC 2.5 functions are supported, as are many others. The Connector/J interface provides MySQL support for Java client programs that use JDBC connections. Clients can be run on Windows or Unix. Connector/J source is available.

·         Localization

o        The server can provide error messages to clients in many languages. Full support for several different character sets, including latin1 (cp1252), german, big5, ujis, and more. For example, the Scandinavian characters ‘å’, ‘ä’ and ‘ö’ are allowed in table and column names. Unicode support is available as of MySQL 4.1.

o        All data is saved in the chosen character set. All comparisons for normal string columns are case-insensitive.

o        Sorting is done according to the chosen character set (using Swedish collation by default). It is possible to change this when the MySQL server is started. To see an example of very advanced sorting, look at the Czech sorting code. MySQL Server supports many different character sets that can be specified at compile time and runtime.

·         Clients and Tools

o        The MySQL server has built-in support for SQL statements to check, optimize, and repair tables. These statements are available from the command line through the mysqlcheck client. MySQL also includes myisamchk, a very fast command-line utility for performing these operations on MyISAM tables. See

 

Y2K Issues and Date Types

MySQL itself is year 2000 (Y2K) safe, but input values presented to MySQL may not be. Any input containing two-digit year values is ambiguous, because the century is unknown. Such values must be interpreted into four-digit form because MySQL stores years internally using four digits.

For DATETIME, DATE, TIMESTAMP, and YEAR types, MySQL interprets dates with ambiguous year values using the following rules:

·         Year values in the range 00-69 are converted to 2000-2069.

·         Year values in the range 70-99 are converted to 1970-1999.

Remember that these rules provide only reasonable guesses as to what your data values mean. If the heuristics used by MySQL do not produce the correct values, you should provide unambiguous input containing four-digit year values.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章