Write a PHP script task4.php that connects to the database and displays the results of the query in Task 1 in an HTML table. This was taks 1: 1. List the names and weightings of all assessments in the course titled “Database systems”. The list should be ordered by the assessment name. answer : SELECT name, weighting FROM Assessment a JOIN Course c ON a.cid = c.cid WHERE title = 'Database systems' ORDER BY name;
Q: You are working with a database that stores information about suppliers, parts and projects. The…
A: Given: The schema for the database used in this question is as follows: (note that primary keys are…
Q: You are working with a database that stores information about suppliers, parts and projects. The…
A: Ans:) The queries for above parts are given below.
Q: Write an SQL query based on the described database for a student exchange program coordinator. To…
A: Introduction:- Below is the complete solution with explanation in detail. Below is the SQL query for…
Q: database
A: create table statement is used to create tables in SQL. table name, column name,column data type,…
Q: Explain why an index is only useful if an attribute's values change enough.
A:
Q: language (as varchar), and the source code. An output parameter returns the result of the…
A:
Q: Part A: MySQL Query/Exec Create StudentsDB database in MySQL server with the following table:…
A: Answer
Q: e an MVC vweb application having the index view given below. Given ated from the model book having…
A: Note: Since you have not provided the language to write the code, I am using Java language to write…
Q: Consider the following PL/SQL script: SET SERVEROUTPUT ON BEGIN INSERT INTO COURSE…
A: Answer is given below .
Q: First step is to built the database schema using the following query- CREATE SCHEMA `organization`…
A: The new attributes will get added in the primary table form in the database table .
Q: A select operation pares down a table in a relational database by eliminating columns according to…
A: The select operation is basically an operation which searches data in the table and acquire or…
Q: Suppose in a movie database, a movie is identified by id, name, year and ratings where a movie might…
A: Answer
Q: Consider the following Database Schema. CUSTOMER INVOICE LINE PK CUS CODE Sererates PK INY HUMBER…
A: Assuming "claw hammer" is stored in P_DESCRIPT in product Table. As all tables are connected, we…
Q: PART B Consider the college database you implemented in the image provided and answer the following…
A: Solution: 1.SQL statement that displays the data of the STUDENTS table SQL Query to create table1 :…
Q: The Driver Relationship team wants to create some workshops and increase communication with the…
A: SQL query to create a new table with name, ACTIVE_DRIVERS that contains the list of specified…
Q: The Driver Relationship team wants to create some workshops and increase communication with the…
A: Given Question The Driver Relationship team wants to create some workshops and increase…
Q: Create the database and table in MYSQL, PhpMyAdmin as shown below in the screenshot: Database Name:…
A: I have provided answer in step2.
Q: The following three tables make up a simple reservation system for a small campground. The database…
A: ER Diagram: ER diagram is defined as the interconnection of entities and attributes how they are…
Q: Task
A: Answer Taak 1:- Output:-
Q: Consider the following database: Students name rim sara milad tarek lastname age 19 18 21 18 Select…
A:
Q: he structure of table students in DB Students database is as following: tudents(student_id int,…
A: Below is the code in PHP for student info in web page .Use search to see the details of the…
Q: The following relations kind a part of a on-line database (the relations area unit…
A: Due to the honor code, I can help you with 1st part. For 2nd part resubmit the question From the…
Q: The best representation of the STAFF table below in the Document oriented databases will be? StaffNo…
A: All the values are to be assigned with the keys and later these are to separated with commas. That…
Q: For executing a query, which specifies a range of values in the WHERE clause, among Ordered indexing…
A: - We need to talk about the indexing to use for getting data from WHERE clause.
Q: For the following database scheme Employee(empNo fName,.IName.address.DOB.sex.position.deptNo)…
A: An SQL statement to list the project number, project name and the number of employees in the project…
Q: A table is in 2NF when the table is in 1NF and what other condition is met? O There are no…
A: Second Normal Form(2NF) in which the normalizing that is having the second step in a database that…
Q: Consider the SQL queryselect p.a1from p, r1, r2where p.a1 = r1.a1 or p.a1 = r2.a1Under what…
A: Consider the SQL queryselect p.a1from p, r1, r2where p.a1 = r1.a1 or p.a1 = r2.a1Under what…
Q: Define in SQL-like syntax a view of the engineering database V(ENO, ENAME, PNO, RESP), where the…
A:
Q: Create a temporary table for V1 b) Create the appropriate trigger(s) on R that will keep V1 current…
A: One implementation technique of a view is as a temporary table. That creates the challenge for the…
Q: Provide relational algebra (NOT SQL) queries to find the following information. NOTE: • You can use…
A: π is used to select column σ is used to select raw x represent cartesian product p is alias used…
Q: Consider a database with the following tables: Patient(PatientID. PatientName, NumberOfVisits)/…
A: Problem Statement: Consider a database with the followingtables: Patient(PatientID.…
Q: ProductType is a foreign key field in the Orders table and is constrained to a list of valid entries…
A: Foreign key concept comes from referential integrity which establishes master child relationship.
Q: I need help creating a table in Java/HTML from a SQL database. My syntax isn't working. DB table:…
A: For creating table in Java from a SQL database, we ca use JDBC connection. import java.sql.*; public…
Q: CENTRAL SCHOOL LIBRARY Obsarve the ER diagram for the CENTRAL SCHOOL LIBRARY CENTRAL SCHOOL LIBRARY…
A: The Answer is in Below steps
Q: In a sql database give an example of a search problem that will work with an inner join and will not…
A: Find the answer given as below :
Q: Q2/ write the schema that descibes the following relations: 1- The course relation course id title…
A: Drawing the schema for given relation Here, PK means Primary Key and FK means Foreign Key.
Q: Given the following query SELECT StudID, CourseTitle, Credits FROM Enrollment, Course WHERE…
A: d) hash-based index on Course.Credits
Q: The following three tables make up a simple reservation system for a small campground. The database…
A: A primary key is a key whichever uniquely identifies. Foreign key is column or group of columns that…
Q: Task 1: The InstantRide Management team founded a new team for car maintenance. The new team is…
A: Answer:-
Q: Consider the following schema of hotel reservations database: Hotel (Hotel No. Name, City) Room…
A: Here is the Schema of above problem. See below step.
Q: "natural join" in a relational database takes two tables of lnformation and combines entries from…
A: C = [ {A38182818,Spring2021,Math230,01,Su,A38182818},…
Q: Question 36 options: 1) A row, table, or an entire database 2) A row, table, or an entire…
A: 1) On application level we can restrict ( by implementing locking mechanism) other user to make…
Q: (a) It creates the table T1 in which any delete operation on either T1 or T2 violating the…
A: ON DELETE SET DEFAULT , fills default values in the foreign key columns of the child tables when the…
Q: Create LessonSchedule table with FK constraints in mysql database Two tables are created: Horse…
A: The solution for the above given question is given below:
Q: Given the tables create table T (A int primary key, B int); create table U (C int primary key, A…
A: As mentioned: There are two tables. Table T and Table U Table T has A(P.K), B two columns. Table U…
Q: The following PEOPLE relation keeps information about people such as their social security number,…
A: Answer to the above question is in step2.
Q: For the following database scheme Employee(empNo fName,IName,address,DOB,sex.position,deptNo)…
A: For this we have to select columns empNo and total hours worked by using sum() function group by…
Q: The InstantRide Management team founded a new team for car maintenance. The new team is responsible…
A: According to the Question below the solution:
Q: Create an MVC web application having the index view given below. Given view will be populated from…
A: namespace MVCTutorials.Controllers{ public class book { public int bookId { get; set; }…
Write a PHP script task4.php that connects to the
This was taks 1:
1. List the names and weightings of all assessments in the course titled “Database systems”. The list should be ordered by the assessment name.
answer :
SELECT name, weighting
FROM Assessment a JOIN Course c ON a.cid = c.cid
WHERE title = 'Database systems'
ORDER BY name;
Step by step
Solved in 6 steps with 5 images
- Draw an EER diagram for AIRLINE relational database. According to model, the following requirements are satisfied:The AIRLINE relational database schema shown in the above figure describes a database for airlineflight information. Each FLIGHT is identified by a Flight_number, and consists of one or moreFLIGHT_LEGs with Leg_numbers 1, 2, 3, and so on. Each FLIGHT_LEG has scheduled arrival anddeparture times, airports, and one or more LEG_INSTANCEs—one for each Date on which the flighttravels. FAREs are kept for each FLIGHT. For each FLIGHT_LEG instance, SEAT_RESERVATIONs are kept,as are the AIRPLANE used on the leg and the actual arrival and departure times and airports. AnAIRPLANE is identified by an Airplane_id and is of a particular AIRPLANE_TYPE. CAN_LAND relatesAIRPLANE_TYPEs to the AIRPORTs at which they can land. An AIRPORT is identified by an Airport_code.The objective is to create a system that allows you to completely manage the functions of thecompany through an optimal design of the data model, to be adapted to a system connected to aSQL database. StatementThe pharmacy chain “Recetas Rayos X” needs a system to manage information about its operations, such as the purchase, sale and administration of medications, other patients and who prescribed them.a medicine. The information that must be stored is the following:1. Patients are identified by the RUT and the name, surname, date of birth, email,address, several telephone numbers and pension system.2. There are various health provisions, both social and private, and they are correctly codified.3. Doctors are identified by the RUT. For each doctor you have to store the first name, last name,date of birth, specialties and years of practice.4. There are various specialties which are adequately codified.5. Each pharmaceutical company is identified by a code, the name and a telephone…The objective is to create a system that allows you to completely manage the functions of thecompany through an optimal design of the data model, to be adapted to a system connected to aSQL database. StatementThe pharmacy chain “Recetas Rayos X” needs a system to manage information about its operations, such as the purchase, sale and administration of medications, other patients and who prescribed them.a medicine. The information that must be stored is the following:1. Patients are identified by the RUT and the name, surname, date of birth, email,address, several telephone numbers and pension system.2. There are various health provisions, both social and private, and they are correctly codified.3. Doctors are identified by the RUT. For each doctor you have to store the first name, last name,date of birth, specialties and years of practice.4. There are various specialties which are adequately codified.5. Each pharmaceutical company is identified by a code, the name and a telephone…
- Develop an EER model for the following situation using the traditional EER notation, the Visio notation, or the subtypes inside supertypes notation, as specified by your instructor: An international school of technology has hired you to create a database management system to assist in scheduling classes. After several interviews with the president, you have come up with the following list of entities, attributes, and initial business rules: • Room is identified by Building ID and Room No and also has a Capacity. A room can be either a lab or a classroom. If it is a classroom, it has an additional attribute called Board Type. • Media is identified by MType ID and has attributes of Media Type and Type Description. Note: Here we are tracking type of media (such as a VCR, projector, etc.), not the individual piece of equipment. Tracking of equipment is outside the scope of this project. • Computer is identified by CType ID and has attributes Computer Type, Type Description,…Consider a database schema with a relation Emp whose attributes are as shown below, with types specified for multivalued attributes. Emp = (ename, ChildrenSet multiset(Children), SkillSet multiset(Skills))Children = (name, birthday)Skills = (type, ExamSet setof(Exams))Exams = (year, city) Redesign the database above into first normal form and fourth normal form. List any functional and multivalued dependencies that you assume. Also list all referential-integrity constraints that should be present in the first and fourth normal form schemas.This test concerns database design, including both the logical design via the Entity Relationship (E - R) model and the physical model via relational database tables. The subject of the model is the registration of students in college classes, and there may be multiple classes for each course. The college model should include: courses (for example the CBU catalog), the current classes (or course-sections) given for courses (for example the CBU schedule for a term), the faculty qualified to teach courses, the scheduling of classes (to buildings/rooms, times, and faculty members), the assignment of faculty to students for advising (1 advisor per student), and the scheduling of students to classes.For unique identifiers you can use the following abbreviations:SID Student IDCID Course ID (ie MIS 471, …)SEC Course Section (ie A, B, C, …)BID Building ID (ie BU, BH, K, …)RID Room NumberFID Faculty IDTID Timeslot ID (ie TR 9:30, MWF 8am, …)CRN Course Record Number (an auto key for each…
- 3- Consider a database for a university system that needs to store information about students,courses, and instructors. Each student can enroll in multiple courses, and each course can havemultiple instructors. Normalize the following schema to Third Normal Form (3NF), and showyour steps in between (1NF, 2NF).Students (StudentID, FirstName, LastName, CourseID, InstructorID)Courses (CourseID, CourseName, InstructorID)Instructors (InstructorID, FirstName, LastName)4- To keep track of office furniture, computers, printers, and other office equipment, the FOUNDITCompany uses the table structure shown below.a. Given that information, write the relational schema and draw the dependency diagram.Make sure that you label the transitive and/or partial dependencies.b. Write the relational schema and create a set of dependency diagrams that meet 3NFrequirements. Rename attributes to meet the naming conventions, and create newentities and attributes as necessary.Consider a relational database for an online hotel booking company. The database consisting ofthe following tables (where the primary keys are underlined): Hotel (hId, hName, hAddress, hCity) Guest(gId, gName, gAddress, gCity) Room(hid, roomNo, type, price) Booking(gId, hId, roomNo, fromDate, year, noOfDays)Where hId and gId are identifiers for the hotels and the guests,and the Booking relation indicated that a guest booked a hotel room for a specified number of days(noOfDays) starting from fromDate of a given year. For instance, a tuple < g12345, h5555, 220,Jan05, 2016, 15> in Booking indicates that the guest g12345 booked room 220 of the h5555 hotelfor 8 days starting on Jan 5, 2016. The attribute "gAddress" records the home address of theguests.Write the following queries in relational algebra (1) Return thename of guests who have booked a hotel room in NYC in January 2016 (i.e.,fromDate between 01/01 and 01/31 and year=2016).(2) Return thename of guests who have booked a…Consider the following Scenario.Design a database for an airline. The database must keep track of customers andtheir reservations, flights and their status, seat assignments on individual flights,and the schedule and routing of future flights. Your design should include an E-Rdiagram, a set of relational schemas, and a list of constraints, including primary-keyand foreign-key constraints.Please determine the entities, attributes and relationships that should exist in thedatabase and draw an E-R diagram.
- Design an Entity-Relationship diagram for the below environment. determine 1-Total participation.2-Partial participation Consider a MAIL_ORDER database in which employees take orders for parts from customers. The data requirements are summarized as follows: o The mail order company has employees, each identified by a unique employee number, first and last name, and Zip Code. o Each customer of the company is identified by a unique customer num, first and last name, and Zip Code. o Each part is identified by a unique part number, a part name, price, and quantity. o Each order placed by a customer is taken by an employee and is given a unique order number. Each order contains specified quantities of one or more parts. Each order has a date of receipt as well as an expected ship date. The actual ship date is also recorded.Q. 1 Consider a university database for the scheduling of classrooms for final exams. This database could be modeled as the single entity set exam, with attributes course-name, section-number, room-number, and time. Alternatively, one or more additional entity sets could be defined, along with relationship sets to replace some of the attributes of the exam entity set, as1. course with attributes name, department, and c-number2. section with attributes s-number and enrollment, and dependent as a weak entity set on course3. room with attributes r-number, capacity, and buildingShow an E-R diagram illustrating the use of all three additional entity sets Listed and also specify the primary keys allDraw an ER diagram and then map it into a relational schema(database) for the following scenario.• For each MEMBER we keep track of the unique MemdID, a well as Name, Zip, and the Datethe membership was paid.• For each MEMBERSHIP type we keep track of the unique Mid, as well as MName and Price• For each PASS CATEGORY we keep track of the unique PassCatID, as well as PCName andPrice• For each ONE DAY PASS we keep track of the unique PassID and Date• For each MERCHANDISE item we keep track of the unique MrchID, as well as Name andPrice• For each sale TRANSACTION we keep track of the unique Tid and Date• Each member pays for exactly one membership type; each membership type has at leastone member but can have many members.• Each member can buy many day passes but does not have to buy any, each day pass wasbought by exactly one member• Each day pass belongs to exactly one pass category; a pass category can have manyindividual day passes issued for it but does not have to have any. • Each…