Exercise 1 (2 pts)
Write a CHECK constraint that expresses the following condition on attribute Rating in table Movies in Movie Database: “Any possible value of Rating is either a null value or a number in the interval from 0 to 10 inclusively”.
Exercise 2 (2 pts)
Write a CHECK constraint that expresses the following condition on records in table Laptop in Hardware Database: “If the screen is larger than 20, then the price is higher than 2000”.
Exercise 3 (2 pts)
Write a CHECK constraint that expresses the following condition on table Schedule in University Database: “Each course (occurring in this table) is offered at least two times”. Hint: Use NOT EXISTS.
Exercise 4 (2 pts)
Write a CHECK constraint that expresses the following condition on table StarsIn in Movie Database: “Each movie (occurring in this table) has at most one director”. Hint: Use NOT EXISTS.
How to submit
1. This assignment consists of `pen-and-paper’ exercises. No SQL files and no copies of SQL tables are required.Turn in your solutions as a document in the doc, docx, or pdf formats.
Last Completed Projects
| topic title | academic level | Writer | delivered |
|---|
jQuery(document).ready(function($) { var currentPage = 1; // Initialize current page
function reloadLatestPosts() { // Perform AJAX request $.ajax({ url: lpr_ajax.ajax_url, type: 'post', data: { action: 'lpr_get_latest_posts', paged: currentPage // Send current page number to server }, success: function(response) { // Clear existing content of the container $('#lpr-posts-container').empty();
// Append new posts and fade in $('#lpr-posts-container').append(response).hide().fadeIn('slow');
// Increment current page for next pagination currentPage++; }, error: function(xhr, status, error) { console.error('AJAX request error:', error); } }); }
// Initially load latest posts reloadLatestPosts();
// Example of subsequent reloads setInterval(function() { reloadLatestPosts(); }, 7000); // Reload every 7 seconds });

