BrainerHub Solutions
Practical subject: Python
Duration: 6 Hours
1. Create an API in python which will read from an excel/csv file and insert
data into the database. (you can use any python framework of your
choice).
2. For database, you need to create two table : Employee and Company. (You
can use any database of your choice).
3. You need to establish one to many relationship between Company and
Employee table where one company can have multiple employees.
4. The Excel file provided with this task has Employee details mentioned like
first_name, last_name, phone_number, etc.
5. From Excel file, you need to store the company_name in the "Company"
table and use its id as foreign key into the Employee table.
6. The API you will create should read this excel file with serializers and
insert the data into both the table without using any "SQL" or "ORM" query
in loop.