MySQL: What is Store Engine

本文通过生动的例子介绍了数据库存储的不同方式,并对比了MySQL中InnoDB与MyISAM两种存储引擎的特点。InnoDB支持事务处理和外键约束,适用于需要高安全性的应用场景;而MyISAM则因其简单的结构,在整体性能上更为优越。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Introduction

    1) Take a movie for example. We have different format of it including mp4, avi, rmvb, flv. And different format occupy different space in hard disk, and resolution differs.

    2) The data in a table is also stored in hard disk. But they also have different method of storing.

        From the prospective of user, the data fetched from DB is the same regardless of the store engine of the DB.

    3) Take a live example: At the exit of subway, we have two bicycle administrators called A and B.

        For A, as long as you hand in 5 cent, then you can save your car there and won't do any validation when you come and fetch your car/bicycle back.

        For B, he will record every feature of you and your car. When you come and fetch your car, he will take a careful validation to ensure you have the right to fetch the car and car is just yours and not others'.

        For A and B, whose bussiness efficiency is better? Obviously A.

        For A and B, whose administration is safer? Obviously B.

    4) Database has different way of saving  and administration. In MySQL, it is called Store Engine.

create table t(
id int
) engine myisam charset utf8;

 

2. What kind of store engine does MySQL offers?

    1) InnoDB ---> Is just like B who is very careful.

    2) Myisam ---> Is just like A who is not careful.

 

3. Comparation between InnoDB and MyISAM (We only focus on the differences whose background painted as gray) But in MySQL 5.5 and above, full-text searching is also supported by InnoDB

    Comparison:

    1) InnoDB has transactions while MyISAM does not.

    2) InnoDB has foreign keys and relationship contraints while MyISAM does not.

    3) Faster than InnoDB on the whole as a result of the simpler structure thus much less costs of server resources.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值