Question

In: Computer Science

The following tables form part of a database (Flights Database) held in a relational DBMS: employee...

The following tables form part of a database (Flights Database) held in a relational DBMS: employee (empNo, empName, empSalary, empPosition) aircraft (aircraftNo, acName, acModel, acFlyingRange) flight (flightNo, aircraftNo, fromAirport, toAirport, flightDistance, departTime, arriveTime) certified (empNo, aircraftNo) Where:  employee contains details of all employees (pilots and non-pilots) and empNo is the primary key;  aircraft contains details of aircraft and C is the primary key.  flight contains details of flights and (flightNo, aircraftNo) form the primary key.  certified contains details of the staff who are certified to fly an aircraft and (empNo, aircraftNo) form the primary key. Create tables (12 points)

1. Using the CREATE TABLE statement, create each of the above tables (create primary keys and foreign keys, where appropriate). (Already Done)

Now answer the questions below using SQL.

List the pilot number and names of all pilots who have executed flights where the distance covered is greater than 1000 Km. List the aircrafts who have never executed a flight to the destination ‘London’. List the flights where the flight distance equals to the flying range of the aircraft who executed it?

1. List the number of flights with each aircraft. 2. List the number of flights with each Boeing aircraft. 3. What is the number of pilots certified for each type of aircraft? 4. What are the most commonly destined airports? 5. What is the number of aircrafts certified for each pilot?

Solutions

Expert Solution

Please do up vote thank you


Related Solutions

The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName,...
The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName, hotelAddress, country) Room (roomNo, hotelNo, type, price) Guest (guestNo, guestName, guestAddress, country) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Write the SQL statements for the following questions: 1. List the rooms that are currently unoccupied at the Grosvenor Hotel, for: (a) Use 2019-10-01 as today's date. Include all 'Grosvenor' hotels. List in hotelNo, roomNo order. Use NOT IN to perform the difference operation (b) Use...
QUESTION: The following tables describe the content of a relational database: a) Identify and classify the...
QUESTION: The following tables describe the content of a relational database: a) Identify and classify the tables as either entity or relationship The first step in building an E-R model is to identify the entities. Having identified the entities, the next step is to identify all the relationships that exist between these entities. Using the content of the relational database above: b) Using the relations in the relational database, explain how one can transform relationship in E-R model into a...
What RAD?What is a relational database?What are the other types of DBMS?What is...
What RAD?What is a relational database?What are the other types of DBMS?What is a composite key?What is a primary key?What is a surrogate key?What is a foreign key?
Use MYSQL to create the set of database tables of the relational database model and complete...
Use MYSQL to create the set of database tables of the relational database model and complete the associated queries given. Procedure: 1) Write all the SQL statements, necessary to create all tables and relationships, with Primary & Foreign keys. 2) Execute each statement in the correct order to create the relational database in MYSQL. 3)Insert some data into each table. 4) Use all your SQL create and Insert statements (from MS Word) to execute in the MYSQL WorkBench 5) Write...
Part #4: Data normalization: Background: Data in a relational database is stored in a normalized form....
Part #4: Data normalization: Background: Data in a relational database is stored in a normalized form. Data normalization or just normalization is a strategy used to organize data into multiple related tables to reduce data redundancy while preserving data integrity. Exercise: Normalize the student data in the University table (sample data is shown further below) into 3 tables, namely, Student, Department, and Course. You do not need to populate data. Just illustrate the schema for the 3 tables. You may...
Consider the following relational database schema:             employee(employee-name, employee-id, street, e-city)             works(employee-
Consider the following relational database schema:             employee(employee-name, employee-id, street, e-city)             works(employee-id, company-id, salary)             company(company-name, company-id, c-city)             manages(employee-id, manager-id) Specify the following queries on this database schema using the relational operators we discussed in class. Write your answers on a separate sheet of paper in the order that they are specified below. Retrieve the name and address of employees who work for First Bank Corporation. Retrieve the name, street address, and city of residence of all employees...
Using your downloaded DBMS (MS SQL Server), create a new database. Create the database tables based...
Using your downloaded DBMS (MS SQL Server), create a new database. Create the database tables based on your entities defining The attributes within each table The primary and foreign keys within each table *****Show your database tables, tables attributes, primary and foreign keys***** Do not forget to check the lesson slides and videos that show you how to convert an ER/EER into a database schema, and how to create a database and tables using MS SQL Server.
can someone please find for me the characteristic of DBMS form this article, thank you Relational...
can someone please find for me the characteristic of DBMS form this article, thank you Relational database A relational database is a DBMS that represents the data in a tabular form of rows and columns. A table is a representation of an entity. A table is a combination of columns and rows. Each column in a table represents an attribute of the entity, also known as fields or properties. Each row in a table represents a record, the data associated...
One of the characteristics of good relational database design is normalized tables. Discuss two ways in...
One of the characteristics of good relational database design is normalized tables. Discuss two ways in which normalization helps minimize data redundancy and anomalies such as insertion, deletion, and update anomalies. What are some other characteristics of good database design?
Compare and contrast a fully relational DBMS with Excel in the following areas. 1 Volume of...
Compare and contrast a fully relational DBMS with Excel in the following areas. 1 Volume of data (number of rows) 2 Relationships of tables 3 Searching efficiency 4 Normalization 5 Update concurrency
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT