answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zarrin [17]
1 year ago
8

The kings and queens of England are listed in a relation Kings(name,nickname,house,beginReign,endReign). Their name is unique, e

ither using a Roman numeral to distinguish them, e.g., 'Edward I' or 'Edward II', or in a few cases using their nickname, e.g., 'Edward the Confessor'. The attribute nickname is an additional appelation, if they have one and it is not used in their name to distinguish them, e.g., 'The Unready'. The value of nickname is NULL if there is no nickname. The attribute house is the dynasty, e.g., 'Tudor'. Attribute beginReign and endReign are integers, the first and last years, respectively, that the king or queen was on the throne. There is also a relation Parents(child,parent). Both attributes are the names of kings or queens, with the obvious connection that the first is a child of the second. Write the following queries: Who was king in the year 1000? Give the name and nickname. Find all the pairs of kings or queens (A,B) such that A was the great grandchild of B. Find the name and nickname of all kings or queens that have a nickname that does not begin with "The". Find the names of those kings or queens that were the parent of two or more kings or queens. List each such person only once. Find for each house the number of kings or queens of that house. Several times in British history, kings or queens have deposed one another, so that their reigns overlapped. Find all such pairs, listing the pairs in both orders; i.e., list both (A,B) and (B,A). However, be careful not to list pairs A and B where the only overlap is that A's reign ended in the same year that B's began, or vice-versa.
Computers and Technology
1 answer:
Arada [10]1 year ago
5 0

Answer:

The answers to each question are explained below

Explanation:

Who was king in the year 1000? Give the name and nickname.

Query:

       SELECT name, nickname FROM Kings

      WHERE beginReign <=1000 AND endReign >=1000;

Explanation:

SELECT is used to query the database and get back the specified fields.

name and nickname are columns of Kings table.

FROM is used to query the database and get back the preferred information by specifying the table name.

Kings is a table name.

WHERE is used to specify a condition based on which the data is to be retrieved. The conditions are as follows:

beginReign <=1000

endReign >=1000

AND clause between the conditions indicate that both the conditions must be true.

Find all the pairs of kings or queens (A,B) such that A was the great grandchild of B.

Query:

       SELECT p.child, ggp.parent

       FROM Parents p, Parents gp, Parents ggp

       WHERE p.parent = gp.child AND gp.parent = ggp.child;

Explanation:

SELECT is used to query the database and get back the specified fields.

child is a column of Parents table aliased as p(parent).

parent is a column of Parents table aliased as ggp (great grand father).

FROM is used to query the database and get back the preferred information by specifying the table name.

parents is a table name. Three aliases named p(parent), gp(grand father) and ggp(great grand father) are created.

WHERE is used to specify a condition based on which the data is to be retrieved. The conditions are as follows:

p.parent = gp.child

gp.parent = ggp.child;

AND clause between the conditions indicate that both the conditions must be true.

Find the names of those kings or queens that were the parent of two or more kings or queens. List each such person only once.

Query:

       SELECT parent FROM Parents

       GROUP by parent

       HAVING COUNT(*) > 1;

Explanation:

SELECT is used to query the database and get back the specified fields.

parent is a column of Parents table .

FROM is used to query the database and get back the preferred information by specifying the table name.

parents is a table name.

Group by clause is used to group the data on column parent.

Having clause specifies the condition based on which the data is to be retrieved.

Find for each house the number of kings or queens of that house.

Query:

       SELECT house, COUNT(name)

       FROM Kings

       GROUP by house;

Explanation:

SELECT is used to query the database and get back the specified fields.

house is a column of Kings table .

FROM is used to query the database and get back the preferred information by specifying the table name.

Kings is a table name.

Group by clause is used to group the data on column house.

Several times in British history, kings or queens have deposed one another, so that their reigns overlapped. Find all such pairs, listing the pairs in both orders; i.e., list both (A,B) and (B,A). However, be careful not to list pairs A and B where the only overlap is that A's reign ended in the same year that B's began, or vice-versa.

Query:

      SELECT k1.name, k2.name FROM Kings k1, Kings k2

      WHERE k1.name <> k2.name

      AND k1.beginReign < k2.beginReign

      AND k2.beginReign < k1.beginReign;

Explanation:

SELECT is used to query the database and get back the specified fields.

name is a column of Kings table.

FROM is used to query the database and get back the preferred information by specifying the table name.

Kings is a table name. Two aliases named k1 and k2 are created.

WHERE is used to specify a condition based on which the data is to be retrieved. The conditions are as follows:

k1.name <> k2.name

k1.beginReign < k2.beginReign

k2.beginReign < k1.beginReign;

AND clause between the conditions indicate that both the conditions must be true.

You might be interested in
If the result is for a BART Transit Station: "Daly City Station" with the result address "Daly City,CA". What is the correct rat
Sholpan [36]

Answer:

c. Incorrect street number and correct street name

Explanation:

Bay Area Rapid Transit (BART) is a transportation system that runs along San Francisco in California. The transport system knows the streets of California because it runs on it.

The system keep on improving with time and following the trends of other transport systems in the the world, Like using the Debt cards and credit card to charge for their fares. More than 433,000 people use the transportation system in California.

From the question, The resulting address is accurate while entering ‘Dala city Station’, to the BART Transit Station, the address comes as Dala City CA 94014.

3 0
1 year ago
Lin is booting up his computer, and during the boot process, the computer powers down. After several unsuccessful attempts to bo
mel-nik [20]

Answer:

The RAM Modules.

Explanation:

If the power supply is working properly, the next thing that could cause an auto-shutdown could be the RAM.

Sometimes static electricity,  a faulty slot, or even a faulty memory module  could be causing the RAM to fail. And as the OS needs to read from the RAM in order to boot, at the moment the processor can't find the RAM information, it shuts down the system.

Changing the RAM modules to a different slot, switching slots, or cleaning the memory module pins with a regular eraser can help solve the problem. If not, then Lin might need to buy a new module, or keep going forward with the diagnostic process.

3 0
1 year ago
List three functions that you can perform with a database that you cannot perform with a spreadsheet.
Delicious77 [7]
There are some function which can be performed with database but not with a spread sheet, these functions include: 
1. Enforcement of data type.
2. Support for self documentation.
3. Defining the relationship among constraints in order to ensure consistency of data.
5 0
1 year ago
Given the macro definition and global declarations shown in the image below, provide answers to the following questions:
galben [10]

Answer:

A. 243

B. True

C. 0

Explanation:

Macro instruction is a line of coding used in computer programming. The line coding results in one or more coding in computer program and sets variable for using other statements. Macros allows to reuse code. Macro has two parts beginning and end. After the execution of statement of quiz4 x, 4 the macro x will contain 243. When the macro is invoked the statement will result in an error. When the macro codes are executed the edx will contain 0. Edx serve as a macro assembler.

4 0
1 year ago
Why is it important to back up data on a computer before you burn-in test the cpu?
katen-ka-za [31]
A burn-in test is a test which is usually performed on a system or component by running it for a long time in order to bring out any errors or system failures etc. 
While doing it on CPU the data must be backed up as any kind of error or failure may result in the loss of data, at time systems can be repaired to retrieve data but still there is no guarantee, backing up is the best option.
5 0
1 year ago
Other questions:
  • Which of the following word pairs correctly completes the sentence below?
    15·2 answers
  • In an ethernet network, the signal that is sent to indicate a signal collision is called a ________ signal.
    7·1 answer
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • Technician A says that the octane rating of gasoline is the measure of its antiknock properties. Technician B says that normal c
    5·1 answer
  • Edward has started up a new company with his friend, Matthew. Currently, he has only two people working with him. Which type of
    8·1 answer
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • What company built its first computer from a wooden box
    12·2 answers
  • If byte stuffing is used to transmit Data, what is the byte sequence of the frame (including framing characters)? Format answer
    6·1 answer
  • Java Programming home &gt; 1.14: zylab training: Interleaved input/output Н zyBooks catalog Try submitting it for grading (click
    6·1 answer
  • Which statement is true about the purpose of a work in process constraint?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!