Concept explainers
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 one record in a database table is associated with one or more records 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 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.
One-to-One relationship:
When one record in a database table is associated with one and only one record in another table, the relationship between the two tables is referred as one-to-one relationship. It is also represented as1: 1 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
EMP_CODE | EMP_TITLE | EMP_LNAME | EMP_FNAME | EMP_INITIAL | EMP_DOB | STORE_CODE |
1 | Mr. | Williamson | John | W | 21-May-84 | 3 |
2 | Ms. | Ratula | Nancy | 09-Feb-89 | 2 | |
3 | Ms. | Greenboro | Lottie | R | 02-Oct-81 | 4 |
4 | Mrs. | Rumpersfro | Jennie | S | 01-Jun-71 | 5 |
5 | Mr. | Smith | Robert | L | 23-Nov-59 | 3 |
6 | Mr. | Renselear | Cary | A | 25-Dec-85 | 1 |
7 | Mr. | Ogallo | Roberto | S | 31-Jul-82 | 3 |
8 | Ms. | Johnson | Elizabeth | I | 10-Sep-88 | 1 |
9 | Mr. | Eindsmar | Jack | W | 19-Apr-55 | 2 |
10 | Mrs. | Jones | Rose | R | 06-Mar-66 | 4 |
11 | Mr. | Broderick | Tom | 21-Oct-72 | 3 | |
12 | Mr. | Washington | Alan | Y | 08-Sept-74 | 2 |
13 | Mr. | Smith | Peter | N | 25-Aug-64 | 3 |
14 | Ms. | Smith | Sherry | H | 25-May-66 | 4 |
15 | Mr. | Olenko | Howard | U | 24-May-64 | 5 |
16 | Mr. | Archialo | Barry | V | 03-Sep-60 | 5 |
17 | Ms. | Grimaldo | Jeanine | K | 12-Nov-70 | 4 |
18 | Mr. | Rosenburg | Andrew | D | 24-Jan-71 | 4 |
19 | Mr. | Rosten | Peter | F | 03-Oct-68 | 4 |
20 | Mr. | Mckee | Robert | S | 06-Mar-70 | 1 |
21 | Ms. | Baumann | Jennifer | A | 11-Dec-74 | 3 |
Table Name: STORE
STORE_CODE | STORE_NAME | STORE_YTD_SALES | REGION_CODE | EMP_CODE |
1 | Access Junction | 1003455.76 | 2 | 8 |
2 | Database Corner | 1421987.39 | 2 | 12 |
3 | Tuple Charge | 986783.22 | 1 | 7 |
4 | Attribute Alley | 944568.56 | 2 | 3 |
5 | Primary Key Point | 2930098.45 | 1 | 15 |
Trending nowThis is a popular solution!
Chapter 3 Solutions
Database Systems: Design, Implementation, & Management
- The ability to combine two or more tables through common data attributes to form a new table with only the unique data attributes is called _______________.arrow_forwardDataBase case study: read this case study and Make Normalize table on either on excel or in a paper and insert records that is mentioned on the picture. also then Normalize table to 3rd nf. Case Study: Delhi Mart is a super Store located at Mahavir Enclave, New Delhi, India. Delhi Mart has many types of products that are related to specific Category. Delhi Mart are avail many different customers to sell their products daily. Every Category is managed by a particular manager. Customer order their selected product in terms of qty and avail selected discount on the product. Delhi Mart also have staff that manage different departments in the mall. Every Customer is concern with a particular staff to resolve their queries. Every Manager is responsible to maintain the stock if the stock will out they contact their selected supplier for buying products. So,The entities are from the data is ProductsCategoryStaffCustomerSupplierarrow_forwardkeep getting a ambiguous error for this question below question- Join the payment_info and payments table together based on PK/FK. Display the count of records for each payment type. use first; select payment_type, count(payment_info_id) from payment_info join payments where payments.payment_info_id = payment_info.payment_info_id Tables and colums are customer_product - id , ordered_amount , customer_id , product_id ,payment_id customers - customer_id , first_name , last_name , email , phoneNo , shipping_detail_id invoice - invoice_id , invoice_no , amount , invoice_date payment_info - payment_info_id , payment_type payments - payment_id , payment_info_id , invoice_id products - product_id , product_name , details , category , quantity shipping_details - shipping_detail_id , address , city , province thanksarrow_forward
- Aert dont submit AI generated answer. Identify and justify the nature of the relationship (1:1 or 1:m or m:n) Customers and Orders tables Shippers and Orders tablesarrow_forwardCreate Microsoft Access queries to answer the following: Total weight shipped by each product type How many employees have security clearance per warehouse location Hint: You may need to create multiple tablesarrow_forwardUsing any application of your choice, create an interactive presentation explaining the differences between various types of relationships between tables in an enterprise relationship diagram (ERD).arrow_forward
- Can sme one explain hot to normalize these tables into 2NF? Table Name: Arena This table is used to store arena name, team name, state and seating capacity details. Foreign key: Not present Unique Key : AreanaName Table Name: Athletic Brand This table is used to store Athletic Brand information. This table contains Brand Name, Most _sold _Item Team Name and Team Name Foreign key: TeamName Unique Key: BrandName Table Name: Coach This table is used to store Coach information. This table contains Coach Name, Salary, Years of Coaching and Team Name Foreign key: Team Name Unique Key: Not Present Table Name: Team This table is used to store Team information. This table contains Team Name, Brand Name, Years Established, Award, Rank Owner, Number of 1st Draft Pick and Number of all the stars Foreign key: brandName, Unique Key: Team Name Table Name: Player This table is used to store Player information. This table contains Player Name, Salary, Position, School, Major, Hometown, Assist Rebounds,…arrow_forwardCreate an ERD using Visio or any other tool for the following scenario. Your ERD should show all the tables, attributes for each table and identify all primary and foreign keys. A hair salon has many customers and many stylists - the first name, last name, and phone number need to be stored for customers and stylists. The hair salon offers many services - hair cutting, styling, coloring, permanents, etc. Each service has a cost and the estimated time. Customers schedule appointments with a stylist. The appointment can consist of one or more than one service - i.e. a person may want a hair cut and coloring. Some customers purchase products at their appointments. A product has a brand, description, category and price. Please show all work and the finished diagram. Thank you!arrow_forwardUsing normalisation principles, depict the relationship schema of the 3NF tables. State the respective primary keys.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 LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher: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