In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to quickly learn about a certain database. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
During this period of time, due to the needs of work, I have access to a variety of databases. The relational database includes Oracle, DB2, Informix, Teradata, Netezza, MySQL, MS SQLServer, Sybase, PostgreSQL, Greenplum, tide KDB, Dameng database, Huasan MPP Data Engine, GBase, Hive, etc. NoSQL includes MongoDB, Redis, HBase, Cassandra and so on. So, how to quickly understand or learn a certain database? Generally speaking, it can be quickly understood or mastered through four aspects: database storage structure, database logic concept and object structure, and character set.
0x01 database storage structure
Storage structure, divided from storage devices, can be roughly divided into two categories: persistent storage (such as hard disk, SSD, etc.) and temporary storage (such as memory). Corresponding to these two types, database storage structure can be divided into physical structure and memory structure. To put it simply, the physical structure is the files visible and physically existing on the persistent storage device, as well as the usefulness and interdependence of these files. Memory structure refers to the data structures that exist in memory and the usefulness and relationships of these structures.
For example, Oracle, the physical structure includes control files, online log files, data files, parameter files, etc., and the memory structure includes SGA, PGA, etc.
For example, Informix, the physical structure includes data files, configuration files, physical log files, etc., and the memory structure includes shared memory, etc.
Such as Sybase, the physical structure includes device files, configuration files, log files, etc., and the memory structure includes process buffers, data buffers and so on.
0x02 database logic concept
The logical concept of database is the logical encapsulation of the physical structure, which is easy to use and manage the database by adding a series of concepts.
For example, Oracle, tablespace Tablespace is used to manage physical storage, Segment/Extend/Block is used to manage data storage, and User is used as a container for rights management and database object storage
Such as Teradata, user User for data storage organization and rights management, database DB for data partition and organization under User, etc.
For example, DB2, tablespace Tablespace for physical storage management, User for rights management, Schema as storage container for database objects, BufferPool for cache management, etc.
Such as Mongodb, database DB is used for storage management and data organization, and Collection similar data tables are used as data storage management.
For example, Redis,Key/Value key-value pairs, Key can be customized according to business meaning, and Value can be any serialized binary data or more advanced Set/List structure.
0x03 database object structure
Database objects refer to database Database, user User, schema Schema, data table Table, index Index, constraint Constraint, trigger Trigger, stored procedure Procedure and other objects. By understanding the object structure of the database, you can basically master how to operate the database through DML.
Such as Oracle, there can be N databases on the same host, each database can have N User (Schema), each User has N tables. After connecting to the database, you can access the data tables through Username.Tablename. It is worth mentioning that after version 12.2 +, the so-called ContainerDB is added. In fact, a layer of database is added between DB and User to implement an object structure similar to SQLServer or Sybase.
For example, DB2 can have N databases on the same host, each database can have N User, each User has N Schema, each Schema has N tables. Data tables can be accessed through Schemaname.Tablename.
For example, MySQL can have N DB Server on the same host, N DB per Server, N Table per DB, and data tables can be accessed in the following ways:
Database
Select * from
For example, Huasan MPP Data Engine, the database object structure is basically similar to MySQL.
For example, MongoDB can have N DB Server on the same host, N DB per Server, N Collection per DB, and data tables can be accessed in the following ways:
Use
Db.collectionname.find ()
0x04 database character set
The database character set, which was introduced in the previous article, will not be discussed in detail.
For example, Oracle, the character set includes ZHS16GBK, AL32UTF8, WE8ISO8859P1, etc., in which ZHS (Chinese) / AL (all) / WE (Western Europe) and other representation languages, 16-32-8 indicates that the character storage uses bytes, and the last part is the actual character set.
For example, DB2 LUW, the commonly used character sets are GBK, 819 (i.e. ISO8859P1) and 1208 (i.e. Unicode, using UTF8 encoding)
For example, Sybase, the commonly used character sets are EUCGB (GB2312), CP850, GB18030, ISO_1 (ISO8859P1), and Roman8 (the default character set under HP-UX)
For example, MySQL, the common character sets are Latin1 (that is, ISO8859P1), UTF8 and GBK
For example, Teradata, the commonly used character sets are Latin, Unicode (using UTF16 encoding)
Thank you for reading! This is the end of the article on "how to quickly understand a certain database". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.