Owners are the individuals who hold financial stakes in one or more petrol pump stations. The system models a many-to-many relationship: a single pump can have multiple owners, and a single person can co-own multiple pumps. Each owner record stores personal contact information and their overall partnership percentage. The link between a specific owner and a specific pump is recorded separately in the Owns relationship table.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Adarsh275/PetrolPump-Management-System/llms.txt
Use this file to discover all available pages before exploring further.
Field Reference
Primary key. The full name of the owner, up to 20 characters. Because this is the primary key it must be unique across all owner records and cannot be changed during an update.Example:
Pawan KumarThe owner’s 10-digit contact number stored as a fixed-length character string.Example:
9431073500The owner’s date of birth. Entered via a Streamlit date picker and stored in
YYYY-MM-DD format.Example: 1971-01-03A single character indicating the owner’s gender. Accepted values are
M (male) or F (female).The owner’s postal address, up to 255 characters.Example:
Friends colony more, Patna, BiharThe owner’s percentage share in the petrol pump, stored as a whole-number integer (e.g.
35 represents 35%).Add an Owner
Select the Add operation
In the CRUD Operations dropdown, select Add.The main area will display the subheader “Enter Owners Details:”.
Fill in the form fields
Complete the six input fields presented in the form:
| Field | Input type | Required |
|---|---|---|
| Owner_Name | Text | ✅ |
| Contact_NO | Text | ✅ |
| DOB | Date picker | ✗ |
| Gender | Text (M or F) | ✗ |
| Address | Text | ✗ |
| Partnership | Number | ✅ |
create_for_Owners() in create.py:
add_Owners_data() in database.py:
View Owners
Update an Owner
Select Update
In the CRUD Operations dropdown, select Update.A “Current Owners details” expander shows the existing data, and an “Owners to Edit” selectbox lists every
Owner_Name in the database.Choose the owner to edit
Select the target owner’s name from the dropdown. Their current field values are automatically pre-filled into the form inputs.
Edit the fields
Modify any of the five editable fields: Contact_NO, DOB, Gender, Address, or Partnership.
Owner_Name is the primary key and cannot be changed through this form. Only the five non-key fields listed above are editable. If you need to correct an owner’s name, delete the record and re-create it.edit_Owners_data() in database.py:
Delete an Owner
Choose the owner to delete
Select the owner’s name from the “Owners to delete” selectbox. An inline warning is displayed:
delete_data_Owners() in database.py:
Seed Data
The following five owner records are inserted bycreate_table.sql:
Linking an owner to a specific petrol pump is handled through the Owns relationship table, which records
(Registration_No, Owner_Name) pairs. The Streamlit UI does not expose direct CRUD operations for the Owns table — pump-owner associations must be managed directly in the database (e.g. via the Query tab or a MySQL client). See the seed data in create_table.sql for example Owns rows.