Relational database- Periodic Table


I am stuck at the following task:
You should add the element with atomic number 9 to your database. Its name is Fluorine , symbol is F , mass is 18.998 , melting point is -220 , boiling point is -188.1 , and it’s a nonmetal.
Any input would be highly appreciated. Please let me know if you need any more info

That looks correct @gaurav_t - do you mind sharing a dump of your database using the command in the instructions? I can give it a quick test to see if I can find any problems.

And/Or show me the output of this SQL command: select elements.atomic_number, symbol, name, atomic_mass, melting_point_celsius, boiling_point_celsius, types.type from elements FULL JOIN properties ON elements.atomic_number = properties.atomic_number FULL JOIN types ON properties.type_id = types.type_id;
The test uses that command then looks for the row/columns with all the required values. Perhaps a column name is off or maybe a foreign key is off or something - not sure.

Hi moT01,
Please find the screenshot of the above SQL command below:

Below is the link to periodic_table.sql on my github repo:

Thanks a lot for your guidance.

The test is looking for the type, as well. That’s not included in that query - is the types table linked to one of the other ones with a foreign key?

hmm, I cloned your db with the link you gave and ran that query - I see the column there…

Screen Shot 2022-04-15 at 11.08.55 AM

Strange - that’s the problem, but I’m not sure what the cause is. Double check the keys maybe?

Edit: Actually, it looks like you didn’t include that column in your query - try it again with the query I provided.

Double-Edit: The test isn’t passing for me either, let me keep looking…

Triple-Edit: Okay, I found the problem - the atomic mass column has numbers in it, the test is looking for a string. For now, you will have to change those to strings I think. I will file a bug to change it so it will accept either.

Changing atomic mass from numeric to VARCHAR solves the problem.

Any update on the solution for this bug?
I tried changing the data type to VARCHAR but it is still not being marked as completed in the tasks though element #10 is accepted as completed.

The bug mentioned here should be fixed in v1.0.3. If you started your project before that was fixed (late April), you will still be using the old tests. But you tried changing your data type to VARCHAR, which I think should have worked with the old tests. If you share a dump of your database using the command in the instructions I can take a look @Lockexiii.

Edit: There’s a typo in the name - FlourineFluorine

it worked.
I’ve been working on fixing this “bug” for 4 days.
to think that it is just a typo :sob:
thanks a lot @moT01 !
you saved me potential day/s of troubleshooting this error

1 Like