Question

1. Transform this ERD into relation. Explain each time what rule you use. This ERD shows the organization of data in a library system.

Setution Pasiword Name Address uld erlyn Fine User O-n O-n Date Date Withdraw Hold N PubYear Tile Book -n -n 1-e Rfere CopyNu

2. Transform the following ERDs into relations using the algorithm provided in the notes. Explain each time what rule you use.

ONE-TO-MANY RELATIONSHIP one-to-many relationship between an instructor and a student an instructor is associated with severa

MANY-TO-MANY RELATIONSHIP An instructor is associated with several (possibly 0) students via advisor o A student is associate

Setution Pasiword Name Address uld erlyn Fine User O-n O-n Date Date Withdraw Hold N PubYear Tile Book -n -n 1-e Rfere CopyNumber Status I- BookCopy 0-1 bid 0-1 WritenBy M abbooks UName N 1-n 0-n Shelf PlacedOn Author FNomma
ONE-TO-MANY RELATIONSHIP one-to-many relationship between an instructor and a student an instructor is associated with several (including 0) students via advisor a student is associated with at most one instructor via advisor, 1N student instructor 0-1 ID 1n ID advisor name name tot_cred salary
MANY-TO-MANY RELATIONSHIP An instructor is associated with several (possibly 0) students via advisor o A student is associated with several (possibly 0) instructors via advisor NM student instructor ID advisor name name salary tot_cred
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Relational Model

User(uId, Name, Password, Address, userType,fine) --- convert each entity to relation and attribute to columns, primary key is underlined .

Withdraw(uId, bId, Date) ----- convert Withdraw relationship to relation as it has one attribute Date and the composite primary key is primary keys of the two relations which are relation by this relationship which is also foreign key to both relations

Hold(uId, bId, Date) ---- convert Hold relationship to relation as it has one attribute Date and the composite primary key is primary keys of the two relations which are relation by this relationship which is also foreign key to both relations

BookCopy(bId, CopyNumber, Status,uId,Isbn) ---- usId and Isbn are foreign keys as each bId is related to 1 uId and 1 Isbn

Book(Isbn, Title, PubYear)

Author(aid,LName,FName)

WrittenBy(Isbn,aid) --- M to N relationship

Shelf(sid, nbbooks,bId)

underlined are primary keys and italicised are foreign keys.

2.

One -to-Many

instructor(ID, name, salary)

student(ID, name, tot_cred, instructor_ID)

Many-to-Many

instructor(ID, name, salary)

student(ID, name, tot_cred)

instructor_student( instructor_ID,student_ID)

underlined are primary keys and italicised are foreign keys.

Do ask if any doubt. Please upvote.

Add a comment
Know the answer?
Add Answer to:
1. Transform this ERD into relation. Explain each time what rule you use. This ERD shows...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • �Martial Arts R Us� (MARU) needs a database. MARU is a martial arts school with hundreds of students. It is necessary to...

    �Martial Arts R Us� (MARU) needs a database. MARU is a martial arts school with hundreds of students. It is necessary to keep track of all the different classes that are being offered, who is assigned to teach each class, and which students attend each class. Also, it is important to track the progress of each student as they advance. Create a complete Crow�s Foot ERD for these requirements: Students are given a student number when they join the school....

  • This is database system concept. 1.Find the ids of instructors who are also students using a...

    This is database system concept. 1.Find the ids of instructors who are also students using a set operation. Assume that a person is identified by her or his id. So, if the same id appears in both instructor and student, then that person is both an instructor and a student. Remember: set operation means union, intersect or set difference. 2.Find the ids of instructors who are also students using the set membership operator. 3.Find the ids of instructors who are...

  • In this phase of the project you will create an ERD based upon the following requirements and bus...

    In this phase of the project you will create an ERD based upon the following requirements and business rules. Limit your ERD to entities and relationships based on the business rules showed here. In other words, do not add realism to your design by expanding or refining the business rules. However, make sure you include all attributes needed that would permit the model to be successfully implemented, including all primary and foreign keys. 1. Trinity College (TC) is divided into...

  • 4. Write SQL data definition commands for each of the following queries: a. How would you add an attribute, Class, to the Student table? b. How would you remove the Registration table? c. How would you change the FacultyName field from 25 characters

    Problems and Exercises 1 through 9 are based on the dass scheduling 3NF relations along with some sample data shown in Figure 6-11. Not shown in this figure are data for an ASSIGNMENT relation, which represents a many-to-many relationship between faculty and sections.4. Write SQL data definition commands for each of the following queries:a. How would you add an attribute, Class, to the Student table?b. How would you remove the Registration table?c. How would you change the FacultyName field from...

  • Would you please help me with this homework ? 1- Explain what requirements this ER diagram...

    Would you please help me with this homework ? 1- Explain what requirements this ER diagram is implementing 2- Draw an ER diagram (relationships) for the following business rules in a company: • A salesperson manages one or many other salespeople while a salesperson is managed by only one salespeople. • A salesperson can be an agent for many customers but a customer is managed by only one salesperson. • A customer can place many orders. But an order can...

  • Question 1.Write a SQL statement for each of the following questions based on the above tables...

    Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points). 1) Create “Enrollment” table. 2) Change the credits of “Database” course from 2 to 3. 3) List the course titles (not Course_No) and grades John Doe had taken. 4) Calculate average of Café Balance, and name new field as Average Balance. 5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled...

  • Introduction to C Programming – COP 3223 1. To learn how to use arrays to store...

    Introduction to C Programming – COP 3223 1. To learn how to use arrays to store and retrieve data to help solving problems. 2. Reinforce use of input files. Introduction: Ninja Academy Ninjas are awesome! Your friend has not stopped talking about how cool ninjas and how they would like to become a ninja. To amuse your friend, you have decided to create a series of programs about ninjas. Problem: Mentorship (ninjamentors.c) It is time for your friend to select...

  • In Problem Set 7 you designed and implemented a Message class. This time, let's design and...

    In Problem Set 7 you designed and implemented a Message class. This time, let's design and implement a Mailbox class in a file named Mailbox java. Do the following with this class • You may use the Message class from PS 7. You will have to add new features to the Message class from PS 7 as you work through this problem. You are welcome to start with my sample solution if you wish • Suppose there are multiple mail...

  • The primary keys are underlined. The foreign keys are denoted by asterisks (*). Description of the...

    The primary keys are underlined. The foreign keys are denoted by asterisks (*). Description of the schema: • person — keeps track of the people who borrow books from the library. The attributes contain personal and contact information. • author — keeps track of personal information about authors. • publisher — keeps track of the publisher information. To keep it simple, most of the attributes have been truncated in the sample database. 1 trivial dependencies are things like X→X or...

  • n the Labs Labs 1 and 2, which increase in difficulty, require you to create webpages based on what you learned in the...

    n the Labs Labs 1 and 2, which increase in difficulty, require you to create webpages based on what you learned in the chapter; Lab 3 requires you to dive deeper into a topic covered in the chapter. Lab 1: Creating an External Style Sheet for City Farmer Problem: You work for a local but rapidly growing gardening supply company called City Farmer that specializes in products that support food self-sufficiency. The company has hired you to help create the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT