存储数据用文件就可以了,为什么还要弄个数据库?
文件保存数据有以下几个缺点:
数据库存储介质:
为了解决上述问题,专家们设计出更加利于管理数据的东西——数据库,它能更有效的管理数据。数据库的水平是衡量一个程序员水平的重要指标。
【MySQL】第一节—MySQL 在 Centos 7环境安装
输入:
mysql -h 127.0.0.1 -P 3306 -u root -p
输出:
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.21-log MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
注意:undefined
create database helloworld;
use helloworld;
create table student(
id int,
name varchar(32),
gender varchar(2)
);
insert into student (id, name, gender) values (1, '熊大', '男');
insert into student (id, name, gender) values (2, '翠花', '女');
insert into student (id, name, gender) values (3, '光头强', '男');
select * from student;
按行列存储,二维结构,但是在磁盘上不是以这种方式存储的
MySQL 是一个可移植的数据库,几乎能在当前所有的操作系统上运行,如 Unix/Linux 、 Windows、 Mac 和 Solaris 。各种系统在底层实现方面各有不同,但是 MySQL 基本上能保证在各个平台上的物理体系结构的一致性。
代表指令 : create(创建表), drop(丢齐数据库或者丢齐表), alter(修改表结构)
代表指令: insert , delete , updateundefined
代表指令: select
代表指令: grant , revoke , commit
存储引擎是:数据库管理系统如何存储数据、如何为存储的数据建立索引和如何更新、查询数据等技术的实现方法。undefined MySQL 的核心就是插件式存储引擎,支持多种存储引擎。undefined
show engines;
show engines \G;
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有