Here we created Database Tables of Supermarket Management System. A Supermarket Management System is a software application that helps to automate and manage various administrative tasks and operations of a supermarket. In order to store and retrieve the data efficiently, a relational database is used, which consists of tables.
Database Name: Supermarket
Table Name: account
Column Name | Data Type | Length |
Acid (Primary Key) | Bigint (Auto increment) | 10 |
Fname | Varchar | 50 |
Lname | Varchar | 50 |
Address | Varchar | 250 |
Pass | Varchar | 50 |
Type | Varchar | 50 |
Contno | Varchar | 20 |
Table Name: customer
Column Name | Data Type | Length |
custid (Primary Key) | Bigint (Auto increment) | 10 |
Name | Varchar | 50 |
Address | Varchar | 250 |
Pincode | Varchar | 50 |
Contactnp | Varchar | 50 |
Varchar | 50 |
Table Name: itemmaster
Column Name | Data Type | Length |
item_code (Primary Key) | Bigint (Auto increment) | 10 |
item_name | Varchar | 50 |
item_UOM | Varchar | 50 |
item_type | Varchar | 250 |
Table Name: materialh
Column Name | Data Type | Length |
arrv_no (Primary Key) | Bigint (Auto increment) | 10 |
arrv_date | DateTime | |
bill_no | Varchar | 50 |
Supplier | Varchar | 250 |
po_num | Varchar | 50 |
receip_value | Varchar | 50 |
bill_date | DateTime | |
status | varchar | 50 |
Table Name: materiald
Column Name | Data Type | Length |
arrv_no (Primary Key) | Bigint (Auto increment) | 10 |
po_num | Varchar | 50 |
item_code | Varchar | 50 |
qnty_no | Varchar | 250 |
UOM | Varchar | 50 |
Rate | Varchar | 50 |
arrv_value | Varchar | 50 |
Table Name: product_master
Column Name | Data Type | Length |
prod_no (Primary Key) | Bigint (Auto increment) | 10 |
prod_date | Datetime | |
prod_shift | Varchar | 50 |
prod_batchno | Varchar | 250 |
prod_supname | Varchar | 50 |
product_code | Varchar | 50 |
prod_quantity | Varchar | 50 |
How to create Database Tables of Supermarket Management System
Here is a general overview of how to create MySQL database tables:
- Connect to a MySQL server: You will need to connect to a MySQL server using a MySQL client such as the MySQL command-line client or a graphical tool like phpMyAdmin.
- Choose a database: Once you are connected to the MySQL server, you will need to choose a database in which to create the tables. If the database does not exist, you will need to create it first.
- Create a table: To create a table, you will need to use the CREATE TABLE statement. The syntax for the CREATE TABLE statement is as follows:
CREATE TABLE table_name ( column1 data_type constraint, column2 data_type constraint, … );
- Define the table’s columns: Within the CREATE TABLE statement, you will need to define the columns of the table. Each column should have a name, a data type (such as INT or VARCHAR), and any constraints (such as NOT NULL or UNIQUE).
- Insert Data into table : Once the table is created, you can start inserting data into it by using the INSERT INTO statement.
- Run the statement: Once you have written your CREATE TABLE statement, you can run it by executing it in your MySQL client.
- Verify the table: You can verify that the table has been created by running the SHOW TABLES statement or by viewing the table in your chosen database management tool (such as phpMyAdmin).
This is a general overview of how to create MySQL database tables, there are many different variations, constraints, and options for creating tables, and you should consult the MySQL documentation for more information.