Question

In: Computer Science

Q3. Convert the conceptual database into a relational database schema. Identify the primary key and foreign...

Q3. Convert the conceptual database into a relational database schema. Identify the primary key and foreign key constraints.

Q4. Show all the functional dependencies that should hold among the attributes.

Q5. Design relation schemas for the database that are each in 3NF. Specify the primary and foreign key attributes of each relation.

Hi expert!

Can you help me with the above questions? I'm not asking you to solve my questions but want to find what each questions actually requires me to show or answer.

Solutions

Expert Solution

Question 3:
For Convert the conceptual database into a relational database schema we need a conceptual model for the database in which various things are clearly defined:

  • 1. Entities: In the conceptual model each entity is defined by using a rectangle box.
  • 2. Attributes: Attributes are defined within the Entities. Attributes are the column name of the Table. Attributes are prime attributes, non-prime attributes, or foreign key attributes. An attribute that uniquely identifies the Table is called Primary key
  • 3. Cardinalities: The connection between entities must be 1:1, 1:M, M:1, M:M.
  • 4. Relationship name: The name by which two entities are connected

All these things need to convert the database into a relational database. There are the following steps need to convert them:

  • 1. Convert the entity into a Table or Create a table for the entity
  • 2. The attributes of the entity act as filed of a table with its data type.
  • 3. Mention a Primary key for each table.
  • 4. Now check the relationship exists between entities and base on of cardinalities the Fk is defined in a table:
  • a) For 1:1 cardinalities the PK of one entity act as FK in another entity. It depends on you in which entity you set the FK.
  • b) For M:1 cardinalities the PK of one order entity act as FK in M order entity.
  • c) For M:M cardinalities the Pk of both the entities act as an FK in relationship Table of Both entities

Question 4:
Functional Dependencies between the attributes :
When one attribute depends on other attributes then the functional dependencies exist. The dependency of the non-prime attribute to the prime attribute is called Functional Dependencies.
In which one attribute is called determinant and the other attribute is called a dependent attribute.

Like a--> b   
a is dependent on b and a is act as Determinant and b is act as Dependent attribute.

Example :
StudentID -----> StudentName, StudentAddress
StudentName and StudentAddress is depend on StudentID

Question 5:

A database in 3NF when the data is in 2NF and there are transitively dependency exists. The transitive dependency exists between Non-prime attributes and prime attribute.
The Primary key is mention as per the requirement of the table and The Foreign key is mention according to the cardinalities given and the relational schema is build for the database.

Example:
EmployeeID ---> EmpName , EmpSalary , EmpPhoneNo.


Related Solutions

• Relational Schema Create a relational database schema consisting of the four relation schemas representing various...
• Relational Schema Create a relational database schema consisting of the four relation schemas representing various entities recorded by a furniture company.   Write CREATE TABLE statements for the following four relation schemas. Define all necessary attributes, domains, and primary and foreign keys. Customer(CustomerID, Name, Address) FullOrder(OrderID, OrderDate, CustomerID) Request(OrderID, ProductID, Quantity) Product(ProductID, Description, Finish, Price) You should assume the following: Each CustomerID is a number with at most three digits, each OrderID is a number with at most five digits,...
Consider the following relational schema about a University (the primary keys are underlined and foreign keys...
Consider the following relational schema about a University (the primary keys are underlined and foreign keys are italic) STUDENT(StudentID, name, major, year, age) CLASS(ClassName, meetsAt, room, LecturerID) ENROLLED(StudentID, ClassName, mark) LECTURER(LecturerID, name, DepartmentID) DEPARTMENT(DepartmentID, name) Write the SQL statements for the following query: B1. Find the age of the oldest student. B2. Find the ID’s of lecturers whose name begins with “K” \ B3. Find the age of the youngest student who is enrolled in Mechatronics. B4. Find the age...
Consider the following relational schema (the primary keys are underlined and foreign keys are italic) ITEM(ItemName,...
Consider the following relational schema (the primary keys are underlined and foreign keys are italic) ITEM(ItemName, ItemType, ItemColour) DEPARTMENT(Deptname, DeptFloor, DeptPhone, Manager) EMPLOYEE(EmpNo, EmpFname, EmpSalary, DeptName, SupervisedBy) SUPPLIER(SupNo, SupName) SALE(SaleNo, SaleQty, ItemName, DeptName) DELIVERY(DeliNo, DeliQty, ItemName, DeptName, SupNo) Write the SQL statements for the following queries: C1. Find the names of items sold on first and second floors. [1 mark] C2. For each department, list the department name and average salary of the employees where the average salary of the...
what is super key,  candidate key, and primary key, and foreign key in terms of database? and...
what is super key,  candidate key, and primary key, and foreign key in terms of database? and plz provide some examples, thanks.
When is the conceptual schema of a database changed?- if we update data in the database...
When is the conceptual schema of a database changed?- if we update data in the database -if we alter the logical structure of the database -if we retrieve data from the database -if we alter the storage structure of the database Which of the following has the same meaning as the outer union? Group of answer choices -the left outer (natural) join -the right outer (natural) join -the full outer (natural) join -the inner (natural) join Assume {A, B} is...
Create a Database Schema for a hotel reservation system. indicate the Primary Keys, Foreign Keys, and...
Create a Database Schema for a hotel reservation system. indicate the Primary Keys, Foreign Keys, and the one-to-one or one-to-many relationships between the tables. Also describe in a small paragraph the scope of the back-end database, by explaining the different tables and their relations in your schema.
Assuming Database is not providing Referential Integrity Constraints support i-e Primary key, foreign key and Unique...
Assuming Database is not providing Referential Integrity Constraints support i-e Primary key, foreign key and Unique key, your task is to design a database engine with your own built in Referential integrity rules implementation and you need that only one database connection is maintained which an application should access. Recommend proper design pattern used for the stated problem. Give reasons for selecting that pattern, create complete class diagram for the solution. The class diagram should also show the methods of...
Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each...
Identify every possible primary key, candidate key, and foreign key for the following relations. Separate each key using a semicolon to avoid confusion. Assumptions: MIScompany has branches located in several states within the United States. A customer can be an individual or organization. driverId is the driving license number, ssno is the social security number and upc is the universal product code. Any equipment is rented and returned at the same branch. A customer can be a manufacturer and vice...
Question 2: consider the following library relational database schema Write a program segment to retrieves the...
Question 2: consider the following library relational database schema Write a program segment to retrieves the list of books that became overdue yesterday and that prints the book title and borrower name for each. 1- Use JDBC with Java as the host language
tableA is a table in a relational database with a composite prime key consisting of fields...
tableA is a table in a relational database with a composite prime key consisting of fields F1 and F2. You have determined that tableA is 1NF. There are four other fields in tableA. Two of them, F10 and F12, are functionally determined by F1. The other two, F50 and F55, are functionally determined by F2. Because all fields are functionally determined by at least a portion of the key, is tableA 2NF?   If you believe the table is not yet...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT