Professional Documents
Culture Documents
Doc
Doc
Identify the relations and attributes of the Gojo schema and create the
physical database design for each relation having the following elements.
Column Name Data Type Size Constraint
1. Staff
staff_id INT PK
name VARCHAR(50) NOT NULL
salary DECIMAL(10,2) NOT NULL
2. Kifle_Ketema
kifle_ketema_id INT PK
staff_id INT FK (Staff)
location VARCHAR(50) NOT NULL
3. Property_Type
property_type_id INT PK
property_type_name VARCHAR(50) NOT NULL
4. Landlord
landlord_id INT PK
name VARCHAR(50) NOT NULL
address VARCHAR(50) NOT NULL
phone_number VARCHAR(20) NOT NULL
5. Property
property_id INT PK
address VARCHAR(50) NOT NULL
property_type_id INT FK (Property_Type)
monthly_rent DECIMAL(10,2) NOT NULL
deposit DECIMAL(10,2) NOT NULL
landlord_id INT FK (Landlord)
6. Tenant
tenant_id INT PK
current_address VARCHAR(50) NOT NULL
phone_number VARCHAR(20) NOT NULL
7. Lease
lease_id INT PK
property_id INT FK (Property)
tenant_id INT FK (Tenant)
start_date DATE NOT NULL
duration INT NOT NULL
2. Create the appropriate tables and implement the tables’ appropriate indexes,
keys according to the Physical Database Design.
The appropriate SQL commands to create the tables and implement the
indexes and keys are as follows:
);
);
);
);
);
);
);
INSERT INTO Staff (staff_id, name, salary) VALUES (1, 'Marta Yohannes', 10000);