Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Workbench create the following database, EER diagram and SQL script. The database tracks books and authors. In addition, it classifies books into genres such

Using Workbench create the following database, EER diagram and SQL script.

The database tracks books and authors. In addition, it classifies books into genres such as fiction or non-fiction.

image text in transcribed

Business Rules and Guidelines:

1) An author may write one or many books and a book can be written by one or more authors.

2) A book can belong to only one genre (category) and a genre can include many books.

3) Do not worry about optionality the little circle on top of the crows feet.

4) MySql does not have a money datatype research what the substitute would be. And is text datatype appropriate for this design? Remember MySqltutorial.com is a good place to research along with StackOverFlow and of course the Mysql manual.

Basic database design rules:

All tables must have an auto increment, non null primary key except junction tables.

All labeling of names should follow the lowercase, underscore naming convention.

All PK and FK columns should be noted.

All foreign key constraints should be named by you not be default. Be consistent.

All relationship lines should be drawn.

All datatypes should be specified and make sense. All tables should use INNODB engine.

DATA

Each table must have at least five rows of data. Use INSERT statements to add data to the tables. DO NOT use edit grid feature in Workbench to add data.

Add data rows to the parent or the One side of a relationship first. You cant add children records and then add Parent records.

Here is the data:

PK PK category int varchar(20) varchar(100) book_author author_id int PK FK book_id int PK FK code name book int varchar(100) text money int int title description price category_id FK author int name varchar(200) PK PK PK category int varchar(20) varchar(100) book_author author_id int PK FK book_id int PK FK code name book int varchar(100) text money int int title description price category_id FK author int name varchar(200) PK

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

Students also viewed these Databases questions

Question

Construct a 99% confidence interval for in Exercise 9.14.

Answered: 1 week ago