一些简易的测试验证 郝伟 2021年度 [TOC]

1. 简介

1.1. 2021/07/14 数据库主键测试

在虚拟机的服务器中测试主键,原理是建立两张表:

  • 用户表: uid, user_name, sex
  • 产品表: pid, product_name, unit, price
  • 订单表: otime, uid, pid, count, tatal_price 在订单表中 使用 otime+uid+pid三列联立建立主键成功。

发现主键有以下特性: A primary key has the following characteristics:

  • There can only be one primary key for a table.
  • The primary key consists of one or more columns.
  • The primary key enforces the entity integrity of the table.
  • All columns defined must be defined as NOT NULL.
  • The primary key uniquely identifies a row.
  • Primary keys result in CLUSTERED unique indexes by default.
  • The primary key of a row must not be modified once assigned.

results matching ""

    No results matching ""