Shows how to follow the trail of foreign keys to find how tables are linked together, in order to picture database linkages and work out the roles of different tables
- [Instructor] We've looked at keys and indexes…and constraints on one table.…And now we're going to use that information…to look at the database as a whole…and see how our tables link together.…Here we are representing the rental table as a blue box.…Under the name of the table,…we've listed all the primary and foreign keys.…P for primary and F for foreign.…I'm not listing the indexes or unique constraints,…if there'd been any, in this diagram,…although you could if you liked.…The purpose of the diagram for me is to show…how the tables are linked together,…and neither indexes nor unique constraints…affect other tables.…
They're kind of internal to their table.…Now we can see that the rental table…has links to the inventory table.…So let's look at that one next.…Go to the inventory table and the structure tab.…We can see that there are…two foreign keys here and one primary key.…So now we can add the inventory table to our diagram,…and also add a link in there too.…The inventory_id field in the rental table is a foreign key…
Join Emma Saunders as she shows you how to design and write simple SQL queries for data reporting and analysis. Review the different types of SQL, and then learn how to filter, group, and sort data, using built-in SQL functions to format or calculate results. Learn a bit about data types and database design. Discover how to perform more complex queries, such as joining data together from different database tables. Last but not least, Emma shows how to save your queries as views, so you can run them again and again.
- Using different versions of SQL
- Retrieving data with SELECT statements
- Filtering and sorting your results
- Transforming results with built-in SQL functions
- Grouping SQL results
- Merging data from multiple tables
- Identifying data types, and how to make sense of your database design
- Saving SQL queries
Skill Level Intermediate
1. Use SQL to Report Data
Data types in SQL databases5m 47s
2. Group your SQL Results
3. Merge Data from Multiple Tables
4. Advanced Features and Taking Your Learning Forwards
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.