HOW DOES A DATABASE WORK

来源:互联网 发布:网络教育要多少钱 编辑:程序博客网 时间:2024/05/21 12:42

keywords:
relational database 关系型数据库
table 表
inventory 清单 报表 商品目录 库存
warehouse 仓库
stock 库存, 存货,现货
transparent 透明的
client 客户
screen 屏幕
execute 执行
field 字段
The best way to understand how a database works is by example, The type of database illustrated in thos section is a relational database – the type found on PCs and one of the easiest to understand. the example show fig 9-4 is a simplified one, There are three tables in fig 9-4 one for product data, another for inventory data, and another for date abouts products on order. each table consist of serveral records one each for sikis, boors,poles, bindings, and wax, each product number,supplier, and price, the inventory table contains five record - product name, product fiels, and the uncommitted order table contains six records and three fields, real - world database often consist of scores of tables, each containing thousands of records.

For this example, imagin that you are sales manager at a ski- equipment warehouse and order comes for 160 pairs of ski boots, you first need to find out if the order can be filled from stock in inventory, if it can’t, you need to know how long it will be before enough stock is available, you have an impatient client on the phone who wants an immediate response.

This types of task is especially suited to a database, in fig 9-4, the inventory table is used to store current stock levels, the uncommitted order table is used to keep tracj of future shipments of stock that have no yet been promised to customers, and the product table is used to store the product descriptions, though this database contains three tables, it is important to realize that the structure of a database is often transparent to the user, who knows only that the information is “somewhere in the database system “ and usually has no idea from where the system is extracting it.

The following scenario would be ideal for you , from the pc on your desk, you execute the appropriate command to display an order request screen and enter the product description,”boots” and the order size, 160, The computer system responds with a screen that shows the current level of uncommitted stock in inventory as well as information about stock arriving soon from suppliers that has not yet been committed to other customers, it also provides an estimated as to when the order can be filled: January 12 thus, within seconds, right in front of you, you have the information you need to respond to the client’s request.

Data from serveral tables are combined quickly by a relational database management system through the fields that the tables have in common, the name relational database imploes that the software relates data in different tables by common fields in those tables, in the example we just covered, data from the three tables were pulled together through a common product - number field.