Primary Key:
A primary key in a
Example:
- 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:
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.
Example:
- 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.
Many to One relationship:
When more than one record in a database table is associated with only one record in another table, the relationship between the two tables is referred as many to one relationship. It is also represented as M: 1 relationship.
One to Many relationships:
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 relationships. It is also represented as1: M relationship. This is the opposite of many to one relationship.
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.
Trending nowThis is a popular solution!
Chapter 3 Solutions
Database Systems: Design, Implementation, & Management
- Modify the CHARTER table to add the attributes shown in the following table. TABLE P8.37 ATTRIBUTES AND VALUES FOR PROBLEM 37 ATTRIBUTE NAME ATTRIBUTE DESCRIPTION ATTRIBUTE TYPE CHAR_WAIT_CHG Waiting charge for each model (copied from the MODEL table) Numeric CHAR_FLT_CHG_HR Flight charge per mile for each model (copied from the MODEL table using the MOD_CHG_MILE attribute) Numeric CHAR_FLT_CHG Flight charge (calculated by CHAR_HOURS_FLOWN CHAR_FLT_CHG_HR) Numeric CHAR_TAX_CHG CHAR_FLT_CHG tax rate (8%) Numeric CHAR_TOT_CHG CHAR_FLT_CHG + CHAR_TAX_CHG Numeric CHAR_PYMT Amount paid by customer Numeric CHAR_BALANCE Balance remaining after payment Numericarrow_forwardCreate a table named REP_CONTRACTS containing the columns listed in the following chart A composite PRIMARY KEY constraint including the Rep_ID, Store_ID, and Quarter columns should be assigned. In addition, FOREIGN KEY constraints should be assigned to both the Rep_ID and Store_ID columns.arrow_forwardSelect the best answer from the given choices: Using the company schema, when creating the "works_on" table, the primary key should be specified as All of the answers are correct primary key (essn, pno) primary key (essn), primary key(pno) primary key (essn) and primary key(pno)arrow_forward
- Based on the ERD below, display all columns in the JOB table for those job descriptions that have both analysts and engineers within the description name. (Hint: You will use a “Like” phrase.)arrow_forwardplease use the picture to answer the following question Normalize below user view to the third normal form. Show all steps (UNF, 1NF, Dependencies, 2NF, 3NF).arrow_forwardList the name of employee who is working on a project with the budget that is below this project's divisional average project budget (use correlated subquery).arrow_forward
- Select all managers whose firstname starts with letter M and department they lead have less than 10 employees. Present manager and employee count in the result set. Order result set by employee count in descending order.arrow_forwardNormalize the following form into UNF 1NF, 2NF and 3NF. Show primary keys and foreign keys for all the normalized tables (from 3NF). Employee Task Record Form EmployeelD : 587 Employee Name: Smith Department ID: D1 DeparmentName : IT Task ID Task Name Duration Supervisor ID | Supervisor Name Emp_TaskJoin_Date Designing Drawing Reporting T1 70hrs S1 Khalfan 12/12/2019 T2 56hrs S2 Fatma 01/10/2020 T3 60hrs S3 Haitham 11/11/2020arrow_forwardPlease design a Task durations and a Dependencies table, and also calculate the Task durations and the Dependencies using the image below:arrow_forward
- All entity names, relationship names, and attribute definitions must be correct.arrow_forwardPlease answer my questionsarrow_forwardGarden Glory is a partnership that provides gardening and yard maintenance services to individuals and organizations. Garden Glory is owned by two partners. They employ two office administrators and a number of full- and part-time gardeners. Garden Glory will provide one-time garden services, but it specializes in ongoing service and maintenance. Many of its customers have multiple buildings, apartments, and rental houses that require gardening and lawn maintenance services. Create a sample list of owners and properties. Your list will be similar in structure to that in Figure 1-34 g, but it will concern owners and properties rather than owners and pets. Your list should include, at a minimum, owner name, phone, and billing address, as well as property name, type, and address. B. Describe modification problems that are likely to occur if Garden Glory attempts to maintain the list in a spreadsheet. C. Split the list into tables such that each has only one theme. Create appropriate…arrow_forward
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L