Create the ERD to show the relationship between EMPLOYEE and JOB.
A Primary Key in a database table is a field in the table that uniquely identifies every row or record present in the database table.
Students in Universities are assigned a unique registration number.
Therefore, in a STUDENT database table, the attribute “reg_no” acts as primary key.
Foreign Key is a column in a relational database table which provides a relation between two tables. It provides a cross reference between tables by pointing to primary key of another table.
In STUDENT database table, the attribute “reg_no” acts as primary key and in COURSE database table in which the student selects his or her course, the same “reg_no” acts as foreign key for the STUDENT table.
One to Many Relationship:
When one record in a database table is associated with more than one record in another table, the relationship between the two tables is referred as one to many relationship. It is also represented as1: M relationship. This is the opposite of many to one relationship.
ENTITY- RELATIONSHIP DIAGRAM (ERD):
Entity- Relationship Diagram is also known as ER Diagram. It is used to define the conceptual view of the database as viewed by the end user. It is used to depict the database’s main components: entities, relationships and attributes.
CROW FOOT ERD:
The Crow Foot ERD is an Entity Relationship Diagram which is used to represent the cardinalities present in the basic ER diagram. It is used to represent the relationships present between two tuples or tables present in the database.
Given database tables:
Table Name: EMPLOYEE
Table Name: JOB
Primary Key and Foreign Key in the above Tables:
For Table Name: EMPLOYEE:
Primary Key: EMP_CODE
“EMP_CODE” acts as primary key of the table because the attribute “EMP_CODE” is a unique ID that is assigned to every employee. It also uniquely identifies every other row present in the database table.
Foreign Key: JOB_CODE
“JOB_CODE” acts as foreign key for the table because the attribute “JOB_CODE” is also present in the table JOB as its primary key. It also provides a link between the two database tables “EMPLOYEE” and “JOB”.
For Table Name-JOB:
Primary Key: JOB_CODE
“JOB_CODE” acts as primary key of the table because the attribute “JOB_CODE” is a unique ID that is assigned to every employee present in the company. It also uniquely identifies every other row present in the database table.
Foreign Key: None
There is no Foreign Key attribute present in the JOB table because there is no attribute in the table except the primary key which is present in any other database table as a primary key...
Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!Get Started
Fundamentals of Information Systems
Fundamentals of Information Systems
A Guide to SQL
Principles of Information Security (MindTap Course List)
Database Systems: Design, Implementation, & Management
Precision Machining Technology (MindTap Course List)
Principles of Information Systems (MindTap Course List)
Fundamentals of Geotechnical Engineering (MindTap Course List)
Automotive Technology: A Systems Approach (MindTap Course List)
Cornerstones of Financial Accounting
Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Principles of Geotechnical Engineering (MindTap Course List)
Systems Analysis and Design (Shelly Cashman Series) (MindTap Course List)
Management Of Information Security
Fundamentals of Chemical Engineering Thermodynamics (MindTap Course List)
Solid Waste Engineering
EBK ELECTRICAL WIRING RESIDENTIAL
Electric Motor Control
International Edition---engineering Mechanics: Statics, 4th Edition
Steel Design (Activate Learning with these NEW titles from Engineering!)
A+ Guide to Hardware (Standalone Book) (MindTap Course List)
Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)
Welding: Principles and Applications (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)