Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need SQL for creating following tables. Foreign Keys are specified by bold letters, I marked the primary keys by * sign. by // sign

I need SQL for creating following tables. Foreign Keys are specified by bold letters, I marked the primary keys by * sign. by // sign i mean this is end of a table. the names inside parenthesis are the atributes, the name outside the parenthesis are the table name.

GAMER (USERNAME*, PASSWORD, FIRSTNAME, LASTNAME, EMAIL) //

CHARACTER (CHARACTER_NAME*, LEVEL, EXP, HP, MP, STRENGTH, INTLLIGENCE, DEXTERITY, CLASS, USERNAME) FOREIGN KEY USERNAME REFERENCES GAMER//

PVP_MATCH (MATCHID*, WINNER_NAME, LOSER_NAME, KILL_TIME, KILL_SCORE)

FOREIGN KEY WINNER_NAME REFERENCES CHARACTER

FOREIGN KEY LOSER_NAME REFERENCES CHARACTER//

GUILD (GUILD_NAME*, FOUNDING_TIME, STATUS)//

CHARACTER_GUILD (GUILD_NAME*, CHARACTER_NAME)

FOREIGN KEY CHARACTER_NAME REFERENCES CHARACTER

FOREIGN KEY GUILD_NAME REFERENCES GUILD//

ITEM (ITEM_NAME*, VALUE, STATUS, TYPE)//

ARMOR (ITEM_NAME*, DEFENSE, TYPE)

FOREIGN KEY ITEM_NAME REFERENCES ITEM//

ACCESSORY (ITEM_NAME*, SPECIAL EFFECTS, TYPE)

FOREIGN KEY ITEM_NAME REFERENCES ITEM//

WEAPON (ITEM_NAME*, SPEED, DPS)

FOREIGN KEY ITEM_NAME REFERENCES ITEM//

CHARACTER_ITEM (CHARACTER_NAME*, ITEM_NAME)

FOREIGN KEY ITEM_NAME REFERENCES ITEM

FOREIGN KEY CHARACTER_NAME REFERENCES CHARACTER//

SKILL (SKILL_ID*, NAME, MPCOST, LEVEL, DESCRIPTION)

CHARACTER_SKILL (CHARACTER_NAME*, SKILL_ID*) (composite key with two primary)

FOREIGN KEY SKILL_ID REFERENCES SKILL

FOREIGN KEY CHARACTER_NAME REFERENCES CHARACTER//

PREREQUISITE_SKILL (SKILL_ID*, PREREQUISITE_SKILL_ID*) [Composite primary key]

FOREIGN KEY SKILL_ID REFERENCES SKILL

FOREIGN KEY PREREQUISITE_SKILL_ID REFERENCES SKILL //

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

At what frequency will a 32.0-mH inductor have a reactance of 660?

Answered: 1 week ago