Hierarchical and Recursive Queries in SQL Server
Learn how to write recursive queries and query hierarchical data structures.
Commencer Le Cours Gratuitement4 heures13 vidéos47 exercices10 708 apprenantsDéclaration de réalisation
Créez votre compte gratuit
ou
En continuant, vous acceptez nos Conditions d'utilisation, notre Politique de confidentialité et le fait que vos données sont stockées aux États-Unis.Formation de 2 personnes ou plus ?
Essayer DataCamp for BusinessApprécié par les apprenants de milliers d'entreprises
Description du cours
Do you want to query complex data structures in an iterative way? Do you have access to hierarchical data structures that need to be queried? This course will teach you the tools required to solve these questions. You will learn how to write recursive queries and query hierarchical data structures. To do this, you will use Common Table Expressions (CTE) and the recursion principle on a wide variety of datasets. You will, for example, dig into a flight plan dataset and learn how to find the best and cheapest connection between two airports. After completing this course, you will understand the principle of recursion, and be able to identify and create hierarchical data models.
Formation de 2 personnes ou plus ?
Donnez à votre équipe l’accès à la plateforme DataCamp complète, y compris toutes les fonctionnalités.- 1
Recursion and Common Table Expression (CTE)
GratuitIn this chapter, you will learn about recursion and why it is beneficial to apply this technique. You will also refresh your knowledge about Common Expression Tables (CTE).
Recap of Common Table Expressions (CTE)50 xpWhat is a CTE?50 xpA CTE for IT-positions100 xpA CTE for high-paid IT-positions100 xpIntroduction to recursion50 xpFacts about recursion50 xpCalculate the factorial of 5100 xpHow to query the factorial of 6 recursively100 xpSolve recursive maths problems50 xpCounting numbers recursively100 xpCalculate the sum of potencies100 xp - 2
Hierarchical and Recursive Queries
In this chapter, you will learn about recursive CTEs, how to query hierarchical datasets, and finally, how to apply recursive CTEs on hierarchical data.
Introduction to recursive CTE50 xpRight or wrong?50 xpCreate the alphabet recursively100 xpCreate a time series of a year100 xpWorking with recursive queries50 xpWho is your manager?100 xpGet the hierarchy position100 xpWhich supervisor do I have?100 xpAnalyze the family tree50 xpGet the number of generations?100 xpGet all possible parents in one field?100 xp - 3
Creating Data Models on Your Own
In this chapter, you will learn how to create and modify database tables. You will learn about relational and hierarchical data models, how they differ, and when each model should be used.
How to work with tables50 xpCreating a table100 xpInserting and updating a table100 xpDeleting data and dropping table100 xpChanging a table structure100 xpWorking with relational data models50 xpDefining primary and foreign keys100 xpInserting data to person and order history100 xpGetting the number of orders & total costs100 xpWorking with hierarchical data models50 xpCreating a hierarchical data model100 xpNetworked and hierarchical models50 xpCreating a networked data model100 xp - 4
Hierarchical Queries of Real-World Examples
In this chapter, you will practice your learnings about hierarchical and recursive querying on real-world problems, such as finding possible flight routes, assembling a car, and modeling a power grid.
Travel planning for flight data50 xpGet the anchor & recursive member50 xpGet all possible airports100 xpAll flight routes from Vienna100 xpHow to assemble a car?50 xpCreate the parts list100 xpCreate a car's bill of material100 xpBuild up a BMW?100 xpModeling a power grid50 xpCreate a power grid100 xpGet power lines to maintain100 xpSummary of the course50 xp
Formation de 2 personnes ou plus ?
Donnez à votre équipe l’accès à la plateforme DataCamp complète, y compris toutes les fonctionnalités.ensembles de données
Power grid dataEmployee dataDepartment dataSalary dataBill of materials products dataBill of materials dataFlights datacollaborateurs
Jasmin Ludolf
Voir PlusData Science Content Developer, DataCamp
Qu’est-ce que les autres apprenants ont à dire ?
Inscrivez-vous 15 millions d’apprenants et commencer Hierarchical and Recursive Queries in SQL Server Aujourd’hui!
Créez votre compte gratuit
ou
En continuant, vous acceptez nos Conditions d'utilisation, notre Politique de confidentialité et le fait que vos données sont stockées aux États-Unis.