讲义Database1.docVIP

  • 0
  • 0
  • 约8.63千字
  • 约 11页
  • 2017-12-22 发布于河南
  • 举报
讲义Database1

讲义Database1 Database 数据库 DBMS(Database management system)数据库管理系统 1. What is database 什么是数据库? Database is a collection of related data. A store of large amount of information; 相关数据的集合,存储大量的信息。 如:数字、文字、图象、声音、视频等 2. Relational database 关系数据库 RDBMS (relational database management system) 关系数据库管理系统 The relational data model was introduced by E.F.Codd in 1970 at IBM. The relational database model represented the database as a collection of tables which related to one another * Database数据库 * Table表 * column列 * row行 3. DBMS- Database management system? 常用数据库: MySQL, Oracle, DB2, Sybase, SQL Server 4. SQL: Structured Query Language SQL is different from C(C++), Java, or other programming languages only know: what to get not know: where to get SQL--DML: 数据操作语言 Data Manipulation Language( select, update, delete, insert) --DDL: 数据定义语言 Data Definition Language (create table, alter table, drop table, create index) ------------------------------------------------------------------------------------------------------------- Mysql 1 Linux: 192.168.1.251 在登录路径输入命令mysql, 然后便可作以下操作 mysql show databases; mysql use test; mysql show tables; 2 Window: localhost, installed in your computer 打开命令控制台, 进入mysql安装路径,并进入子路径bin, 然后便可作以下操作 c:\mysql\bin mysql -h [hostname] -u [usename] -p [password] //mysql -u root -p 回车; c:\mysql\bin mysqladmin -u root password newpassword c:\mysql\bin mysqladmin -u root reload 1. mysql show databases; //查看数据库 默认的mysql , test 2. mysql use test; //使用数据库,打开数据库 3. mysql show tables; //查看数据库里的表 4. mysql exit; //退出 ----------------------------------------------------------------------------------------------------------- 1. create table: 建表 create a new table CREATE TABLE yourTableName(columnName1 columnType1 columnConstraint1,columnName2 columnType2 columnConstraint2, ..); Example: CREATE TABLE flight(i

文档评论(0)

1亿VIP精品文档

相关文档