![what does adventureworkslt database do what does adventureworkslt database do](https://www.tutorialgateway.org/wp-content/uploads/Download-and-Install-AdventureWorks-Database-5.png)
So lets take a look at a query in the context of our two tables. You are literally asking the database for information. What is a query? Well, no one really uses it in modern speech today( at least in the USA), but it means to ask for something. There is no friends list set up, so you would simply see all posts.
![what does adventureworkslt database do what does adventureworkslt database do](https://res.cloudinary.com/dmsxwwfb5/image/upload/v1601904210/database-right-click-restore-database-min.png)
So now, lets say you went to the site and looked at it. So Now we have an incredibly bare bones database. Instead, the POST_ID is the unique identifier and as a result,is made the PKEY.(keep in mind, a person making the database has to identify which is which. But there are many posts and a user can have more than one, so using the Primary key of the user, doesn't give it a unique aspect, so it is labeled as a foreign key, showing that it itself, isn't unique in this context, but it does point to something unique. As you saw, a user is unique they have their own unique identifier (USER_ID). But if you look again, there is something new. So what would that look like? Well let's call it " POSTS", and it will have these columns: USER_ID(FKEY), POST_ID(PKEY), TIMESTAMP, and CONTENTS. But what about when a user posts something? There wasn't anything about posts in that last table we made. It is simply a long, unique identifier to point at when referencing users. It might look something like "1234567890".
WHAT DOES ADVENTUREWORKSLT DATABASE DO PASSWORD
Now, it might make more sense to just have USER_ID, EMAIL, and PASSWORD in there own section, But I will continue on.Īs you saw, the USER_ID is the PKEY. Let's say it is called " USERS" and it has the following columns: PROFILE_ID(PKEY), EMAIL, PASSWORD, NAME, BIRTHDAY, GENDER, and ABOUT. In this database, we could expect to see one table for that contains things describing a user and some attributes about them. The Pkey is a unique identifier to tie sets of data together.įor example, lets say we had a database for a social media site. A table often has something called a Primary Key(or PKey). A table, is simply a separate spreadsheet that is contained within the same database, and can be related to the other tables. A row, is a horizontal section, it contains values for the columns(e.g. A column, is a vertical section, it is the name of a value(e.g. To expand, a database, often looks as simple as a spreadsheet.