subject

1) (5 points) Examine the below relational schema; Apply it based on a specific context in a specific Ministry in Oman, and modify it: Replace RELATION 2 by a name of an applicable event entity (as an associative entity) and RELATION 3 by a person/concept/object entity ADD 1:1 or 1:M unary relationship to CITY or RELATION3 entity. Add different data types (char, varchar, date, integer, decimal etc.). Insert your modified relational schema as an image. 2) (20 points) WRITE a database description for each of the above relations(tables) using SQL DDL CREATE and ALTER(shorten, abbreviate or change any data name as needed in your SQL version). Don’t forget to include primary key constraints, foreign keys constraints, check constraints( for character and numeric columns with different conditions), default, unique and required constraints etc. Name table starting tbl such as tblYournameCity.
< >

3) (15 points) Add data using different ways of INSERT command (2 rows for one-side tables, and 3 rows for many-side tables).

<< PASTE your answer here including SQL INSERT command and each table view using : SELECT * from tablename>>

4) (15 points) Use SELECT statement to report three queries (with their outputs and description based on the below:
a. A query includes (1), a query includes two tables, and a query includes three tables, and a query of one table with unary relationship.
b. Each query must include conditions and order by, and select specific columns (not *).
c. Integrate calculated column, aggregated functions, group by and having, and sub query in your queries.
d. Add a new function in your query that is not covered in this course.

<< PASTE your answer here including : 1- Query one sentence description,2- SQL select statement and 3-query output>>.

Assignment will be graded based on completeness, accuracy (syntax & logic), relevancy and creativity.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:50
Is one of the most injurious events that can happen to a person in a crash.
Answers: 1
question
Computers and Technology, 22.06.2019 07:20
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display “enter a value to be cubed.” input value; set cube = value ^ 3 display value, “ cubed is “, cube end while
Answers: 2
question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
You know the right answer?
1) (5 points) Examine the below relational schema; Apply it based on a specific context in a specifi...
Questions