Build a Celestial Database - Test Interpretation question

I am doing well on my celestial database project, and it is fun, although I don’t know when I’ll “need” a celestial database…unless i create my own website, which could be anotehr fun project!

Anyway my question is about this test:
Each "star" should have a foreign key that references one of the rows in galaxy

Is this test looking for data, or is it looking for table details? I’ve added the foreign key but the test isn’t passing. I don’t want to add data yet until I’m done building the structure due to task switching effort on my brain.

I need to add foreign keys for the other table and I assume i’m doing it correctly, so can continue but just wondered. I’m guessing it’s looking for real data since the subject of the test is “star” and not star. Here is my star table so far.


+---------------------+-----------------------+-----------+----------+---------------------------------------+
|       Column        |         Type          | Collation | Nullable |                Default                |
+---------------------+-----------------------+-----------+----------+---------------------------------------+
| star_id             | integer               |           | not null | nextval('star_star_id_seq'::regclass) |
| name                | character varying(30) |           |          |                                       |
| description         | character varying(60) |           |          |                                       |
| distance_from_earth | integer               |           |          |                                       |
| brightness          | numeric(2,1)          |           |          |                                       |
| galaxy_id           | integer               |           |          |                                       |
+---------------------+-----------------------+-----------+----------+---------------------------------------+
Indexes:
    "star_pkey" PRIMARY KEY, btree (star_id)
Foreign-key constraints:
    "star_galaxy_id_fkey" FOREIGN KEY (galaxy_id) REFERENCES galaxy(galaxy_id)

Yes the foreign key checks do look for data so they won’t pass till فhe data gets added.

1 Like

Thank you! I’m almost ready to add my data

1 Like

All my data structures are done (that was tedious because I started to get too creative!), but command line entering of 6 galaxies , 6 stars, 10 planets and 20 moons seems excessively beyond what’s needed for competency.

I have been unable to paste into the VM which would speed things up a bit. Any other shortcuts?

having learned SQL via Microsoft Access (2.0!), this command line stuff is torture, lol.

Finished my database!

1 Like

I paste with shift-insert buttons pressed together (I assume you mean how to paste into the terminal)

For pasting into a file i right click and choose paste.

I don’t know if sharing the project is a good idea as there are academic honesty concerns for the certification projects.

oooh OK. I’ll remove it, thanks!

1 Like