Logo
Section 1 / 6

客户端-服务器架构

了解客户端-服务器架构及其在 OnlineStore 系统中如何支持通信、角色和数据库管理。

检查点

客户端-服务器架构

了解客户端-服务器架构及其在 OnlineStore 系统中如何支持通信、角色和数据库管理。

...
...
Client-server architecture
1# 该命令在终端中输入,而不是在 SQL 编辑器中执行。 2# 它告诉 mysql 客户端程序连接到 MySQL 服务器。 3# -u 指定用户名(例如 root 或我们创建的其它用户) 4# -p 提示输入密码 5# -h 指定服务器的主机名或 IP 地址(例如在同一台机器上就是 localhost) 6# OnlineStore 是我们默认要使用的数据库名称。 7 8mysql -u your_username -p -h localhost OnlineStore
1-- This SQL query is sent from the client to the server 2SELECT ProductName, Price 3FROM Products 4WHERE CategoryID = 1;
1-- Assume CustomerID 2 is viewing their orders 2SELECT OrderID, OrderDate, TotalAmount, DeliveryStatus 3FROM Orders 4WHERE CustomerID = 2 5ORDER BY OrderDate DESC;

Quiz

单选题

以下哪一项最能描述数据库客户端的作用?

1 / 3

数据库概念入门

数据库实例 vs. 数据库