Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* * * IN PYTHON * * * Step 1 : Implement database setup methods in DbManager.py DbManager.py contains class DbManager which allows the food

***IN PYTHON***Step 1: Implement database setup methods in DbManager.py
DbManager.py contains class DbManager which allows the food vendor to create and access the database. Implement the following attributes and methods for class DbManager:
Attributes
Connection conn - Connection object that, once connected, will be used throughout the program.
Instance methods
Database Setup Methods
connect()
Establishes a connection to an in-memory database.
disconnect()
Disconnects from the existing database.
create_menu_table(data_file)
Reads a .tsv file and creates a table named menu.
Calls insert_menu() to insert individual entries to the table.
insert_menu(menu)
Reads a menu tuple containing the column values of a menu entry (category, item_name, description, price, prep_time, availability).
Inserts an entry into the menu table with column values listed in the parameter.
create_user_table(data_file)
Reads a .tsv file and creates a table named user.
Calls insert_user() to insert individual entries into the table.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions