database storage engine

17
Database Storage engines Islam Al Zatary @islamzatary

Upload: islam-zatary

Post on 07-Dec-2014

380 views

Category:

Technology


3 download

DESCRIPTION

Database storage engine

TRANSCRIPT

Page 1: Database storage engine

Database Storage engines

Islam Al Zatary@islamzatary

Page 2: Database storage engine

Transaction1. reliable units(recovery from failures and keep

a database consistent).

2. isolation between programs accessing a

database concurrently.

A database transaction, must be atomic, consistent, isolated and durable.

ACID (atomicity, consistency, isolation, durability) is a set of properties that guarantee database transactions are processed reliably.

Page 3: Database storage engine

Storage Engine Types:

Page 4: Database storage engine

1. MyIsam•Absence of transactions support.

Characteristics:

1. data values are stored with the low byte first.

2. All numeric key values are stored with the high byte first.

3. Large files (up to 63-bit file length).

4. There is a limit of 232 (~4.295E+09) rows in a MyISAM table.

5. The maximum number of indexes per MyISAM table is 64.

6. The maximum key length is 1000 bytes.

7. Internal handling of one AUTO_INCREMENT column per table is

supported.

Page 5: Database storage engine

8. MyISAM supports concurrent inserts.

9. You can put the data file and index file in different directories

on different physical devices.

10. BLOB and TEXT columns can be indexed.

11. NULL values are allowed in indexed columns.

12. MyIsam, flags:

a. mysqld: indicates whether the table was closed

correctly.

b. myisamchk: marks tables as checked if you run it with

the --update-state option.

c. myisamchk --analyze stores statistics for portions of

keys, as well as for entire keys.

d. myisampack can pack BLOB and VARCHAR columns.

Page 6: Database storage engine

2. InnoDB* Transaction-safe (ACID compliant)• stores user data in clustered indexes.• supports FOREIGN KEY referential-integrity constraints.• designed for maximum performance.• large database sites requiring high performance, Example: Slashdot.org• stores more than 1TB of data and handles an average load of 800 inserts/updates per second.• increase multi-user concurrency and performance(row-locking).

Page 7: Database storage engine

3. MemoryStores all data in RAM for extremely fast access in environments that require quick lookups of reference and other like data. This engine was formerly known as the HEAP engine.

Page 8: Database storage engine

4. MergeAllows a MySQL DBA or developer to logically group a series of identical MyISAM tables and reference them as one object. Good for VLDB environments such as data warehousing.

Page 9: Database storage engine

5. ArchiveProvides the perfect solution for storing and retrieving large amounts of seldom-referenced historical, archived, or security audit information.

Page 10: Database storage engine

6. FederatedOffers the ability to link separate MySQL servers to create one logical database from many physical servers. Very good for distributed or data mart environments.

Page 11: Database storage engine

7. NDB-ClusterThis clustered database engine is particularly suited for applications that require the highest possible degree of uptime and availability.

Page 12: Database storage engine

8. CSVThe CSV storage engine stores data in text files using comma-separated values format. You can use the CSV engine to easily exchange data between other software and applications that can import and export in CSV format.

Page 13: Database storage engine

9. Blackhole The Blackhole storage engine accepts but does not store data and retrievals always return an empty set. The functionality can be used in distributed database design where data is automatically replicated, but not stored locally.

Page 14: Database storage engine

Choosing a Storage Engine

Page 15: Database storage engine

1. Is your table is going to be inserted, deleted, and

updated much much more than it is going to be

selected????

2. If you need full-text search?????

3. If you prefer/require relational database design?????

4. Is disk-space or ram an issue??????

5. In Doubt?????

Page 16: Database storage engine
Page 17: Database storage engine

Thank you

Islam Al-Zatary - Front End EngineerTwitter: islamzataryEmail: [email protected]