SlideShare a Scribd company logo
1 of 17
Deliverables:
1. You should submit your four SQL scripts satisfying each
steps in the project. Feel free to compress the files using
WinZip and save as YournameProject2.zip.
2. Submit in your WebTycho portfolio in the Project 2 area
before the due date. Please contact the instructor before the due
date if you have any questions or concerns.
I strongly suggest you also submit your spool files.
Project Grading Overview
In the grade book, the total number of points will be set to 100.
The project elements will be assessed as follows:
Attributes
Value
Insert Statements
25 points
SelectStatements
35 points
Update Statements
25 points
Delete Statements
15 points
Project Grading Rubric
Attribute
(0-12) Points
(12-20) Points
(21-25) Points
Points
Inserts
- Poor SQL insert statements minimally addressing the
functionality
- Poor design and formatting
- Commits not included
- Major integrity constraint violations present
- Good SQL insert statements addressing most functionality
- Statement has a good design but could be clearer or better
formatted
- Commits included
- Minor integrity constraint violations may be present
- Excellent, efficient SQL insert statements addressing all
functionality
- Statement is designed well, clear and neatly formatted
- Commits included
- No integrity constraint violations
Attribute
(0-17) Points
(18-27) Points
(28-35) Points
Points
Selects
- Poor SQL select statements minimally addressing the
functionality
- Poor design and formatting
- Multi-table joins are mostly incorrect
- Output display missing or of poor quality
- Good SQL select statements addressing most functionality
- Statement has a good design but could be clearer of better
formatted
- Multi-table joins are reasonable but may include some non-
standard syntax or inefficiencies.
- Good output display but could provide minor areas difficult to
follow
- Excellent, efficient SQL select statements addressing all
functionality
- Statement is designed well, clear and neatly formatted
- Multi-table joins are efficient using correct syntax
- Excellent clean and well-organized output display
Attribute
(0-12) Points
(12-20) Points
(21-25) Points
Points
Updates
- Poor SQL update statements minimally addressing the
functionality
- Poor design and formatting
- Commits not included
- Major integrity constraint violations present
- Good SQL update statements addressing most functionality
- Statement has a good design but could be clearer or better
formatted
- Commits included
- Minor integrity constraint violations may be present
- Excellent, efficient SQL update statements addressing all
functionality
- Statement is designed well, clear and neatly formatted
- Commits included
- No integrity constraint violations
Attribute
(0-7) Points
(8-11) Points
(12-15) Points
Points
Deletes
- Poor SQL delete statements minimally addressing the
functionality
- Poor design and formatting
- Commits not included
- Major integrity constraint violations present
- Good SQL delete statements addressing most functionality
- Statement has a good design but could be clearer or better
formatted
- Commits included
- Minor integrity constraint violations may be present
- Excellent, efficient SQL delete statements addressing all
functionality
- Statement is designed well, clear and neatly formatted
- Commits included
- No integrity constraint violations
Janelle Chpaman – Project 1 April 13, 2014
List of entities:
Actor Actor
Borrowing Rental History
Cast Actor in MovieTitle
Customer Customer
Discount Discount prices for certain movies or types of movies
Distributor Distributor of Movies
DistributorMovieType What movie types distributor provides
DVD Descendant of Movie format
Fee Late and damaged fees, failure to rewind fees and so on for
each Borrowing
Movie Video or DVD of Movie
MovieAward Academy Awards won (by the movie, the actors,
the actresses and/or the directors)
MovieAwardType Academy Award type
MovieTitle Name of Movie
MobieTitleType Movie classification
MovieType Types of Movie (suspense, horror, mystery, comedy,
etc.)
Video Descendant of Movie format
Relationships:
Actor Cast Actor takes part in many movie Casts.
Borrowing Fee When custmer Borrows a movie, one or more
Fees are connected with this action.
Borrowing Customer One Customer Borrows zero or more
movies (with assumption that customer can only chose to
register).
Borrowing Movie Movie can be Borrowed by one or more
customers.
Cast MovieTitle Each MovieTitle can play multiple Actors
(M:N relationship replaced by Cast entity).
Discount MovieTitle One MovieTitle can take part in several
(time limited) Discount offers.
Discount MovieType One MovieType can take part in several
(time limited) Discount offers.
Distributor Movie Each Distributor provides one or more
Movies.
Distributor DistributorMovieType Each Distributor provides
one ore more MovieTypes and each MovieType can be provided
by multiple
Distributors so this M:N relationship was replaced by the
DistributorMovieType entity.
Janelle Chpaman – Project 1 April 13, 2014
DistributorMovieType MovieType Each Distributor provides
one ore more MovieTypes and each MovieType can be provided
by more
Distributors so this M:N relationship was replaced by
DistributorMovieType entity
DVD Movie DVD is descendant of Movie.
Video Movie Video is descendant of Movie.
Movie MovieTitle Each MovieTitle exists on one or more media
types.
MovieAward MovieAwardType Movie Award is one of the
Movie Award Types.
MovieAward MovieTitle One MovieTitle can win zero or
multiple Awards.
MovieTitle MovieTitleType Each MovieTitle can be assigned to
multiple MovieTypes and multiple Movies of each MovieType
exists
so this M:N relationship was replaced by MovieTitleType
entity.
MovieTitleType MovieType Each MovieTitle can be assigned to
multiple MovieTypes and multiple Movies of each MovieType
exists
so this M:N relationship was replaced by MovieTitleType
entity.
Janelle Chpaman – Project 1 April 13, 2014
erd MomAndPop
Movie
DVD Video
MovieT itle
Distributor
MovieT ype
DistributorPrice
IdNumber
IdNumber
SerialNumber
Name
CatalogDescription
Customer
Borrowing
DateRented
DateReturned
FeeT ype
Fee
T oDate
Actor
CustomerPrice
Discount
Amount
DateFrom DateT o
RunningLength
Rating
YearReleased
Director
MovieAward
Name
Address
Phone
Email
Cast
DistributorMovieT ype
MovieT itleT ype
Amount
FirstName LastName
Street
City
ZIP
CustID
FirstName
LastName
Year
NameCodeFirstName LastName
Name
Code
Role
MovieAwardT ype
Id Name
Id
Id
1
0..*
0..*
1
1
0..*
1
1..*
1 0..*
1
0..*
1
0..*
1
1..*
1
1..*
1
1..*
0..*
1..
0..*
1
0..*
1
0..*
1
0..*1
Janelle Chpaman – Project 1 April 13, 2014
create table CUSTOMER
( CUST_ID bigint not null,
FIRST_NAME varchar(50) not null,
LAST_NAME varchar(50) not null,
STREET varchar(50),
CITY varchar(50) not null,
ZIP varchar(10),
EMAIL varchar(50),
PHONE varchar(20)
PRIMARY KEY (CUST_ID)
)
GO
create table DISTRIBUTOR
( CODE varchar(15) not null,
NAME varchar(50)
PRIMARY KEY (CODE)
)
GO
create table MOVIE_TYPE
( CODE char(5) not null,
NAME varchar(50)
PRIMARY KEY (CODE)
)
GO
create table ACTOR
( ACTOR_ID int not null,
FIRST_NAME varchar(50) not null,
LAST_NAME varchar(50) not null
PRIMARY KEY (ACTOR_ID)
)
GO
create table MOVIE_TITLE
( ID_NUMBER bigint not null,
NAME varchar(50) not null,
RATING smallint,
RUNNING_LENGTH smallint,
Janelle Chpaman – Project 1 April 13, 2014
CATALOG_DESCRIPTION text,
YEAR_RELEASED smallint
PRIMARY KEY (ID_NUMBER)
)
GO
create table MOVIE_TITLE_TYPE
( MOVIE_TITLE_ID bigint not null FOREIGN KEY
REFERENCES MOVIE_TITLE(ID_NUMBER),
MOVIE_TYPE_CODE char(5) not null FOREIGN KEY
REFERENCES MOVIE_TYPE(CODE),
PRIMARY KEY (MOVIE_TITLE_ID, MOVIE_TYPE_CODE)
)
GO
create table MOVIE
( ID_NUMBER bigint not null,
MEDIA_TYPE char(1) not null CHECK (MEDIA_TYPE in
('D', 'V')), -- D=DVD, V=Video
DISTRIBUTOR_PRICE numeric(5,2) not null,
SERIAL_NUMBER varchar(30) not null,
CUSTOMER_PRICE numeric(5,2) not null,
MOVIE_TITLE_ID bigint not null FOREIGN KEY
REFERENCES MOVIE_TITLE(ID_NUMBER)
PRIMARY KEY (ID_NUMBER)
)
GO
create table [CAST]
( ACTOR_ID int not null FOREIGN KEY REFERENCES
ACTOR(ACTOR_ID),
MOVIE_TITLE_ID bigint not null FOREIGN KEY
REFERENCES MOVIE_TITLE(ID_NUMBER),
[ROLE] varchar(100)
PRIMARY KEY (ACTOR_ID, MOVIE_TITLE_ID)
)
GO
create table MOVIE_AWARD_TYPE
( ID smallint not null,
NAME varchar(50) not null,
PRIMARY KEY (ID)
)
GO
create table MOVIE_AWARD
Janelle Chpaman – Project 1 April 13, 2014
( MOVIE_TITLE_ID bigint not null FOREIGN KEY
REFERENCES MOVIE_TITLE(ID_NUMBER),
[YEAR] smallint not null,
MOVIE_AWARD_TYPE_ID smallint not null FOREIGN KEY
REFERENCES MOVIE_AWARD_TYPE(ID)
PRIMARY KEY (MOVIE_TITLE_ID,
[YEAR],MOVIE_AWARD_TYPE_ID)
)
GO
create table DISCOUNT
( ID bigint not null,
MOVIE_TITLE_ID bigint null FOREIGN KEY REFERENCES
MOVIE_TITLE(ID_NUMBER),
MOVIE_TYPE_CODE char(5) FOREIGN KEY REFERENCES
MOVIE_TYPE(CODE),
DATE_FROM datetime not null,
DATE_TO datetime not null,
AMOUNT numeric(5,2)
PRIMARY KEY (ID)
)
GO
create table DISTRIBUTOR_MOVIE_TYPE
( DISTRIBUTOR_CODE varchar(15) not null FOREIGN KEY
REFERENCES DISTRIBUTOR(CODE),
MOVIE_TYPE_CODE char(5) not null FOREIGN KEY
REFERENCES MOVIE_TYPE(CODE),
DATE_FROM datetime not null,
DATE_TO datetime not null,
AMOUNT numeric(5,2)
PRIMARY KEY (DISTRIBUTOR_CODE,
MOVIE_TYPE_CODE)
)
GO
create table BORROWING
( ID bigint not null,
CUSTOMER_ID bigint not null FOREIGN KEY
REFERENCES CUSTOMER(CUST_ID),
MOVIE_ID bigint not null FOREIGN KEY REFERENCES
MOVIE(ID_NUMBER),
DATE_RENTED datetime not null,
TO_DATE datetime not null,
DATE_RETURNED datetime
PRIMARY KEY (ID)
)
GO
create table FEE
Janelle Chpaman – Project 1 April 13, 2014
( BORROWING_ID bigint not null FOREIGN KEY
REFERENCES BORROWING(ID),
FEE_TYPE char(1) CHECK (FEE_TYPE in ('L', 'D', 'F')), --
L=Late, D=Damage, F=Failure
FEE_DATE numeric(5,2) not null,
AMOUNT numeric(5,2) not null,
PRIMARY KEY (BORROWING_ID, FEE_TYPE, FEE_DATE)
)
GO

More Related Content

Similar to Deliverables1.      You should submit your four SQL scripts s.docx

Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...DataStax Academy
 
Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...
Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...
Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...DataStax Academy
 
Cassandra Day London 2015: Building Your First Application in Apache Cassandra
Cassandra Day London 2015: Building Your First Application in Apache CassandraCassandra Day London 2015: Building Your First Application in Apache Cassandra
Cassandra Day London 2015: Building Your First Application in Apache CassandraDataStax Academy
 
Business plan presentation_format
Business plan presentation_formatBusiness plan presentation_format
Business plan presentation_formatMohammad Nuruzzaman
 
Cassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat Videos
Cassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat VideosCassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat Videos
Cassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat VideosDataStax Academy
 
Business plan presentation_format
Business plan presentation_formatBusiness plan presentation_format
Business plan presentation_formatSudiarsa Imade
 
Design Processes and Systems in Craft
Design Processes and Systems in CraftDesign Processes and Systems in Craft
Design Processes and Systems in CraftCourtney Bradford
 
RSpec best practice - avoid using before and let
RSpec best practice - avoid using before and letRSpec best practice - avoid using before and let
RSpec best practice - avoid using before and letBruce Li
 
Project Team Powerpoint Presentation Slides
Project Team Powerpoint Presentation SlidesProject Team Powerpoint Presentation Slides
Project Team Powerpoint Presentation SlidesSlideTeam
 
Website UIUX Design Proposal Powerpoint Presentation Slides
Website UIUX Design Proposal Powerpoint Presentation SlidesWebsite UIUX Design Proposal Powerpoint Presentation Slides
Website UIUX Design Proposal Powerpoint Presentation SlidesSlideTeam
 
Crossroads of Asynchrony and Graceful Degradation
Crossroads of Asynchrony and Graceful DegradationCrossroads of Asynchrony and Graceful Degradation
Crossroads of Asynchrony and Graceful DegradationC4Media
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in indiaEdhole.com
 
IST365 - Project Deliverable #3Create the corresponding relation.docx
IST365 - Project Deliverable #3Create the corresponding relation.docxIST365 - Project Deliverable #3Create the corresponding relation.docx
IST365 - Project Deliverable #3Create the corresponding relation.docxpriestmanmable
 
Business plan presentation_format
Business plan presentation_formatBusiness plan presentation_format
Business plan presentation_formatAbu Saleh
 
Your product has Too. Many. Features. Now what?
Your product has Too. Many. Features. Now what?Your product has Too. Many. Features. Now what?
Your product has Too. Many. Features. Now what?Ceren Paydas
 
Video Advertisements Proposal PowerPoint Presentation Slides
Video Advertisements Proposal PowerPoint Presentation SlidesVideo Advertisements Proposal PowerPoint Presentation Slides
Video Advertisements Proposal PowerPoint Presentation SlidesSlideTeam
 
Proposal For Project Cost Breakdown PowerPoint Presentation Slides
Proposal For Project Cost Breakdown PowerPoint Presentation SlidesProposal For Project Cost Breakdown PowerPoint Presentation Slides
Proposal For Project Cost Breakdown PowerPoint Presentation SlidesSlideTeam
 
DevOps - Its just Agile done right
DevOps - Its just Agile done rightDevOps - Its just Agile done right
DevOps - Its just Agile done rightTomas Riha
 

Similar to Deliverables1.      You should submit your four SQL scripts s.docx (20)

Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
 
Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...
Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...
Cassandra Day Chicago 2015: Building Your First Application with Apache Cassa...
 
Cassandra Day London 2015: Building Your First Application in Apache Cassandra
Cassandra Day London 2015: Building Your First Application in Apache CassandraCassandra Day London 2015: Building Your First Application in Apache Cassandra
Cassandra Day London 2015: Building Your First Application in Apache Cassandra
 
Business plan presentation_format
Business plan presentation_formatBusiness plan presentation_format
Business plan presentation_format
 
Cassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat Videos
Cassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat VideosCassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat Videos
Cassandra Day Denver 2014: A Cassandra Data Model for Serving up Cat Videos
 
Business plan presentation_format
Business plan presentation_formatBusiness plan presentation_format
Business plan presentation_format
 
Design Processes and Systems in Craft
Design Processes and Systems in CraftDesign Processes and Systems in Craft
Design Processes and Systems in Craft
 
TMDb movie dataset by kaggle
TMDb movie dataset by kaggleTMDb movie dataset by kaggle
TMDb movie dataset by kaggle
 
Foresee your movie revenue
Foresee your movie revenueForesee your movie revenue
Foresee your movie revenue
 
RSpec best practice - avoid using before and let
RSpec best practice - avoid using before and letRSpec best practice - avoid using before and let
RSpec best practice - avoid using before and let
 
Project Team Powerpoint Presentation Slides
Project Team Powerpoint Presentation SlidesProject Team Powerpoint Presentation Slides
Project Team Powerpoint Presentation Slides
 
Website UIUX Design Proposal Powerpoint Presentation Slides
Website UIUX Design Proposal Powerpoint Presentation SlidesWebsite UIUX Design Proposal Powerpoint Presentation Slides
Website UIUX Design Proposal Powerpoint Presentation Slides
 
Crossroads of Asynchrony and Graceful Degradation
Crossroads of Asynchrony and Graceful DegradationCrossroads of Asynchrony and Graceful Degradation
Crossroads of Asynchrony and Graceful Degradation
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in india
 
IST365 - Project Deliverable #3Create the corresponding relation.docx
IST365 - Project Deliverable #3Create the corresponding relation.docxIST365 - Project Deliverable #3Create the corresponding relation.docx
IST365 - Project Deliverable #3Create the corresponding relation.docx
 
Business plan presentation_format
Business plan presentation_formatBusiness plan presentation_format
Business plan presentation_format
 
Your product has Too. Many. Features. Now what?
Your product has Too. Many. Features. Now what?Your product has Too. Many. Features. Now what?
Your product has Too. Many. Features. Now what?
 
Video Advertisements Proposal PowerPoint Presentation Slides
Video Advertisements Proposal PowerPoint Presentation SlidesVideo Advertisements Proposal PowerPoint Presentation Slides
Video Advertisements Proposal PowerPoint Presentation Slides
 
Proposal For Project Cost Breakdown PowerPoint Presentation Slides
Proposal For Project Cost Breakdown PowerPoint Presentation SlidesProposal For Project Cost Breakdown PowerPoint Presentation Slides
Proposal For Project Cost Breakdown PowerPoint Presentation Slides
 
DevOps - Its just Agile done right
DevOps - Its just Agile done rightDevOps - Its just Agile done right
DevOps - Its just Agile done right
 

More from theodorelove43763

Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docxExam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docxtheodorelove43763
 
Evolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docxEvolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docxtheodorelove43763
 
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docxexam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docxtheodorelove43763
 
Evolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docxEvolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docxtheodorelove43763
 
Evidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docxEvidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docxtheodorelove43763
 
Evidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docxEvidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docxtheodorelove43763
 
Evidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docxEvidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docxtheodorelove43763
 
Evidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docxEvidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docxtheodorelove43763
 
Evidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docxEvidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docxtheodorelove43763
 
Everyone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docxEveryone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docxtheodorelove43763
 
Even though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docxEven though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docxtheodorelove43763
 
Even though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docxEven though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docxtheodorelove43763
 
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docxEvaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docxtheodorelove43763
 
Evaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docxEvaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docxtheodorelove43763
 
Evaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docxEvaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docxtheodorelove43763
 
Evaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docxEvaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docxtheodorelove43763
 
Evaluating 19-Channel Z-score Neurofeedback Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback  Addressi.docxEvaluating 19-Channel Z-score Neurofeedback  Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback Addressi.docxtheodorelove43763
 
Evaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docxEvaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docxtheodorelove43763
 
Evaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docxEvaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docxtheodorelove43763
 
Evaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docxEvaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docxtheodorelove43763
 

More from theodorelove43763 (20)

Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docxExam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
 
Evolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docxEvolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docx
 
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docxexam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
 
Evolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docxEvolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docx
 
Evidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docxEvidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docx
 
Evidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docxEvidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docx
 
Evidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docxEvidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docx
 
Evidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docxEvidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docx
 
Evidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docxEvidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docx
 
Everyone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docxEveryone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docx
 
Even though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docxEven though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docx
 
Even though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docxEven though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docx
 
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docxEvaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
 
Evaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docxEvaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docx
 
Evaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docxEvaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docx
 
Evaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docxEvaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docx
 
Evaluating 19-Channel Z-score Neurofeedback Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback  Addressi.docxEvaluating 19-Channel Z-score Neurofeedback  Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback Addressi.docx
 
Evaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docxEvaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docx
 
Evaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docxEvaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docx
 
Evaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docxEvaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docx
 

Recently uploaded

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Deliverables1.      You should submit your four SQL scripts s.docx

  • 1. Deliverables: 1. You should submit your four SQL scripts satisfying each steps in the project. Feel free to compress the files using WinZip and save as YournameProject2.zip. 2. Submit in your WebTycho portfolio in the Project 2 area before the due date. Please contact the instructor before the due date if you have any questions or concerns. I strongly suggest you also submit your spool files. Project Grading Overview In the grade book, the total number of points will be set to 100. The project elements will be assessed as follows: Attributes Value Insert Statements 25 points SelectStatements 35 points Update Statements 25 points Delete Statements 15 points Project Grading Rubric Attribute (0-12) Points (12-20) Points (21-25) Points Points Inserts - Poor SQL insert statements minimally addressing the functionality
  • 2. - Poor design and formatting - Commits not included - Major integrity constraint violations present - Good SQL insert statements addressing most functionality - Statement has a good design but could be clearer or better formatted - Commits included - Minor integrity constraint violations may be present - Excellent, efficient SQL insert statements addressing all functionality - Statement is designed well, clear and neatly formatted - Commits included - No integrity constraint violations Attribute (0-17) Points (18-27) Points (28-35) Points Points Selects - Poor SQL select statements minimally addressing the functionality - Poor design and formatting - Multi-table joins are mostly incorrect - Output display missing or of poor quality
  • 3. - Good SQL select statements addressing most functionality - Statement has a good design but could be clearer of better formatted - Multi-table joins are reasonable but may include some non- standard syntax or inefficiencies. - Good output display but could provide minor areas difficult to follow - Excellent, efficient SQL select statements addressing all functionality - Statement is designed well, clear and neatly formatted - Multi-table joins are efficient using correct syntax - Excellent clean and well-organized output display Attribute (0-12) Points (12-20) Points (21-25) Points Points Updates - Poor SQL update statements minimally addressing the functionality - Poor design and formatting - Commits not included - Major integrity constraint violations present - Good SQL update statements addressing most functionality
  • 4. - Statement has a good design but could be clearer or better formatted - Commits included - Minor integrity constraint violations may be present - Excellent, efficient SQL update statements addressing all functionality - Statement is designed well, clear and neatly formatted - Commits included - No integrity constraint violations Attribute (0-7) Points (8-11) Points (12-15) Points Points Deletes - Poor SQL delete statements minimally addressing the functionality - Poor design and formatting - Commits not included - Major integrity constraint violations present - Good SQL delete statements addressing most functionality - Statement has a good design but could be clearer or better formatted - Commits included
  • 5. - Minor integrity constraint violations may be present - Excellent, efficient SQL delete statements addressing all functionality - Statement is designed well, clear and neatly formatted - Commits included - No integrity constraint violations Janelle Chpaman – Project 1 April 13, 2014 List of entities: Actor Actor Borrowing Rental History Cast Actor in MovieTitle Customer Customer Discount Discount prices for certain movies or types of movies Distributor Distributor of Movies DistributorMovieType What movie types distributor provides DVD Descendant of Movie format Fee Late and damaged fees, failure to rewind fees and so on for
  • 6. each Borrowing Movie Video or DVD of Movie MovieAward Academy Awards won (by the movie, the actors, the actresses and/or the directors) MovieAwardType Academy Award type MovieTitle Name of Movie MobieTitleType Movie classification MovieType Types of Movie (suspense, horror, mystery, comedy, etc.) Video Descendant of Movie format Relationships: Actor Cast Actor takes part in many movie Casts. Borrowing Fee When custmer Borrows a movie, one or more Fees are connected with this action. Borrowing Customer One Customer Borrows zero or more movies (with assumption that customer can only chose to register). Borrowing Movie Movie can be Borrowed by one or more customers. Cast MovieTitle Each MovieTitle can play multiple Actors (M:N relationship replaced by Cast entity).
  • 7. Discount MovieTitle One MovieTitle can take part in several (time limited) Discount offers. Discount MovieType One MovieType can take part in several (time limited) Discount offers. Distributor Movie Each Distributor provides one or more Movies. Distributor DistributorMovieType Each Distributor provides one ore more MovieTypes and each MovieType can be provided by multiple Distributors so this M:N relationship was replaced by the DistributorMovieType entity. Janelle Chpaman – Project 1 April 13, 2014 DistributorMovieType MovieType Each Distributor provides one ore more MovieTypes and each MovieType can be provided by more Distributors so this M:N relationship was replaced by DistributorMovieType entity DVD Movie DVD is descendant of Movie. Video Movie Video is descendant of Movie. Movie MovieTitle Each MovieTitle exists on one or more media types. MovieAward MovieAwardType Movie Award is one of the Movie Award Types.
  • 8. MovieAward MovieTitle One MovieTitle can win zero or multiple Awards. MovieTitle MovieTitleType Each MovieTitle can be assigned to multiple MovieTypes and multiple Movies of each MovieType exists so this M:N relationship was replaced by MovieTitleType entity. MovieTitleType MovieType Each MovieTitle can be assigned to multiple MovieTypes and multiple Movies of each MovieType exists so this M:N relationship was replaced by MovieTitleType entity. Janelle Chpaman – Project 1 April 13, 2014 erd MomAndPop Movie DVD Video MovieT itle Distributor MovieT ype DistributorPrice
  • 11. LastName Year NameCodeFirstName LastName Name Code Role MovieAwardT ype Id Name Id Id 1 0..* 0..* 1 1 0..* 1 1..* 1 0..*
  • 13. Janelle Chpaman – Project 1 April 13, 2014 create table CUSTOMER ( CUST_ID bigint not null, FIRST_NAME varchar(50) not null, LAST_NAME varchar(50) not null, STREET varchar(50), CITY varchar(50) not null, ZIP varchar(10), EMAIL varchar(50), PHONE varchar(20) PRIMARY KEY (CUST_ID) ) GO create table DISTRIBUTOR ( CODE varchar(15) not null, NAME varchar(50) PRIMARY KEY (CODE) ) GO create table MOVIE_TYPE ( CODE char(5) not null, NAME varchar(50) PRIMARY KEY (CODE) ) GO create table ACTOR ( ACTOR_ID int not null, FIRST_NAME varchar(50) not null,
  • 14. LAST_NAME varchar(50) not null PRIMARY KEY (ACTOR_ID) ) GO create table MOVIE_TITLE ( ID_NUMBER bigint not null, NAME varchar(50) not null, RATING smallint, RUNNING_LENGTH smallint, Janelle Chpaman – Project 1 April 13, 2014 CATALOG_DESCRIPTION text, YEAR_RELEASED smallint PRIMARY KEY (ID_NUMBER) ) GO create table MOVIE_TITLE_TYPE ( MOVIE_TITLE_ID bigint not null FOREIGN KEY REFERENCES MOVIE_TITLE(ID_NUMBER), MOVIE_TYPE_CODE char(5) not null FOREIGN KEY REFERENCES MOVIE_TYPE(CODE), PRIMARY KEY (MOVIE_TITLE_ID, MOVIE_TYPE_CODE) ) GO create table MOVIE ( ID_NUMBER bigint not null, MEDIA_TYPE char(1) not null CHECK (MEDIA_TYPE in ('D', 'V')), -- D=DVD, V=Video DISTRIBUTOR_PRICE numeric(5,2) not null,
  • 15. SERIAL_NUMBER varchar(30) not null, CUSTOMER_PRICE numeric(5,2) not null, MOVIE_TITLE_ID bigint not null FOREIGN KEY REFERENCES MOVIE_TITLE(ID_NUMBER) PRIMARY KEY (ID_NUMBER) ) GO create table [CAST] ( ACTOR_ID int not null FOREIGN KEY REFERENCES ACTOR(ACTOR_ID), MOVIE_TITLE_ID bigint not null FOREIGN KEY REFERENCES MOVIE_TITLE(ID_NUMBER), [ROLE] varchar(100) PRIMARY KEY (ACTOR_ID, MOVIE_TITLE_ID) ) GO create table MOVIE_AWARD_TYPE ( ID smallint not null, NAME varchar(50) not null, PRIMARY KEY (ID) ) GO create table MOVIE_AWARD Janelle Chpaman – Project 1 April 13, 2014 ( MOVIE_TITLE_ID bigint not null FOREIGN KEY REFERENCES MOVIE_TITLE(ID_NUMBER), [YEAR] smallint not null, MOVIE_AWARD_TYPE_ID smallint not null FOREIGN KEY
  • 16. REFERENCES MOVIE_AWARD_TYPE(ID) PRIMARY KEY (MOVIE_TITLE_ID, [YEAR],MOVIE_AWARD_TYPE_ID) ) GO create table DISCOUNT ( ID bigint not null, MOVIE_TITLE_ID bigint null FOREIGN KEY REFERENCES MOVIE_TITLE(ID_NUMBER), MOVIE_TYPE_CODE char(5) FOREIGN KEY REFERENCES MOVIE_TYPE(CODE), DATE_FROM datetime not null, DATE_TO datetime not null, AMOUNT numeric(5,2) PRIMARY KEY (ID) ) GO create table DISTRIBUTOR_MOVIE_TYPE ( DISTRIBUTOR_CODE varchar(15) not null FOREIGN KEY REFERENCES DISTRIBUTOR(CODE), MOVIE_TYPE_CODE char(5) not null FOREIGN KEY REFERENCES MOVIE_TYPE(CODE), DATE_FROM datetime not null, DATE_TO datetime not null, AMOUNT numeric(5,2) PRIMARY KEY (DISTRIBUTOR_CODE, MOVIE_TYPE_CODE) ) GO create table BORROWING ( ID bigint not null, CUSTOMER_ID bigint not null FOREIGN KEY REFERENCES CUSTOMER(CUST_ID),
  • 17. MOVIE_ID bigint not null FOREIGN KEY REFERENCES MOVIE(ID_NUMBER), DATE_RENTED datetime not null, TO_DATE datetime not null, DATE_RETURNED datetime PRIMARY KEY (ID) ) GO create table FEE Janelle Chpaman – Project 1 April 13, 2014 ( BORROWING_ID bigint not null FOREIGN KEY REFERENCES BORROWING(ID), FEE_TYPE char(1) CHECK (FEE_TYPE in ('L', 'D', 'F')), -- L=Late, D=Damage, F=Failure FEE_DATE numeric(5,2) not null, AMOUNT numeric(5,2) not null, PRIMARY KEY (BORROWING_ID, FEE_TYPE, FEE_DATE) ) GO