Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you dont have MySQL. Workbenck on your computer: Use https:/lwww.w3schools.com/sql/trysqt.asp? filenameetrysql_select all, then copy each command to a .bxt file to submit to D2L.

image text in transcribed
image text in transcribed
If you dont have MySQL. Workbenck on your computer: Use https:/lwww.w3schools.com/sql/trysqt.asp? filenameetrysql_select all, then copy each command to a .bxt file to submit to D2L. Hint: In this website (w3School), you CAN'T create a database, but you can create tables. In this assignment, you need to create a simple database. Before starting this homework, make sure to watch the introduction to MySQL. video. Here, we want to create a simple database with two tables for the following entities: 1- Authors 2. Books We know that each author may publish one or more books. the attributes of the authors are as follows: 1) AID represents the Author's ID and its an integer number (INT data type). This column is the primary key of the table. 2) AFName represents the Author's First hame and its data type is a string (varchar(32) data type). 3) AlName tepresents the Author's Last Name and its data type is a string (varchar(32) data type). 4) AStAddress represents the Author's street address and its data type is a string (varchar(32) data type) 5) ACity that represents the Author's City and its data type is a string (varchar(32) data type). 6) AState that represents the Author's state and its data type is a string (varchar(32) data type). 7) AZipcode that represents the Author's zip code and its data type is an integer. 8) ADOB represents the Author's date of birth and its data type is the date (date data type). the attibutes of the Book are as follows. 1) BID (Book ID, integer data type). This column is the primary key of the table. 2) BName (Book Name, varchar(32) data type) 3) BISBN (Book ISBN, varchar(13) data type) 4) BPDate (Book published date, date data type) 4) AStAddress represents the Author's street address and its data type is a string (varchar(32) data type) 5) ACity that represents the Author's City and its data type is a string (varchar(32) data type). 6) AState that represents the Author's state and its data type is a string (varchar(32) data type). 7) AZipcode that represents the Author's zip code and its data type is an integer. 8) ADOB represents the Author's date of birth and its data type is the date (date data type). the attributes of the Book are as follows. 1) BID (Book ID, integer data type). This column is the primary key of the table. 2) BName (Book Name, varchar(32) data type) 3) BISBN (Book ISBN, varchar(13) data type) 4) BPDate (Book published date, date data type) 5) AID (Author's ID) and its foreign key. Now answer the following questions, and write your answers with an SQL statement for each question. 1. create a database called MyTestDb. 2. create the table of Authors. 3. create the table of Books. 4. add at least two authors to the table of Authors 5. add at least four Books to the table of Books

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions