Traditional Culture Encyclopedia - Hotel accommodation - The problem of VFP creating permanent links between tables
The problem of VFP creating permanent links between tables
1. House price table: the main index (primary key) is established for the type number field, and ordinary indexes are established for other fields;
2. Room table: the main index (primary key) is established for the room number field, and ordinary indexes are established for other fields; Establish a one-to-many relationship between the type number fields of the house price table and the room table (that is, the type number of the house price table is the primary key and the type number of the room table is the foreign key).
3. Customer table: the main index (primary key) is established for the customer number field, and ordinary indexes are established for other fields;
4. Sign-in Form: All fields are indexed; Establish a one-to-many relationship between the room number field of the room table and the check-in table (that is, the room number of the room table is the primary key and the room number of the check-in table is the foreign key); Establish a one-to-many relationship between the customer number field in the customer table and the registration form (that is, the customer number in the customer table is the primary key and the customer number in the registration form is the foreign key).
Create Database _ Hotel Library
CREATE TABLE _ house price table (type number C(4) is not an empty primary key, type name C(20), price Y)
Create table _ room table (room number C(4) is not an empty primary key, and type number C(4) refers to _ room rate table)
Create table _ customer table (customer number C(6) is not empty primary key, ID card C( 18), name C(8), gender C(4), work unit C(50) and city C(20)).
Create table _ check-in table (room number C(4) refers to _ room table, customer number C(4) refers to _ customer table, check-in date T, check-out date T)
- Related articles
- Sembola holiday forest tourist resort
- Where is Wuxi CITIC Shanghai?
- One of Madonna's MVs, at first, a group of reporters followed her. Later, she got on the bus, lowered her head, and then the bus drove away, singing while driving.
- The entrance is really tender and slippery. What food do people want to eat?
- What movies or TV plays did Linda Chung play?
- Manxiang fish restaurant
- Xiamen Airport to An 'an Apartment
- Where is the location of Coconut Sea in Dadonghai, Sanya?
- Did Chengdu Wanda Ruihua Hotel sell it?
- What are the main diving spots in Egypt?