Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the data definition statements of SQL that modify the structures of a database listed on page 2 of this assessmert in the way described
Write the data definition statements of SQL that modify the structures of a database listed on page 2 of this assessmert in the way described below. Note, that some of the modifications may require more than one SQL data definition statement. (1) Modify the consis tency constraint of the sample database such that after the modification, it is possible to record in the database information about the trucks that have a capacity up to and including 225. (2 marks) (2) Modify the structure and consistency constraints of the sample database such that after the modification, it is possible to store information in the database about the total number of legs a trip contains. Assume that a trip cannot contain more than 10 legs. (2 marks) (3) Modify the structure of the sample database so it is possible to store information in a new table in the database about mechanics employed by a transportation company. Assume that a description of a mechanic consists of an employee number, first name, last name, date of birth and qualification level. A qualification level is a positive integer number 1 or 2 or 3 or 4 or 5 or 6 . Remember that a mecharic is an employee. (2 marks) (4) Modify the consis tency constraints of the sample database, so it is possible to store information about the trip without providing information about a driver licence number. Such modification is required when a driver leaves a transportation company, and we would like to keep information about all trips performed by the driver. (2 marks) (5) Explain how the use of consistency constraints supports the management of data security. Use original examples that you make up yourself to illustrate your answer. (2 marks) Add your code into the question2.sql template provided and output your report flle on your virtual machine to a file named question2.rpt. Add your name, student number and the date to the comments section of your SQL script. Submit your answers as the files question2.sql.question 2. pt and question2.pdf using the templates provided. Note your script may be tested and should not have any errors when run
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started