Posts

Showing posts from October, 2023

Creating Tables in MySQL

Image
  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 follo...

SQL Statement Types

Image
                SQL statements can be defined into three major types: Data Definition Language (DDL), Data Manipulation Language (DML), and Data Control Language (DCL). SQL language is relatively easy to learn and has fewer than 100 statements. The way different types of the SQL statements manipulate or control the data is what sets each apart. The three main categories can be broken down as follows: Data Definition Language – These types of statements create something in the database, like a table, index, or other properties of the actual database. ALTER TABLE – modifies a table’s definitions (ALTER TABLE table_name) DROP TABLE – Deletes a table and all of the data permanently (DROP TABLE table_name;) Be very careful using this and ensure backups are created first. The table will permanently deleted along with all of the data. Data Manipulation Language – These are used to manipulate the data, as the name implie...