date: 2024-03-27
title: Courier Station Information Management System
status: DONE
author:
- AllenYGY
tags:
- DBMS
- Project
- Document
created: 2024-03-27T14:13
updated: 2024-06-11T01:14
publish: True
Courier Station Information Management System
Since we have different kinds of users, I will describe user requirements by user.
Here is a basic feature about the pick and send parcel.
CustomerA delivers the package to courier stationA and fills in the address that needs to be delivered, then the manager of courier stationA checks the package and transfers it to courier stationB according to the address, and the manager of courier stationB accepts the package. Finally, CustomerB can pick up the package.
In the user part, the user uses uID to login, we use the ISA relationship to distinguish the user as customer, delivery manager and administrator, and this ISA relationship is not disjoint, which means that all users registered in the system can be more than one identity.
In the parcel section. Each parcel will be sent and picked up by one customer, each customer can send or pick up more than one parcel at the same time, and each parcel has its responsible delivery manager, and corresponding logistic company.
In the courier station section, we can see that each delivery manager belongs to a courier station, and the administrator of the system can control multiple courier stations. Every courier station has a specific location for the logistics company to transport the parcel to the fixed address.
Finall we can get the ER diagram like this.
In our user requirement the 3 different kinds of users should be disjoint and total participation.
For the Entity part
we can get 3 relationship sets about the user according to the method in logical design.
And for each entity we can get one relationship set
For the relationship part, we have 8 relationship in our system.
For above case we could not to create table.
After the logical design the schemas in our database have already satisfed 1NF
Now let's continue to normalize the schema.
For these 3 user tables they have similar attributes
We can get the following function dependency.
While
but email and phone are not superkey, therefore it violates BCNF.
so we do this decomposition to this schema.
Decomposition
This obviously satisfies the BCNF.
For the Courier station schema it also has email and phone attribute, and there is one more property csaddress
Functional dependency:
Therefore, we do decomposite just like before
The next schema is about the parcel.
We can get the following function dependency like this.
We can find it only has one functional dependency. And obviously, the parcelID is the condicate key in this schema. So it has been already satisfied BCNF.
For the rest of the schema we can find it only has 2 attributes. So it must satisfy BCNF.
In this project, foreign keys are used in almost all the tables to establish connections.
In the table for each user, I used BLOB to save the profile picture。
When dealing with the weight and volume of the package, I checked them on the front and back ends, especially on the back end, where I used triggers to make the volume and weight range from 0-300.
Customers can effortlessly pick and send packages, track deliveries in real-time, manage personal information, view order history, and evaluate the quality of service.
Our system offers a range of dynamic shipping options to suit different customer preferences.
For courier station managers, features such as status updates, site information management, and access to comprehensive historical logs can effectively manage packages. The ability to transfer parcels between sites ensures a smooth flow of parcels through the logistics network.
In addition, administrators benefit from a centralized view of workstation status and a complete package history, allowing them to monitor and optimize overall system performance.