Skip to content

Ensibuuko/interview-assignment-database-admin

Repository files navigation

Getting Started

Warning, there's a large SQL file of ~46MB to download as part of this repository.

  1. Clone this repo && cd into it.
  2. Run cp .env.example .env.
  3. Unzip database/imports/db-admin-assignment.sql.zip, leaving the SQL file in that directory.
  4. Run mv database/imports/db-admin-assignment.sql.zip .. to move the zip file out of the folder.
  5. Run docker-compose up -d.

The SQL file should automatically import into the database if the steps above were followed correctly.

If not, please connect to the database using the credentials below and import the SQL file manually.

Verify the Installation

After completing the Getting Started section, the following should work for you:

  1. Visit http://localhost:8091 to see the welcome page.
  2. Connect to the mysql DB using these credentials:
    1. host: 127.0.0.1
    2. port: 3311
    3. database: db_admin_assignment
    4. username: db_admin_assignment
    5. password: secret
  3. Verify that the SQL was imported
    1. Open a connection to the database using the credentials above.
    2. Ensure three tables exist: saccos, individiuals, transactions.
    3. Ensure that the transactions table has a few million rows in it.

If you made it this far, then you're good to start the live coding portion of the test.

Please contact us using the same methods of communication used thus far.

Familiarize Yourself with the Database Tables

Take some time to read through the schema for each table. Think about whether there are any improvements you would make to them.

Write a Migration

Changes made to the database in a Laravel application require a database migration to be written.

Read about migrations here and practice implementing one or two migrations. You may be asked to do this during the live-coding.

Interacting with the Docker Container

The application is now running within the docker container. There's a mysql container and an application container. These are basically computers within your computer.

To "get in" to the application container in order to run commands, you'll need to run this:

# - execute in an interactive terminal (-it)
# - on the db-admin-assignment-app container
# - the bash command (to open a prompt)
docker exec -it db-admin-assignment-app bash

# Now you can run whatever you like from within the container:
php artisan tinker

About

Interview assignment for database administrators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages