@@ -0,0 +1,1724 @@
+import bsddb%0ADATABASE = %22cstudents.db%E2%80%9C%0Adb = bsddb.hashopen(DATABASE, 'c') #this command create a hash db in file%0A#%22cstudents.db%E2%80%9C%0A#or db = bsddb.btopen(DATABASE, 'c') to create a B-Tree DB%0A#or db = bsddb.rnopen(DATABASE, 'c') to create a record format file%0A%0A%0A%0A%0A%0Adef main():%0A    connection, curs = connect()%0A    if connection == 0:%0A        print(%22Bye%22)%0A        return%0A    %0A    # setup new tables%0A    #setup_tbls(curs, connection)%0A%0A    while True:%0A        print(%221. Create and populate a database (c)%22)%0A        print(%222. Retrieve records with a given key (k)%22)%0A        print(%223. Retrieve records with a given data (r)%22)%0A        print(%224. Retrieve records with a given range of key values (v)%22)%0A        print(%225. Destroy the database (d)%22)%0A        print(%226. Quit (q)%22) %0A        inp = input(%22Enter your choice: %22).lower()%0A        if inp == 'q' or inp == 'quit' or inp == %226%22:%0A            while True:%0A                inp = input(%22Do you want to exit? %22).lower()%0A                if inp == 'y' or inp == 'yes' or inp == 'q':%0A                    print(%22Quit%22)%0A                    return%0A                elif inp == 'n' or inp == 'no':%0A                    break%0A                else:%0A                    print(%22Please enter yes (y) or no (n)%22)%0A                    continue%0A            continue%0A        elif inp == '1' or inp == 'c':%0A            %0A        elif inp == '2' or inp == 'k':%0A            %0A        elif inp == '3' or inp == 'r':%0A            %0A        elif inp == '4' or inp == 'v':%0A            %0A        elif inp == '5' or inp == 'd':%0A            %0A        elif inp == '6' or inp == 'q':%0A                        %0A        else:%0A            print(%22Invalid%22)%0A        print(inp)%0A%0A    cursor.close()%0A    connection.close()%0A    return%0A

Create main.py