SlideShare a Scribd company logo
1 of 26
ECET 450: Laboratory 2
Part B:
Purpose:
This laboratory provides practice in the creation of realistic
tables and their relationships using Oracle SQL*Plus and
introduces writing SQL*Plus script files. This laboratory
exercise creates a relatively simple invoice system using SQL
statements. This DB schema is used throughout the next several
weeks of laboratory exercises. The final product is an SQL
script that makes it possible to initially create and re-create, if
need be, the DB schema in order to do to the later laboratory
exercises.
Procedure:
Using your assigned user name, password, and host string, log
in to Oracle SQL*Plus. Record your dialog with a spool file.
Following the four requirements below, create the 5 tables
shown later in this laboratory exercise, and enter all data as
shown. Be sure to record your interactions with SQL*Plus
using the spool command.
1. Use table names, attribute names, and data exactly as shown.
The one exception is that you will omit the dollar sign and
comma separators in the money amounts. Accurately enter the
data as you will need these tables in future laboratory
assignments.
2. Save all of your commands in a single script file for printing
and submission. This file should each contain a minimum of
your name and the date in comments at the beginning of the file,
and any other comments you feel add to the understanding of
the script file. Copy and edit your spool file to create the
load_tablesXXX.sql file where XXX are your initials. The only
items that should be in this load_tablesXXX.sql file are your
comments and the SQL statements that drop tables, create
tables, insert data values, and display table. Be sure to remove
all incorrect commands and the Oracle responses to the correct
commands from the file. Save this file for the future in case
you have to rebuild these tables. Be sure to include a printout
of this file in your report.
3. The second submission requirement is a printout of each of
the 5 tables completely loaded with the specified data. Use the
SET LINESIZE command to avoid line wrap around of your
table data. Print your list file in landscape mode.
4. All primary key and foreign key constraints should be named
according to the method presented in the classroom. If you
have any questions about which attributes are primary and/or
foreign keys, please ask about them.
5. The ultimate test is the execution of this SQL script file in
the following form: @
<path_name>/load_tablesXXX.sql
<First Page of tables>
REP Table
REP_ID
REP_LNAME
REP_FNAME
REP_STREET
REP_CITY
REP_STATE
REP_ZIP
REP_COMM
REP_RATE
223
Roma
Theresa
735 First
Leonard
GA
25742
$21,756.50
0.06
237
Miller
Fred
643 High
Sheldon
GA
25753
$38,612.00
0.08
268
Rodriguez
Miguel
2737 Tyler
Springfield
GA
25758
$19,774.00
0.06
CUSTOMER Table
CUST_ID
CUST_NAME
CUST_STREET
CUST_CITY
CUST_STATE
CUST_ZIP
CUST_BALANCE
CUST_LIMIT
REP_ID
1159
Charles Appliance and Sport
3948 Brown
Leonard
GA
25742
$5,560.00
$7,500.00
223
1193
Streaming Direct
4938 Maple
Grove
GA
25721
$210.40
$10,000.00
237
1367
Hollister’s
493 Oakwood
Farmerville
GA
25546
$6896.00
$7,500.00
268
1419
Everything Sports Shop
2939 Cardinal
Crystal
GA
25503
$5,396.36
$5,000.00
237
1462
Bargain House
4930 Main
Grove
GA
25721
$4,523.00
$10,000.00
268
1524
Jackson’s
946 Second
Leonard
GA
25742
$13,817.00
$15,000.00
223
1619
Murray’s Department Store
483 Cambridge
Sheldon
GA
25753
$2,217.00
$10,000.00
268
1687
Lawrence Sport and Appliance
393 Jefferson
Lafayette
GA
25752
$3,962.00
$5,000.00
237
1725
Dustin’s All Seasons
171 Washington
Sheldon
GA
25753
$359.00
$7,500.00
237
1842
Four Seasons Store
19 Front
Grove
GA
25721
$8,113.00
$7,500.00
223
1873
Suburban Appliance
128 High
Springfield
GA
25758
$1257.50
$5,000.00
268
PRODUCT Table
PROD_ID
PROD_DESC
PROD_QUANTITY
PROD_TYPE
PROD_WAREHOUSE
PROD_PRICE
BT105
Blender
52
HW
A
$24.95
BZ117
Exercise Bicycle
47
SG
C
$283.95
CE163
Convection Oven
28
AP
B
$186.00
DM182
Electric Screwdriver
23
HW
A
$49.95
DS104
Electric Range
6
AP
C
$395.00
DW111
Clothes Washer
14
AP
A
$399.99
FP132
Plasma Television
15
HW
B
$999.95
KM173
Clothes Dryer
16
AP
B
$349.95
KW114
Dishwasher
7
AP
A
$435.00
KG130
Home Workout Center
5
SG
C
$1390.00
RD147
HD Radio
7
HW
B
$280.00
INVOICE Table
INVOICE_NUM
INVOICE_DATE
CUST_ID
42419
09/10/2007
1159
42420
09/10/2007
1367
42433
09/12/2007
1419
42434
09/12/2007
1193
42447
09/13/2007
1619
42449
09/13/2007
1159
42453
09/13/2007
1619
LINE Table
INVOICE_NUM
PROD_ID
LINE_NUM_ORDERED
LINE_PRICE
42419
BT105
9
$26.35
42420
DS104
2
$495.00
42420
DW111
1
$399.99
42433
KM173
3
$379.95
42434
KW114
2
$595.00
42447
BZ117
2
$794.95
42447
CE163
3
$199.95
42449
DS104
1
$495.00
42453
KG130
3
$1,290.00
CET 450 Laboratory 2 Page 1 of 5
ECET 450: Laboratory 2
Part A:
Purpose:
This exercise involves normalizing a small part of a DB. The
steps to complete this exercise include getting the data items
into 1NF, 2NF, and 3NF. The final step is to generate the ERD
for the table or tables that are in the dependency diagram in
3NF.
Discussion:
Some small business wants to keep track of office furniture,
computers, printers, etc. A sample of the ITEM records is
shown below:
ATTRIBUTE NAME
SAMPLE VALUE
SAMPLE VALUE
SAMPLE VALUE
ITEM_ID
D1342245
D1453356
D1365779
ITEM_DESCRIPTION
IQ Deskjet 683P
IQ Toner
DT Photocopier
ROOM_NUMBER
227
227
342
BLDG_CODE
SC
SC
ET
BLDG_NAME
Science
Science
Electronics Technology
BLDG_MANAGER
A. B. Jones
A. B. Jones
R. S. Smith
1. Draw the dependency diagram using the data in the table.
Make sure to label the transitive and partial dependencies.
2. Using the dependency diagram developed in step 1, create a
set of dependency diagrams that meet 3rd Normal Form
requirements. Rename attributes to meet the naming
conventions. Create new entities and attributes as necessary.
3. Draw the crow’s foot ERD with the VISIO drawing tool using
the results of step 2.
Part B:
Purpose:
This laboratory provides practice in the creation of realistic
tables and their relationships using Oracle SQL*Plus and
introduces writing SQL*Plus script files. This laboratory
exercise creates a relatively simple invoice system using SQL
statements. This DB schema is used throughout the next several
weeks of laboratory exercises. The final product is an SQL
script that makes it possible to initially create and re-create, if
need be, the DB schema in order to do to the later laboratory
exercises.
Procedure:
Using your assigned user name, password, and host string, log
in to Oracle SQL*Plus. Record your dialog with a spool file.
Following the four requirements below, create the 5 tables
shown later in this laboratory exercise, and enter all data as
shown. Be sure to record your interactions with SQL*Plus
using the spool command.
1. Use table names, attribute names, and data exactly as shown.
The one exception is that you will omit the dollar sign and
comma separators in the money amounts. Accurately enter the
data as you will need these tables in future laboratory
assignments.
2. Save all of your commands in a single script file for printing
and submission. This file should each contain a minimum of
your name and the date in comments at the beginning of the file,
and any other comments you feel add to the understanding of
the script file. Copy and edit your spool file to create the
load_tablesXXX.sql file where XXX are your initials. The only
items that should be in this load_tablesXXX.sql file are your
comments and the SQL statements that drop tables, create
tables, insert data values, and display table. Be sure to remove
all incorrect commands and the Oracle responses to the correct
commands from the file. Save this file for the future in case
you have to rebuild these tables. Be sure to include a printout
of this file in your report.
3. The second submission requirement is a printout of each of
the 5 tables completely loaded with the specified data. Use the
SET LINESIZE command to avoid line wrap around of your
table data. Print your list file in landscape mode.
4. All primary key and foreign key constraints should be named
according to the method presented in the classroom. If you
have any questions about which attributes are primary and/or
foreign keys, please ask about them.
5. The ultimate test is the execution of this SQL script file in
the following form: @
<path_name>/load_tablesXXX.sql
<First Page of tables>
REP Table
REP_ID
REP_LNAME
REP_FNAME
REP_STREET
REP_CITY
REP_STATE
REP_ZIP
REP_COMM
REP_RATE
223
Roma
Theresa
735 First
Leonard
GA
25742
$21,756.50
0.06
237
Miller
Fred
643 High
Sheldon
GA
25753
$38,612.00
0.08
268
Rodriguez
Miguel
2737 Tyler
Springfield
GA
25758
$19,774.00
0.06
CUSTOMER Table
CUST_ID
CUST_NAME
CUST_STREET
CUST_CITY
CUST_STATE
CUST_ZIP
CUST_BALANCE
CUST_LIMIT
REP_ID
1159
Charles Appliance and Sport
3948 Brown
Leonard
GA
25742
$5,560.00
$7,500.00
223
1193
Streaming Direct
4938 Maple
Grove
GA
25721
$210.40
$10,000.00
237
1367
Hollister’s
493 Oakwood
Farmerville
GA
25546
$6896.00
$7,500.00
268
1419
Everything Sports Shop
2939 Cardinal
Crystal
GA
25503
$5,396.36
$5,000.00
237
1462
Bargain House
4930 Main
Grove
GA
25721
$4,523.00
$10,000.00
268
1524
Jackson’s
946 Second
Leonard
GA
25742
$13,817.00
$15,000.00
223
1619
Murray’s Department Store
483 Cambridge
Sheldon
GA
25753
$2,217.00
$10,000.00
268
1687
Lawrence Sport and Appliance
393 Jefferson
Lafayette
GA
25752
$3,962.00
$5,000.00
237
1725
Dustin’s All Seasons
171 Washington
Sheldon
GA
25753
$359.00
$7,500.00
237
1842
Four Seasons Store
19 Front
Grove
GA
25721
$8,113.00
$7,500.00
223
1873
Suburban Appliance
128 High
Springfield
GA
25758
$1257.50
$5,000.00
268
PRODUCT Table
PROD_ID
PROD_DESC
PROD_QUANTITY
PROD_TYPE
PROD_WAREHOUSE
PROD_PRICE
BT105
Blender
52
HW
A
$24.95
BZ117
Exercise Bicycle
47
SG
C
$283.95
CE163
Convection Oven
28
AP
B
$186.00
DM182
Electric Screwdriver
23
HW
A
$49.95
DS104
Electric Range
6
AP
C
$395.00
DW111
Clothes Washer
14
AP
A
$399.99
FP132
Plasma Television
15
HW
B
$999.95
KM173
Clothes Dryer
16
AP
B
$349.95
KW114
Dishwasher
7
AP
A
$435.00
KG130
Home Workout Center
5
SG
C
$1390.00
RD147
HD Radio
7
HW
B
$280.00
INVOICE Table
INVOICE_NUM
INVOICE_DATE
CUST_ID
42419
09/10/2007
1159
42420
09/10/2007
1367
42433
09/12/2007
1419
42434
09/12/2007
1193
42447
09/13/2007
1619
42449
09/13/2007
1159
42453
09/13/2007
1619
LINE Table
INVOICE_NUM
PROD_ID
LINE_NUM_ORDERED
LINE_PRICE
42419
BT105
9
$26.35
42420
DS104
2
$495.00
42420
DW111
1
$399.99
42433
KM173
3
$379.95
42434
KW114
2
$595.00
42447
BZ117
2
$794.95
42447
CE163
3
$199.95
42449
DS104
1
$495.00
42453
KG130
3
$1,290.00
CET 450 Laboratory 2 Page 1 of 5
ECET 450: Laboratory 1
Part A:
Purpose:
This laboratory exercise introduces the SQL language using
Oracle’s SQL*Plus command-line interface. In particular, the
student executes and edits SQL commands in the command line
interface to create and populate a small table.
Procedure:
1. Following the specified directions, and using your assigned
user name, password, and host string, log in to SQL*Plus.
2. Change your password to something you will remember.
Type the following at the SQL> prompt ALTER USER
user_name IDENTIFIED BY new_password;
3. In order to do this laboratory exercise, it is necessary for you
to save all your command-line inputs and Oracle’s responses.
At the SQL> prompt the general form of the spool command is
spool p:<path_name>/<list_file_name>. For example, the
professor might use the following command
spoolf:/ecet450/lab01a/lab01a.lst. Be sure to create all the
folders in the path first.
4. Use the CREATE TABLE and INSERT INTO commands to
create the EMPLOYEE table shown on the next page. Use the
decimal data type for numeric attributes. Use the edit
commands as needed to fix any errors along the way.
5. When you are done, use the SELECT statement to display
your finished table.
6. At the SQL> prompt enter the spool off command to
terminate collection of your dialog. Your dialog is not placed
into your list file until you execute this command. If you exit
from SQL*Plus before executing the spool off command, your
dialog will be lost.
7. Type EXIT to terminate SQL*Plus.
8. Print your list file, be sure to write your name on it, and
submit it at the time and in the manner specified by your
instructor.
EMPLOYEE
EMP_ID
EMP_LNAME
EMP_DEP
EMP_HIRE_DATE
EMP_PAY
321
Lincoln
2
12-JAN-05
15.45
324
Filmore
1
11-FEB-06
12.75
327
Johnson
3
04-MAR-07
10.37
Notes on Attribute Definitions:
EMP_ID is the Primary Key and is a fixed character string.
EMP_LNAME is a variable length character string no larger
than 16 characters.
EMP_DEP is a small decimal representing the number of
dependents for tax purposes.
EMP_HIRE_DATE is the employee’s hire date.
EMP_PAY is the employee’s hourly rate that a 5, 2 format
should accommodate.
Part B:
Purpose:
This laboratory exercise introduces the concept of the Entity
Relationship Diagram (ERD). The work should be done using
the MS Visio tool using a crow’s foot ERD. The finished ERD
should not contain a many-to-many relationship. Note that this
exercise is concerned with only a small part of a larger DB.
Discussion:
A college wants to add extracurricular activities to its DB
containing student data. The student table contains the student's
identifier, his/her name, his/her address, his/her primary
telephone number, and his/her birth date. The new activity
table contains data about the college's recognized
extracurricular activities including the activity's name, the name
of the activity’s advisor, and the advisor’s office location. The
college wants to also track the number of years that a specific
student participates in a specific extracurricular activity.
Obviously more than one student must participate in an
extracurricular activity in order for the college to recognize the
activity. Also a specific student may participate in zero, one, or
several extracurricular activities. As a result, the student table
and the activity table have a many-to-many relationship. In
addition a specific student may have participated in one
activity, e.g. IEEE student chapter, for three years and in
another activity, e.g. TAP honorary, starting this year.
Using the MS Visio drawing tool, draw a crow’s foot ERD that
describes the Student table, the Activity table, any other needed
tables, and the relationships among these tables. Be sure to
include the following items in your diagram:
1. Update all attribute names so that they partially or
completely contain the name of the table in which they reside.
2. Identify the attribute or the group of attributes that is the
primary key of each table.
3. Modify your ERD so that it does not include any many-to-
many (M:N) relationships.
4. Indicate the connectivity of each relationship, i.e. 1:1, 1:M,
and M:N, using the correct crow’s foot symbols.
ECET 450Laboratory 1 Page 3 of 3

More Related Content

Similar to ECET 450 Laboratory 2Part BPurposeThis laborato.docx

Similar to ECET 450 Laboratory 2Part BPurposeThis laborato.docx (20)

DBMS LAB FILE1 task 1 , task 2, task3 and many more.pdf
DBMS LAB FILE1 task 1 , task 2, task3 and many more.pdfDBMS LAB FILE1 task 1 , task 2, task3 and many more.pdf
DBMS LAB FILE1 task 1 , task 2, task3 and many more.pdf
 
Module 3
Module 3Module 3
Module 3
 
Sq lite
Sq liteSq lite
Sq lite
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
LECTURE NOTES.pdf
LECTURE NOTES.pdfLECTURE NOTES.pdf
LECTURE NOTES.pdf
 
LECTURE NOTES.pdf
LECTURE NOTES.pdfLECTURE NOTES.pdf
LECTURE NOTES.pdf
 
Oracle notes
Oracle notesOracle notes
Oracle notes
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
 
Sql project ..
Sql project ..Sql project ..
Sql project ..
 
SQL
SQLSQL
SQL
 
SQL
SQLSQL
SQL
 
SQL Tutorial
SQL TutorialSQL Tutorial
SQL Tutorial
 
Fdms 1st cycle exp.pdf
Fdms 1st cycle exp.pdfFdms 1st cycle exp.pdf
Fdms 1st cycle exp.pdf
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 

More from jack60216

Anorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docxAnorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docxjack60216
 
Annotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docxAnnotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docxjack60216
 
Annual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docxAnnual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docxjack60216
 
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docxAnnotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docxjack60216
 
Annotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docxAnnotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docxjack60216
 
Annotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docxAnnotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docxjack60216
 
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docxAnalyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docxjack60216
 
Andy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docxAndy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docxjack60216
 
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography  Althaus, F. U.S. Maternal Morta.docxAnnotated Bibliography  Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docxjack60216
 
Ann, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docxAnn, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docxjack60216
 
Andrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docxAndrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docxjack60216
 
and emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docxand emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docxjack60216
 
analyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docxanalyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docxjack60216
 
Analyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docxAnalyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docxjack60216
 
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docxAnalyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docxjack60216
 
Analytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docxAnalytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docxjack60216
 
Analyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docxAnalyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docxjack60216
 
Analyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docxAnalyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docxjack60216
 
Analyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docxAnalyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docxjack60216
 
Analyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docxAnalyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docxjack60216
 

More from jack60216 (20)

Anorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docxAnorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docx
 
Annotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docxAnnotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docx
 
Annual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docxAnnual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docx
 
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docxAnnotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
 
Annotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docxAnnotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docx
 
Annotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docxAnnotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docx
 
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docxAnalyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
 
Andy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docxAndy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docx
 
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography  Althaus, F. U.S. Maternal Morta.docxAnnotated Bibliography  Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docx
 
Ann, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docxAnn, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docx
 
Andrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docxAndrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docx
 
and emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docxand emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docx
 
analyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docxanalyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docx
 
Analyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docxAnalyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docx
 
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docxAnalyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
 
Analytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docxAnalytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docx
 
Analyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docxAnalyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docx
 
Analyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docxAnalyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docx
 
Analyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docxAnalyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docx
 
Analyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docxAnalyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docx
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 

Recently uploaded (20)

Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 

ECET 450 Laboratory 2Part BPurposeThis laborato.docx

  • 1. ECET 450: Laboratory 2 Part B: Purpose: This laboratory provides practice in the creation of realistic tables and their relationships using Oracle SQL*Plus and introduces writing SQL*Plus script files. This laboratory exercise creates a relatively simple invoice system using SQL statements. This DB schema is used throughout the next several weeks of laboratory exercises. The final product is an SQL script that makes it possible to initially create and re-create, if need be, the DB schema in order to do to the later laboratory exercises. Procedure: Using your assigned user name, password, and host string, log in to Oracle SQL*Plus. Record your dialog with a spool file. Following the four requirements below, create the 5 tables shown later in this laboratory exercise, and enter all data as shown. Be sure to record your interactions with SQL*Plus using the spool command. 1. Use table names, attribute names, and data exactly as shown. The one exception is that you will omit the dollar sign and comma separators in the money amounts. Accurately enter the data as you will need these tables in future laboratory assignments. 2. Save all of your commands in a single script file for printing and submission. This file should each contain a minimum of
  • 2. your name and the date in comments at the beginning of the file, and any other comments you feel add to the understanding of the script file. Copy and edit your spool file to create the load_tablesXXX.sql file where XXX are your initials. The only items that should be in this load_tablesXXX.sql file are your comments and the SQL statements that drop tables, create tables, insert data values, and display table. Be sure to remove all incorrect commands and the Oracle responses to the correct commands from the file. Save this file for the future in case you have to rebuild these tables. Be sure to include a printout of this file in your report. 3. The second submission requirement is a printout of each of the 5 tables completely loaded with the specified data. Use the SET LINESIZE command to avoid line wrap around of your table data. Print your list file in landscape mode. 4. All primary key and foreign key constraints should be named according to the method presented in the classroom. If you have any questions about which attributes are primary and/or foreign keys, please ask about them. 5. The ultimate test is the execution of this SQL script file in the following form: @ <path_name>/load_tablesXXX.sql <First Page of tables> REP Table REP_ID REP_LNAME REP_FNAME REP_STREET REP_CITY REP_STATE REP_ZIP REP_COMM
  • 4. CUST_CITY CUST_STATE CUST_ZIP CUST_BALANCE CUST_LIMIT REP_ID 1159 Charles Appliance and Sport 3948 Brown Leonard GA 25742 $5,560.00 $7,500.00 223 1193 Streaming Direct 4938 Maple Grove GA 25721 $210.40 $10,000.00 237 1367 Hollister’s 493 Oakwood Farmerville GA 25546 $6896.00 $7,500.00 268 1419 Everything Sports Shop 2939 Cardinal
  • 5. Crystal GA 25503 $5,396.36 $5,000.00 237 1462 Bargain House 4930 Main Grove GA 25721 $4,523.00 $10,000.00 268 1524 Jackson’s 946 Second Leonard GA 25742 $13,817.00 $15,000.00 223 1619 Murray’s Department Store 483 Cambridge Sheldon GA 25753 $2,217.00 $10,000.00 268 1687 Lawrence Sport and Appliance 393 Jefferson
  • 6. Lafayette GA 25752 $3,962.00 $5,000.00 237 1725 Dustin’s All Seasons 171 Washington Sheldon GA 25753 $359.00 $7,500.00 237 1842 Four Seasons Store 19 Front Grove GA 25721 $8,113.00 $7,500.00 223 1873 Suburban Appliance 128 High Springfield GA 25758 $1257.50 $5,000.00 268 PRODUCT Table
  • 8. DW111 Clothes Washer 14 AP A $399.99 FP132 Plasma Television 15 HW B $999.95 KM173 Clothes Dryer 16 AP B $349.95 KW114 Dishwasher 7 AP A $435.00 KG130 Home Workout Center 5 SG C $1390.00 RD147 HD Radio 7 HW B $280.00
  • 11. CET 450 Laboratory 2 Page 1 of 5 ECET 450: Laboratory 2 Part A: Purpose: This exercise involves normalizing a small part of a DB. The steps to complete this exercise include getting the data items into 1NF, 2NF, and 3NF. The final step is to generate the ERD for the table or tables that are in the dependency diagram in 3NF. Discussion: Some small business wants to keep track of office furniture, computers, printers, etc. A sample of the ITEM records is shown below: ATTRIBUTE NAME SAMPLE VALUE SAMPLE VALUE SAMPLE VALUE ITEM_ID D1342245 D1453356 D1365779 ITEM_DESCRIPTION IQ Deskjet 683P IQ Toner DT Photocopier ROOM_NUMBER 227 227
  • 12. 342 BLDG_CODE SC SC ET BLDG_NAME Science Science Electronics Technology BLDG_MANAGER A. B. Jones A. B. Jones R. S. Smith 1. Draw the dependency diagram using the data in the table. Make sure to label the transitive and partial dependencies. 2. Using the dependency diagram developed in step 1, create a set of dependency diagrams that meet 3rd Normal Form requirements. Rename attributes to meet the naming conventions. Create new entities and attributes as necessary. 3. Draw the crow’s foot ERD with the VISIO drawing tool using the results of step 2. Part B: Purpose: This laboratory provides practice in the creation of realistic tables and their relationships using Oracle SQL*Plus and introduces writing SQL*Plus script files. This laboratory exercise creates a relatively simple invoice system using SQL statements. This DB schema is used throughout the next several weeks of laboratory exercises. The final product is an SQL script that makes it possible to initially create and re-create, if need be, the DB schema in order to do to the later laboratory exercises.
  • 13. Procedure: Using your assigned user name, password, and host string, log in to Oracle SQL*Plus. Record your dialog with a spool file. Following the four requirements below, create the 5 tables shown later in this laboratory exercise, and enter all data as shown. Be sure to record your interactions with SQL*Plus using the spool command. 1. Use table names, attribute names, and data exactly as shown. The one exception is that you will omit the dollar sign and comma separators in the money amounts. Accurately enter the data as you will need these tables in future laboratory assignments. 2. Save all of your commands in a single script file for printing and submission. This file should each contain a minimum of your name and the date in comments at the beginning of the file, and any other comments you feel add to the understanding of the script file. Copy and edit your spool file to create the load_tablesXXX.sql file where XXX are your initials. The only items that should be in this load_tablesXXX.sql file are your comments and the SQL statements that drop tables, create tables, insert data values, and display table. Be sure to remove all incorrect commands and the Oracle responses to the correct commands from the file. Save this file for the future in case you have to rebuild these tables. Be sure to include a printout of this file in your report. 3. The second submission requirement is a printout of each of the 5 tables completely loaded with the specified data. Use the SET LINESIZE command to avoid line wrap around of your table data. Print your list file in landscape mode. 4. All primary key and foreign key constraints should be named according to the method presented in the classroom. If you
  • 14. have any questions about which attributes are primary and/or foreign keys, please ask about them. 5. The ultimate test is the execution of this SQL script file in the following form: @ <path_name>/load_tablesXXX.sql <First Page of tables> REP Table REP_ID REP_LNAME REP_FNAME REP_STREET REP_CITY REP_STATE REP_ZIP REP_COMM REP_RATE 223 Roma Theresa 735 First Leonard GA 25742 $21,756.50 0.06 237 Miller Fred 643 High Sheldon GA 25753 $38,612.00 0.08
  • 16. GA 25721 $210.40 $10,000.00 237 1367 Hollister’s 493 Oakwood Farmerville GA 25546 $6896.00 $7,500.00 268 1419 Everything Sports Shop 2939 Cardinal Crystal GA 25503 $5,396.36 $5,000.00 237 1462 Bargain House 4930 Main Grove GA 25721 $4,523.00 $10,000.00 268 1524 Jackson’s 946 Second Leonard
  • 17. GA 25742 $13,817.00 $15,000.00 223 1619 Murray’s Department Store 483 Cambridge Sheldon GA 25753 $2,217.00 $10,000.00 268 1687 Lawrence Sport and Appliance 393 Jefferson Lafayette GA 25752 $3,962.00 $5,000.00 237 1725 Dustin’s All Seasons 171 Washington Sheldon GA 25753 $359.00 $7,500.00 237 1842 Four Seasons Store 19 Front Grove
  • 18. GA 25721 $8,113.00 $7,500.00 223 1873 Suburban Appliance 128 High Springfield GA 25758 $1257.50 $5,000.00 268 PRODUCT Table PROD_ID PROD_DESC PROD_QUANTITY PROD_TYPE PROD_WAREHOUSE PROD_PRICE BT105 Blender 52 HW A $24.95 BZ117 Exercise Bicycle 47 SG C $283.95 CE163
  • 19. Convection Oven 28 AP B $186.00 DM182 Electric Screwdriver 23 HW A $49.95 DS104 Electric Range 6 AP C $395.00 DW111 Clothes Washer 14 AP A $399.99 FP132 Plasma Television 15 HW B $999.95 KM173 Clothes Dryer 16 AP B $349.95 KW114
  • 20. Dishwasher 7 AP A $435.00 KG130 Home Workout Center 5 SG C $1390.00 RD147 HD Radio 7 HW B $280.00 INVOICE Table INVOICE_NUM INVOICE_DATE CUST_ID 42419 09/10/2007 1159 42420 09/10/2007 1367 42433 09/12/2007 1419 42434 09/12/2007 1193 42447
  • 22. 42447 BZ117 2 $794.95 42447 CE163 3 $199.95 42449 DS104 1 $495.00 42453 KG130 3 $1,290.00 CET 450 Laboratory 2 Page 1 of 5 ECET 450: Laboratory 1 Part A: Purpose: This laboratory exercise introduces the SQL language using Oracle’s SQL*Plus command-line interface. In particular, the student executes and edits SQL commands in the command line interface to create and populate a small table. Procedure: 1. Following the specified directions, and using your assigned user name, password, and host string, log in to SQL*Plus.
  • 23. 2. Change your password to something you will remember. Type the following at the SQL> prompt ALTER USER user_name IDENTIFIED BY new_password; 3. In order to do this laboratory exercise, it is necessary for you to save all your command-line inputs and Oracle’s responses. At the SQL> prompt the general form of the spool command is spool p:<path_name>/<list_file_name>. For example, the professor might use the following command spoolf:/ecet450/lab01a/lab01a.lst. Be sure to create all the folders in the path first. 4. Use the CREATE TABLE and INSERT INTO commands to create the EMPLOYEE table shown on the next page. Use the decimal data type for numeric attributes. Use the edit commands as needed to fix any errors along the way. 5. When you are done, use the SELECT statement to display your finished table. 6. At the SQL> prompt enter the spool off command to terminate collection of your dialog. Your dialog is not placed into your list file until you execute this command. If you exit from SQL*Plus before executing the spool off command, your dialog will be lost. 7. Type EXIT to terminate SQL*Plus. 8. Print your list file, be sure to write your name on it, and submit it at the time and in the manner specified by your instructor.
  • 24. EMPLOYEE EMP_ID EMP_LNAME EMP_DEP EMP_HIRE_DATE EMP_PAY 321 Lincoln 2 12-JAN-05 15.45 324 Filmore 1 11-FEB-06 12.75 327 Johnson 3 04-MAR-07 10.37 Notes on Attribute Definitions: EMP_ID is the Primary Key and is a fixed character string. EMP_LNAME is a variable length character string no larger than 16 characters. EMP_DEP is a small decimal representing the number of dependents for tax purposes. EMP_HIRE_DATE is the employee’s hire date. EMP_PAY is the employee’s hourly rate that a 5, 2 format should accommodate. Part B: Purpose:
  • 25. This laboratory exercise introduces the concept of the Entity Relationship Diagram (ERD). The work should be done using the MS Visio tool using a crow’s foot ERD. The finished ERD should not contain a many-to-many relationship. Note that this exercise is concerned with only a small part of a larger DB. Discussion: A college wants to add extracurricular activities to its DB containing student data. The student table contains the student's identifier, his/her name, his/her address, his/her primary telephone number, and his/her birth date. The new activity table contains data about the college's recognized extracurricular activities including the activity's name, the name of the activity’s advisor, and the advisor’s office location. The college wants to also track the number of years that a specific student participates in a specific extracurricular activity. Obviously more than one student must participate in an extracurricular activity in order for the college to recognize the activity. Also a specific student may participate in zero, one, or several extracurricular activities. As a result, the student table and the activity table have a many-to-many relationship. In addition a specific student may have participated in one activity, e.g. IEEE student chapter, for three years and in another activity, e.g. TAP honorary, starting this year. Using the MS Visio drawing tool, draw a crow’s foot ERD that describes the Student table, the Activity table, any other needed tables, and the relationships among these tables. Be sure to include the following items in your diagram: 1. Update all attribute names so that they partially or completely contain the name of the table in which they reside. 2. Identify the attribute or the group of attributes that is the primary key of each table. 3. Modify your ERD so that it does not include any many-to- many (M:N) relationships. 4. Indicate the connectivity of each relationship, i.e. 1:1, 1:M, and M:N, using the correct crow’s foot symbols.
  • 26. ECET 450Laboratory 1 Page 3 of 3