1answer.
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
Alecsey [184]
3 years ago
8

Write the SQL statements that define the relational schema (tables)for this database. Assume that person_id, play_id, birth_year

, and year_written are all integers, and that name, title, author, and character_name are strings. Be sure to define appropriate keys and foreign key constraints.
Computers and Technology
1 answer:
Sunny_sXe [5.5K]3 years ago
4 0

Answer:

  • SQL statement that defines table for Actor

CREATE TABLE Actor(

person_id integer primary key,

name varchar2(40) not null,

birth_year integer check ((birth_year) <= 2019)

);

  • SQL statement that defines table for Play

CREATE TABLE Play(

play_id integer primary key,

title varchar2(60) not null,

author varchar2(60) not null,

year_written integer check ((year_written) <= 2019)

);

  • SQL statement that defines table for Role

CREATE TABLE Role (

person_id integer,

character_name varchar2(60) not null,

play_id integer,

constraint fk_person foreign key (person_id) references actor(person_id),

constraint fk_play foreign key (play_id) references play(play_id),

primary key (person_id, character_name, play_id)

);

Explanation:

Other information that were not added to the question are as below:

The following database contains information about three tables i.e. actors, plays, and roles they performed.

Actor (person_id, name, birth_year)

Play (play_id, title, author, year_written)

Role (person_id, character_name, play_id)

Where: Actor is a table of actors, their names, and the year they were born. Each actor has a unique person_id, which is a key.

Play is a table of plays, giving the title, author, and year written for each play. Each play has a unique play_id, which is a key.

Role records which actors have performed which roles (characters) in which plays.

Attributes person_id and play_id are foreign keys to Actor and Play respectively.

All three attributes make up the key since it is possible for a single actor to play more than one character in the same play

Further Explanation:

In SQL, in order to define relational schema (Tables) for a database, we use CREATE TABLE statement to create a new table in a database.  The column parameters specify the names of the columns of the table.  The datatype parameter specifies the type of data the column can hold (varchar, integer, date)

You might be interested in
Playstation network live updates pes 2018 does it cost extra
omeli [17]
It will probably cost extra
3 0
3 years ago
Interpretations of​ Moore's law assert​ that:
jonny [76]

Answer:

Option (D) is the correct answer of this question.

Explanation:

Moore's Law relates to Moore's theory that the number of transistors on a microchip doubles every two years while device costs are halved.

Interpretations  of Moore's law assert the computing power doubles every 18 months.The Moore's Law theory states that development is exponential.Moore's Law states that every couple of years we should expect our computers to increase their speed and capacity and we'll pay less for them.h

Option(A),Option(B) ,Option(c) and option(E) do not belongs to Moore's law  so these options are incorrect options.

5 0
3 years ago
Which of the following statements is/are correct? a. At the network layer, entitlement can map identity and/or attributes to fun
AlekseyPX

Answer:

Option D

Explanation:

An Entitlement is an option to utilize, get to or devour an application or asset, commonly for a charge. For instance, a client may buy an Entitlement to utilize an application in ceaselessness (a "unending" permit), or they may buy a period restricted option to utilize an application, (for example, a one-year membership permit).

7 0
3 years ago
Computers are often referred to as _____.
GalinKa [24]
Smart machines I'm pretty sure
4 0
2 years ago
A hard disk has four surfaces (that's top and bottom of two platters). Each track has 2,048 sectors and there are 131,072 (217)
marysya [2.9K]

Answer:

128 GB

Explanation:

Here, we are interested in calculating the total capacity of the disk.

From the question, we can identify the following;

Number of surfaces = 4

Tracks per surface = 131,072

Number of sectors = 2,048

Each Block size = 512 bytes

Mathematically;

Total data capacity of the disk = no of tracks * no of sectors * block size

= 131,072 * 2048 * 512 bytes

= 2^17 * 2^11 * 2^9 bytes = 2^37 bytes

1 GB = 2^30 bytes

So 2^37 = 2^7 * 2^30

= 128 GB

8 0
2 years ago
Other questions:
  • Most programming languages provide loop statements that help users iteratively process code. In Coral you can write loops that h
    15·1 answer
  • In the processes tab of task manager, the ____ tab displays the âworking setâ of a process, or the amount of memory it is active
    12·1 answer
  • 5. The hazardous component in most antifreeze is _____, which is extremely toxic to humans and animals. A) Calcium Carbonate B)
    13·2 answers
  • Data arranged and stored in a data set
    9·1 answer
  • Dust buildup inside a desktop PC case can be managed effectively by ____.
    7·2 answers
  • Vhich economic impact of computers was mentioned in this lesson?
    6·1 answer
  • What are the most commonly found items in the trash according to the Municipal Solid Waste report?
    12·2 answers
  • What is an advantage of cross-brace bridge​
    10·1 answer
  • Collisions occur when one output is mapped to two inputs. <br><br> A. True <br> B. False
    7·2 answers
  • Phoebe is a Counselor who is trying to schedule a meeting with one of her patients. Which best describes an inappropriate locati
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!