Creating Tables in MySQL

 Creating Tables in MySQL

          Creating tables in MySQL is important so that a user can add information, delete information, and update an entry using SQL statements. Also, a final statement was created to join all three tables demonstrating the relationships between the three tables. The INSERT function was used to add rows to the first table named tbldvdtitles. The information was inserted and the code and the results are pictured below:



MySQL instructions were used by Oracle to guide the use of MySQL. The next table was a table called tbldvdActors with the information inserted and results below:


Updating and deleting rows were part of the requirements for the interactive assignment and the following code was used:


A third table was created to describe the relationships between actor ID and the ASIN number for each movie and the results were as follows:

Joining all three tables was the last step and the results were as follows:

Information was successfully joined from all three tables. During this interactive assignment, information was inserted one row at a time to ensure accuracy. Multiple rows can be added to one line of code with the following SQL statements:

INSERT INTO table_name (column_list)

VALUES

            (value_list_1),

            (value_list_2),

            ...

            (value_list_n);

            Various ways could have been used to join the three tables, depending on the specifics of the requirements from a project or business. Playing around with MySQL was the easiest way to navigate the new tool being learned for this project and SQL in general is very straightforward in accomplishing an end goal. SQL has under 100 statements that can be used, making the language fairly simple to learn and use, even as a new user. 












Comments

Popular posts from this blog

Employee Management System - Simple Project

Explicit and Implicit Variables