Home  >  Article  >  Database  >  Detailed explanation of the difference between table and schema in database

Detailed explanation of the difference between table and schema in database

黄舟
黄舟Original
2017-09-07 10:59:4513977browse

What is Database, what is Schema, what is Table, what is column, what is row, what is User?

Recommended mysql video tutorials: "mysql tutorial"

We can think of Database as a large warehouse, which is divided into many rooms. Schema is one of the rooms, and a Schema represents a room.

Table can be regarded as a bed in each Schema. Table (bed) is placed in each room and cannot be placed outside the room. Wouldn't it be homeless to sleep at night?

Then many items can be placed on the bed, just like many columns and rows can be placed on the Table. The basic unit for storing data in the database is the Table. In reality, the basic unit for placing items in each warehouse is the bed.

User is the owner of each Schema (so Schema contains Object, not User). In fact, User corresponds to the database (that is, User is the owner of each corresponding database). Since there is a database operation (warehouse), you must have the right to operate each Schema (room) in the database. That is to say, each user mapped by the database has the key to each Schema (room). In other words, if he belongs to a certain warehouse The owner, then the right to use this warehouse and everything in the warehouse belongs to him (including the room), and he has full operation rights. The system administrator can also assign specific permissions to User

, that is, what he can do in a certain room, whether he can only view (Read-Only), or whether he can have all the control rights like the owner. (R/W), this depends on the role corresponding to this User.

The above is the detailed content of Detailed explanation of the difference between table and schema in database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn