数据库名称和用户名有什么区别?

时间:2022-09-15 16:26:06

What is the difference between database name and username?

数据库名称和用户名有什么区别?

2 个解决方案

#1


1  

What is the difference between database name and username?

数据库名称和用户名有什么区别?

This boils down to: What is the difference between database and user? Which makes me wonder: Do you expect a database and a user to be the same thing???

这归结为:数据库和用户之间有什么区别?这让我想知道:你期望数据库和用户是一样的吗?

A database is mainly a collection of tables you store data in. You give it a name to indicate what it contains, e.g. MYBUSINESS containing a product table for the products you are selling in your webshop, a client table and what more.

数据库主要是您存储数据的表的集合。您可以给它一个名称来指示它包含的内容,例如MYBUSINESS包含您在网上商店销售的产品的产品表,客户表等等。

Then there are people working with the database. The users. They log in with their user names, say TOMSMITH and MARYSMITH. Other people are not allowed to work with the database. They have no user name and cannot log in. And if a user changes a price, you can log this action in a table with the user name, so you know later who changed the price.

然后有人在使用数据库。用户。他们用他们的用户名登录,比如TOMSMITH和MARYSMITH。其他人不允许使用数据库。它们没有用户名,也无法登录。如果用户更改了价格,您可以将此操作记录在具有用户名的表中,以便您稍后知道谁更改了价格。

#2


1  

The database name is the name of the database and the username is the name of the user that is connected to the database.

数据库名称是数据库的名称,用户名是连接到数据库的用户的名称。

e.g. John Smith could connect to a database called Database1. Database1 would be the database name and John Smith would be the username.

例如John Smith可以连接到名为Database1的数据库。 Database1将是数据库名称,John Smith将是用户名。

If you are using Oracle you can use:

如果您使用的是Oracle,则可以使用:

SELECT name FROM v$databases to get the DB Name

SELECT name FROM v $ databases以获取数据库名称

MySQL I think is SELECT Database()

MySQL我认为是SELECT数据库()

#1


1  

What is the difference between database name and username?

数据库名称和用户名有什么区别?

This boils down to: What is the difference between database and user? Which makes me wonder: Do you expect a database and a user to be the same thing???

这归结为:数据库和用户之间有什么区别?这让我想知道:你期望数据库和用户是一样的吗?

A database is mainly a collection of tables you store data in. You give it a name to indicate what it contains, e.g. MYBUSINESS containing a product table for the products you are selling in your webshop, a client table and what more.

数据库主要是您存储数据的表的集合。您可以给它一个名称来指示它包含的内容,例如MYBUSINESS包含您在网上商店销售的产品的产品表,客户表等等。

Then there are people working with the database. The users. They log in with their user names, say TOMSMITH and MARYSMITH. Other people are not allowed to work with the database. They have no user name and cannot log in. And if a user changes a price, you can log this action in a table with the user name, so you know later who changed the price.

然后有人在使用数据库。用户。他们用他们的用户名登录,比如TOMSMITH和MARYSMITH。其他人不允许使用数据库。它们没有用户名,也无法登录。如果用户更改了价格,您可以将此操作记录在具有用户名的表中,以便您稍后知道谁更改了价格。

#2


1  

The database name is the name of the database and the username is the name of the user that is connected to the database.

数据库名称是数据库的名称,用户名是连接到数据库的用户的名称。

e.g. John Smith could connect to a database called Database1. Database1 would be the database name and John Smith would be the username.

例如John Smith可以连接到名为Database1的数据库。 Database1将是数据库名称,John Smith将是用户名。

If you are using Oracle you can use:

如果您使用的是Oracle,则可以使用:

SELECT name FROM v$databases to get the DB Name

SELECT name FROM v $ databases以获取数据库名称

MySQL I think is SELECT Database()

MySQL我认为是SELECT数据库()