> For the complete documentation index, see [llms.txt](https://help.codechum.com/teachers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.codechum.com/teachers/more-features-you-may-want-to-explore/items-section/how-to-create-an-item/how-to-create-a-mysql-database-item.md).

# How to create a MySQL database item

### Introduction

A MySQL database item is a type of item in which your students have to code within CodeChum and submit them for automatic checking.&#x20;

CodeChum already has tons of built-in mysql-based item that you are free to use, but if you'd like to make your own item to use in an activity in CodeChum, you can make your own!

### Steps

To create a mysql-based item in CodeChum, follow these steps:

1. Click on **Item Bank**. This will redirect you to a screen listing all items you have created within CodeChum.

   <figure><img src="/files/96DUgXNnnLXAiZQG3HQd" alt=""><figcaption></figcaption></figure>
2. Look for the **Create Item** button and click it. This will open a big popup window to create your very own item.

   <figure><img src="/files/b64JDisoxkaLU7XBfn60" alt=""><figcaption></figcaption></figure>
3. Select **MySQL database** as the item type.

   <figure><img src="/files/qghuNmlR3bdZ3rFWXGMe" alt=""><figcaption></figcaption></figure>
4. Provide an item name and a description on what the item is all about. Be as detailed as possible.

   <figure><img src="/files/Z5sIbfnWAC32yWrd9BmV" alt=""><figcaption></figcaption></figure>
5. Add test cases to check the solutions of your students. ***Tip:*** If you already have existing initialization queries in a .sql file, take advantage of our optional step by simply clicking the **'Convert database/table query**' button. This feature allows you to seamlessly copy and paste your queries into the code editor.\
   \
   However, if you don't have one, just skip the optional steps and proceed to the next step, where you **input your initialization queries manually**.

   <figure><img src="/files/0SRufYxc5bD9mLkWCMMd" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/fCMSwJ4FoztEThq1ZeJh" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/JCnWRA67enmHhbYnR6fJ" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/lrCdhPOtRhKwh4Jkj8Cc" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/mE7sHuVtqOmL2375pCTW" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/bUOkkG7zGQ229vFV7w0X" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/CRJ5EAnmhr5BcUhke4aY" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/9o7B1uzXTWr2lNjrKSY4" alt=""><figcaption></figcaption></figure>
6. Once done, click **Create Item.** It should show a popup window informing that you have successfully created your own item!<br>

   <figure><img src="/files/lDSMDusicX8quHud97eO" alt=""><figcaption></figcaption></figure>

And that's how to make MySQL database items in CodeChum!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.codechum.com/teachers/more-features-you-may-want-to-explore/items-section/how-to-create-an-item/how-to-create-a-mysql-database-item.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
