For this our tables are csv files. What would the python code look like to query these tables?
Command-lin face to query data that is stored in a database 1. Obtaindata suitable for a relational database e the data should map to at least two RLDB tables . one of the tables should have a foreign key to the other table pick data that will have at least thirty records in each database table each table should have at least three columns For example: US states and cities: STATE TABLE id name capital_ city (foreign key to the id column of the city table) CITY TABLE id name population state_name (foreign key to the id column of the state table) Other possibilities might be sports teams, songs/performers, animals/habitats 2. build a program that will connect to an SQLite database and let you query the data Provide a primitive command-line interface to query data from the database you'll let the user type in a command * you'll parse it and turn it into a query for the database you'll execute the query and print the results For example >capital Massachusetts Boston population state Massachusetts 6859819 > population city Boston 617594 An expert answer will be posted here Window Help Annotate TI Edit -up-description CH 04 Essentials Of Software En OTO 7855 the "grammar you create can have hard-coded tokens that are specific to your data (the way my example uses "state", "city, "population", "capital" but each "sentence" you type should turn into a database query that returns one or more results Assume that the database has already been created (it's not necessary to provide commands to create the database or the tables in the database) But, do provide a command that will let a user see the schema (the list of tables in the database, and the names of the columns in each table). General discussion . you should create your database on "localhost" that way all team members can get the program up and running on their own laptops with squlite3 and sqlite make this easy command that doesn't follow your legal syntax), then the program should tell me (and not crash OK to hardcode table names, column names in your code you can choose whatever database and language you want, but Java with JDBC and sqlite and pythor . your program should be robust: if I put in a command that the program doesn't understand (i.e,a the data should come from a file (eg, csv) e Specifics Your system should allow a user to query values from at least three columns of each table. You should support at least one query that involves a join between the two tables What to hand in