Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database HW1 Suppose you would like to make a database for a book store where you need to keep track of the books and customers

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

Database HW1 Suppose you would like to make a database for a book store where you need to keep track of the books and customers who bought the books Specify the entities - 1 .specify for each entity the attributes - 2 Specify wuch attribute can be the primary key -3 specify the relations between entities -4 ( specify the relation type (1:1, 1:N, N: M-5 Draw the ER diagram for the database -6 1. Solution HW1 Here, there will be two entities 1) Book II) Customer. 2. An attribute is a piece of information about the entity. The attributes of Book entity will be >>>Book ID. Title, Author, ISBN, Price, Edition, Category. The attributes of Customer entity will be >>> Customer ID, Name, Address, Age, contact_Number. 3. In the Book table Book ID will be the primary key which will be the foreign key of Customer table. And in the Customer table Customer ID will be the primary key. 4. In the Book table Book ID will be the primary key which will be the foreign key of Customer table. So, there will be a column for Book_ID in the Customer table. 5. Cardinality refers to the relationship between a row of one table and a row of another table. Here we can see that a customer can borrow one or more than one book. But a particular book (Book_ID) can be borrowed by one customer only. So, the relation between Customer and Book tables will be 1:N (one to many). 6. ER Dlagram: Address Title Customer_ID Contact_No Book_ID Price Customer Name Book Category Borrows Edition ISBN according the solution in HW1 need solution HW2 and HW3 HW 2 For the database in HW1, please do the following specify the table name - 1 specify the data in the table (field name, data type ,-2 ( constraint mention the primary key for the table -3 mention the foriegn key -4 HW 3 For the previous HW1, H 2 , please use the SQL to do -: the following Use SQL to create the tables - 1 USE SQL to add data to the table -2 USE SQI to delete a data in the table -3 Use QSI to update a data in the tables -4

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

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

LO1 Discuss four different views of motivation at work.

Answered: 1 week ago

Question

LO6 Summarize various ways to manage retention.

Answered: 1 week ago