Skip to content

Latest commit

 

History

History

0x0F-python-object_relational_mapping

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Python-Object-relatiional mapping

Technologies

  • Files written in vi, vim, and emacs editors.
  • Files wriiten according to the betty coding style. Checked using betty-style.pl and betty-doc.pl.
  • Files tested on Ubuntu 20.04 LTS using gcc.
  • Python3.4 files

Files

File Question
0-select_states.py Write a script that lists all states from the database hbtn_0e_0_usa.
1-filter_states.py Write a script that lists all states with a name starting with N (upper N) from the database hbtn_0e_0_usa.
2-my_filter_states.py Write a script that takes in an argument and displays all values in the states table of hbtn_0e_0_usa where name matches the argument.
3-my_safe_filter_states.py Wait, do you remember the previous task? Did you test "Arizona'; TRUNCATE TABLE states ; SELECT * FROM states WHERE name = '" as an input?
4-cities_by_state.py Write a script that lists all cities from the database hbtn_0e_4_usa.
5-filter_cities.py Write a script that takes in the name of a state as an argument and lists all cities of that state, using the database hbtn_0e_4_usa.
model_state.py Write a python file that contains the class definition of a State and an instance Base = declarative_base()
7-model_state_fetch_all.py Write a script that lists all State objects from the database hbtn_0e_6_usa.
8-model_state_fetch_first.py Write a script that prints the first State object from the database hbtn_0e_6_usa
9-model_state_filter_a.py Write a script that lists all State objects that contain the letter a from the database hbtn_0e_6_usa.
10-model_state_my_get.py Write a script that prints the State object with the name passed as argument from the database hbtn_0e_6_usa.
11-model_state_insert.py Write a script that adds the State object “Louisiana” to the database hbtn_0e_6_usa.
12-model_state_update_id_2.py Write a script that changes the name of a State object from the database hbtn_0e_6_usa.
13-model_state_delete_a.py Write a script that deletes all State objects with a name containing the letter a from the database hbtn_0e_6_usa.
model_city.py Write a Python file similar to model_state.py named model_city.py that contains the class definition of a City.
14-model_city_fetch_by_state.py write a script 14-model_city_fetch_by_state.py that prints all City objects from the database hbtn_0e_14_usa.
relationship_city.py Improve the files model_city.py and save it as relationship_city.py
relationship_state.py Improve the files model_state.py, and save its as relationship_state.py
100-relationship_states_cities.py Write a script that creates the State “California” with the City “San Francisco” from the database hbtn_0e_100_usa
101-relationship_states_cities_list.py Write a script that lists all State objects, and corresponding City objects, contained in the database hbtn_0e_101_usa
102-relationship_cities_states_list.py Write a script that lists all City objects from the database hbtn_0e_101_usa.