Getting Started with IntelliJ IDEA by 2013
Author:2013
Language: eng
Format: epub
Publisher: Packt Publishing
As we have lot of things to do, you can use the files available in this book to load the data in our database. Click on the File menu and choose Open...; in the dialog that appears, select the file email.sql and click on the OK button. The file will be opened in a new tab. You will notice that at the top of the tab is a yellow bar asking about the SQL dialect; click on the link at the right called Change dialect to.... In the SQL Dialects window, select the line project and click on the cell in the column SQL Dialect. A list of available dialects will appear, so, select MySQL and press the OK button.
You've probably noticed that this file wasn't opened in the query console and that there isn't any button available to execute the script. Differently from the query console, when you open a SQL script directly with IntelliJ, you don't need to put the cursor over a line you want to execute; the whole script will be executed, and that is what we want. To execute it, right-click anywhere in the script and select Run "email.sql"; now, if you use the Refresh button in the table editor in the person table, you will see that the data was inserted into the table. Now you can do the same for phone.sql and person.sql files.
Once the data is loaded in all the tables, we can work with them; so, if it isn't open, open the person table in the table editor. As you can see, some data is loaded by default, but this is limited to 52 records—you can see this when you click on the Query button. Despite being a tool that will sometimes help you, the table editor doesn't permit changes in the query used to retrieve data and doesn't have some visual facilities that are available in tools like Microsoft Access; so, if you want to see two or more tables together, you need to write the query in a query console.
We will now create a simple database view that permits us to see the data from the person table joined with the data from the e-mail table; so, open the query console and type the following query:
create view person_and_email as select person_id,email.id as email_id, complete_name, birth_date, place_of_birth, email from person left join email on person.id=email.person_id
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9775)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8293)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7775)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6797)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6524)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6391)
Kotlin in Action by Dmitry Jemerov(5062)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4315)
Functional Programming in JavaScript by Mantyla Dan(4037)
Solidity Programming Essentials by Ritesh Modi(3982)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3771)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3714)
The Ultimate iOS Interview Playbook by Avi Tsadok(3688)
