Database Systems: Design, Implementation, & Management
Database Systems: Design, Implementation, & Management
12th Edition
ISBN: 9781305627482
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
Question
Book Icon
Chapter 3, Problem 6P
Program Plan Intro

Primary Key:

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.

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.

RELATIONAL DIAGRAM:

Relational Diagram is also known as Entity Relational 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. It describes how data is related to each other.

Given database tables:

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

Table Name: REGION

REGION_CODE REGION_DESCRIPT
1 EAST
2 WEST

Blurred answer
Students have asked these similar questions
For table EP, the attribute is a foreign key referencing target table For table EP, the attribute is a foreign key referencing target table For table ER the attribute is a foreign key referencing target table For table ER the attribute is a foreign key referencing target table
Implement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the diagram below   The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply these…
Please may you answer the following questions. Create a Venn diagram with any topics of your choice and answer the following Q1: SQL Set Operation UNION: Choose any two or more of the data sets in your Venn diagram. Which elements would be included in the union of those data sets? Q2: SQL Set Operation INTERSECT: How would you describe one segment of your Venn diagram that represents the intersection of at least three of your data sets? Q3: SQL Set Operation EXCEPT: Choose any two or more of the data sets in your Venn diagram. Find an outlier element. Describe what excluding this outlier element using except logic means for your data sets. Q4: SQL Join Operation - INNER: Using all of the data sets in your Venn diagram, which segment represents the results of an inner join? If this does not apply to your specific Venn diagram, explain why not. Q5: SQL Join Operation - LEFT: Using any two of the data sets in your Venn diagram, how would you describe the results of a left join? Q6:…

Chapter 3 Solutions

Database Systems: Design, Implementation, & Management

Ch. 3 - Prob. 11RQCh. 3 - Prob. 12RQCh. 3 - Use Figure Q3.13 to answer Questions 1317. FIGURE...Ch. 3 - Create the table that results from applying a...Ch. 3 - Write the relational algebra formula to apply an...Ch. 3 - Create the table that results from applying an...Ch. 3 - Using the tables in Figure Q3.13, create the table...Ch. 3 - Prob. 18RQCh. 3 - Prob. 19RQCh. 3 - Prob. 20RQCh. 3 - Identify and describe the components of the table...Ch. 3 - Identify the primary keys. FIGURE Q3.22 THE...Ch. 3 - Identify the foreign keys. FIGURE Q3.22 THE...Ch. 3 - Create the ERM. FIGURE Q3.22 THE CH03_THEATER...Ch. 3 - Create the relational diagram to show the...Ch. 3 - Prob. 26RQCh. 3 - What would be the conceptual view of the INDEX...Ch. 3 - Prob. 1PCh. 3 - Prob. 2PCh. 3 - Do the tables exhibit referential integrity?...Ch. 3 - Describe the type(s) of relationship(s) between...Ch. 3 - Prob. 5PCh. 3 - Prob. 6PCh. 3 - Prob. 7PCh. 3 - Prob. 8PCh. 3 - Create the relational diagram to show the...Ch. 3 - Prob. 10PCh. 3 - Prob. 11PCh. 3 - Create the relational diagram to show the...Ch. 3 - Prob. 13PCh. 3 - Do the tables exhibit referential integrity?...Ch. 3 - Prob. 15PCh. 3 - Prob. 16PCh. 3 - For each table, identify the primary key and the...Ch. 3 - Prob. 18PCh. 3 - Do the tables exhibit referential integrity?...Ch. 3 - Identify the TRUCK tables candidate key(s). FIGURE...Ch. 3 - For each table, identify a superkey and a...Ch. 3 - Prob. 22PCh. 3 - Prob. 23PCh. 3 - Prob. 24PCh. 3 - Create the ERD. (Hint: Look at the table contents....Ch. 3 - Prob. 26PCh. 3 - Prob. 27PCh. 3 - Prob. 28PCh. 3 - Create the table that would result from applying...Ch. 3 - Create the table that would result from applying...Ch. 3 - Create the table that would result from applying a...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning