def main(): print(""" WELCOME TO STUDENTS DATABASE ############################ Select Operation : (1) for create Table (2) for Add Record (3) for Show Records (4) for Delete Records (5) for Records Selection """) operation = input("Enter your Choice : ") if operation == "2": database.add_record() elif operation == "3": database.show_all() elif operation == "4": database.delete_one(id) elif operation == "5": database.select() elif operation == "1": print("Please Contact DataBase Admonistrator for this Operation") else: print("Try again !!")
import database # add a record to the database, # database.add_one("Laura", "Smith", "*****@*****.**") # Delete records use # database.delete_one('7') # Lookup Email Address Record database.email_lookup('*****@*****.**') # Add many records # stuff = [ # ('Brenda', 'Smitherton', '*****@*****.**'), # ('Joshua', 'Raintree', '*****@*****.**') # ] # # database.add_many(stuff) # show all database.show_all()
get('Bottom Market', 'Bottom Market', items) # test route from ALPHA0 map by item id # [item id list string (sep by ';')] elif function == 'alpha': items = param[0].split(';') get_from_id('Bottom Market', 'Bottom Market', items) # import database from file # [filename] elif function == 'db_import': db.import_from(param[0]) # get all available category elif function == 'db_category': db.get_category() # get item by item id # [item id] elif function == 'db_get': db.get_from_id(param[0]) # get item node name by item id # [item id] elif function == 'db_get_node': db.get_node_from_id(param[0]) # show all item in database elif function == 'db_show': db.show_all()