Introduction
In this project, you will learn how to create and use database views in MySQL. Database views are virtual tables that provide a customized perspective of the underlying data, allowing you to hide certain data processes from users and simplify data access.
👀 Preview
MariaDB [edusys]> SELECT * FROM comp_spring_2018_taylor;
+-----------+-------------+
| course_id | room_number |
+-----------+-------------+
| CS-319 | 3128 |
+-----------+-------------+
1 row in set (0.00 sec)
🎯 Tasks
In this project, you will learn:
- How to start the MySQL server and import a database
- How to define a view that displays the room numbers of all major courses offered in a specific semester, location, and department
- How to define a view that filters the results of the previous view to only include courses located in a specific building
🏆 Achievements
After completing this project, you will be able to:
- Understand the concept and benefits of database views
- Create custom views to simplify data access and hide unnecessary complexity
- Apply your knowledge of SQL queries to define and use views in a real-world scenario
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
mysql(("`MySQL`")) -.-> mysql/BasicKeywordsandStatementsGroup(["`Basic Keywords and Statements`"])
sql(("`SQL`")) -.-> sql/BasicSQLCommandsGroup(["`Basic SQL Commands`"])
sql(("`SQL`")) -.-> sql/DataManipulationandQueryingGroup(["`Data Manipulation and Querying`"])
mysql(("`MySQL`")) -.-> mysql/AdvancedFeaturesGroup(["`Advanced Features`"])
sql(("`SQL`")) -.-> sql/AdvancedDataOperationsGroup(["`Advanced Data Operations`"])
mysql/BasicKeywordsandStatementsGroup -.-> mysql/source("`External Code Execution`")
sql/BasicSQLCommandsGroup -.-> sql/select("`SELECT statements`")
sql/DataManipulationandQueryingGroup -.-> sql/where("`WHERE clause`")
mysql/BasicKeywordsandStatementsGroup -.-> mysql/select("`Data Retrieval`")
mysql/AdvancedFeaturesGroup -.-> mysql/views("`View Management`")
sql/AdvancedDataOperationsGroup -.-> sql/views("`Views`")
subgraph Lab Skills
mysql/source -.-> lab-301432{{"`View for Course Information`"}}
sql/select -.-> lab-301432{{"`View for Course Information`"}}
sql/where -.-> lab-301432{{"`View for Course Information`"}}
mysql/select -.-> lab-301432{{"`View for Course Information`"}}
mysql/views -.-> lab-301432{{"`View for Course Information`"}}
sql/views -.-> lab-301432{{"`View for Course Information`"}}
end