PG Program in Analytics
SQL Problem Statement
Create a Database Schema and Table Relationships for a
Logistic Company's Data
Table of Contents
ABSTRACT............................................................................................................ 2
PROBLEM DESCRIPTION ............................................................................... 2
SCOPE..................................................................................................................... 2
TABLE DEFINITIONS ....................................................................................... 3
Confidential and Restricted. Do not Distribute. © Imarticus Learning 1
PG Program in Analytics
SQL Problem Statement
ABSTRACT
Logistics is the support function of an organization and it means having the right object,
at the right place, in the right time. Logistics deals with various kinds of methods to
control the flow of resources from one place to another. One of the major and the most
important factors that is costing is being dealt with utmost attention. The project is being
designed keeping in mind the details of the various requirements of logistics such as
keeping records of the goods; i.e. their details and the kind of content that is stored in the
shipment which is to be delivered.
A Relational Database Management System (RDBMS) is similar to DBMS. The difference
is that in RDBMS, the entities and values in tables are related to one another. Also the
tables are related to each other. Thus, it is called “Relational”.
PROBLEM DESCRIPTION
The logistics company provides services in both the international and domestic sectors.
The logistics management takes into consideration every facility that has an impact on
cost. It plays an important role in making the product confirm to customer requirements.
Also, it involves efficient integration of suppliers, manufacturers, Import & export and
other activities at many levels; from the strategic level through the tactical to the
operational level.
Customers can send different types of shipping contents. Payment is to be done at the
same time the product is delivered to the client. Delivery boy and centre head can update
the status of the shipment. Create a database schema and table relationships that can be
used in any technology.
SCOPE
It is of critical importance to the organization how it delivers products & services to the
customer, whether the product is tangible or intangible. Effective and efficient physical
movement of the tangible product will speak of intangible services associated with the
product and the organization which is delivering it.
In case of intangible products, the delivery of tangibles at the right place & right time will
speak about its quality. On the macro level infrastructure such as various modes of
transport, transportation equipment, storage facilities, connectivity and information
processing are contributing to a large extent in the physical movement of goods produced
in manufacturing, mining and agriculture Sectors.
Confidential and Restricted. Do not Distribute. © Imarticus Learning 2
PG Program in Analytics
SQL Problem Statement
This speed and reliability in distribution of products and services contribute to a great
extent in the growth of a country’s domestic and international trade.
TABLE DEFINITIONS
1) Employee_Details Table:
This table contains the information of the employees.
Column Name Data Type Description
Emp_ID INT (5) Employee ID (Primary
Key)
Emp_NAME VARCHAR (30) Name of the employee
Emp-BRANCH VARCHAR (15) Branch name
Emp_DESIGNATION VARCHAR (40) Designation of the
employee
Emp_ADDR VARCHAR (100) Address of the employee
Emp_CONT_NO VARCHAR (10) Contact Number of the
employee
Confidential and Restricted. Do not Distribute. © Imarticus Learning 3
PG Program in Analytics
SQL Problem Statement
2) Membership Table:
This table contains the membership details of the customer or client.
Column Name Data Type Description
M_ID INT Membership ID
associated with the
client (Primary Key)
START_DATE TEXT Start date of the
membership
END_DATE TEXT) End date of the
membership
3) Customer Table:
This table contains the information of the customers or clients.
Column Name Data Type Description
Cust_ID INT (4) Client ID (Primary Key)
Cust-NAME VARCHAR (30) Name of the client
Cust-EMAIL_ID VARCHAR (50) Email of the client
Cust_CONT_NO VARCHAR (10) Contact Number of the
client
Cust_ADDR VARCHAR (100) Address of the client
Cust_TYPE VARCHAR (30) Type of client
(Wholesale, Retail,
Internal Goods)
Membership_M_ID INT Membership ID (Foreign
Key)
Confidential and Restricted. Do not Distribute. © Imarticus Learning 4
PG Program in Analytics
SQL Problem Statement
4) Payment_Details Table:
This table contains the payment details.
Column Name Data Type Description
PAYMENT_ID VARCHAR (40) Payment Unique ID
(Primary Key)
AMOUNT INT Price to be paid by the
client
PAYMENT_STATUS VARCHAR (10) Payment status (Paid /
Not Paid)
PAYMENT_DATE TEXT Date when payment is
made by the client
PAYMENT_MODE VARCHAR (25) Mode of payment (COD /
Card Payment)
Shipment_SH_ID VARCHAR (6) Shipment ID (Foreign
Key)
Shipment_Client_C_ID INT (4) Client ID (Foreign Key)
Confidential and Restricted. Do not Distribute. © Imarticus Learning 5
PG Program in Analytics
SQL Problem Statement
5) Shipment_Details Table:
This table contains the shipment details.
Column Name Data Type Description
SD_ID VARCHAR (6) Shipment ID (Primary
Key)
SD_CONTENT VARCHAR (40) Type of shipping content
SD_DOMAIN VARCHAR (15) Shipment Domain
(International /
Domestic)
SD_TYPE VARCHAR (15) Service Type (Express /
Regular)
SD_WEIGHT VARCHAR (10) Shipment Weight
SD-CHARGES INT (10) Shipment Charges
SD-ADDR VARCHAR (100) Source Address
DS_ADDR VARCHAR (100) Destination Address
Customer_Cust_ID INT (4) Client ID (Foreign Key)
Confidential and Restricted. Do not Distribute. © Imarticus Learning 6
PG Program in Analytics
SQL Problem Statement
6) Status table:
This table contains the details about the delivery status.
Column Name Data Type Description
CURRENT_ST VARCHAR (15) Current status of the
shipment
SENT_DATE TEXT Date when shipment
was sent
DELIVERY_DATE TEXT Date when the product
was/will be delivered
SH_ID VARCHAR (6) Shipment ID (Primary
Key)
7) Employee Manages Shipment Table:
This is a relationship table between the employee and the shipment table.
Column Name Data Type Description
Employee_E_ID INT (5) Employee ID (Foreign
Key)
Shipment_SH_ID VARCHAR (6) Shipment ID (Foreign
Key)
Status_SH_ID VARCHAR (6) Shipment_ID from status
table (Foreign Key)
Confidential and Restricted. Do not Distribute. © Imarticus Learning 7