English feliratok

← Hello PostgreSQL - Intro to Relational Databases

Beágyazókód kérése
4 Languages

Showing Revision 4 created 05/24/2016 by Udacity Robot.

  1. The post crest ql database server,
  2. has already been installed
    on your virtual machine.
  3. The psql program, lets you log into the
    database and do queries interactively.
  4. Here, let's look at the database for
    the forum.
  5. If you're on psql forum,
    look at a database prompt like this.
  6. Now you can run select
    statements like this one, and
  7. that's something we saw back
    in lesson one actually.
  8. But, how about this.
  9. Okay huh, looks like an empty table,
    zero rows.
  10. Yeah, your VM came with an empty table,
    for you to connect the forum app too.
  11. That's just because we're
    not covering creating new
  12. tables until the next lesson.
  13. Now if we look at what
    types these columns are,
  14. it looks like, content is text.
  15. Time is some sort of time stamp, and
    ID is an integer, plus something weird.
  16. We'll see more about that later on.
  17. For right now,
  18. the ones of these that we really need
    to focus on, are content and time.
  19. We'll use the text column,
  20. content to store the contents
    of user's forum posts.
  21. And we'll use the time column to
    store the time they posted, so
  22. we can put them in order
    with the most recent first.
  23. You can press q to go
    back to the psql prompt.
  24. Now let's dig into the forum code and
    do it.