Question
Hi! I am creating a database using Oracle DBMS/SQL. I then have a games table which will contain information about games on the market. For
Hi! I am creating a database using Oracle DBMS/SQL.
I then have a games table which will contain information about games on the market. For example, FIFA 23 would be a game in the database that could be bought.
The game platform table I believe would link everything together (the game information and the platform information. How would I link this information to an account? What DDL/SQL would be written in order to make the connection.
For example, let's say the user "Name 1" buys the new FIFA 23 that is in the market (the game table). How would I reflect this information on their account as well as the payment method used? What DDL would be required to make that connection? I would greatly appreciate if I could get the code for it with an explanation as to how that link is made. Thanks!
CREATE TABLE account_info ( id int NOT NULL PRIMARY KEY, display_name varchar(90), email varchar(90), country varchar(56), ipaddress varchar(12) ); INSERT INTO account_info (id, display_name, email, country, ipaddress) VALUES (1, 'Name 1', '..l@test.com', 'United Kingdom', '1234'); COMMIT; CREATE TABLE account_purchases( acc_id int NOT NULL PRIMARY KEY, payment_meth varchar(50) ); INSERT INTO account_purchases (acc_id, payment_meth) VALUES (1, 'PayPal'); COMMIT; CREATE TABLE game_platform ( id int NOT NULL PRIMARY KEY, game_id int, genre_id int, publisher_id int, platform_id int ); CREATE TABLE game ( id int NOT NULL PRIMARY KEY, game_name varchar(100), genre_name varchar(75), publisher_name varchar(100) ); INSERT INTO game (id, game_name, genre_name, publisher_name) VALUES (1, 'FIFA 23', 'Simulation, Sports', 'Electronic Arts'); COMMIT; CREATE TABLE platform( id int NOT NULL PRIMARY KEY, platform_name varchar(40) ); INSERT INTO platform (id, platform_name) VALUES (1, 'Linux & SteamOS'); INSERT INTO platform (id, platform_name) VALUES (8, 'Microsoft Windows'); INSERT INTO platform (id, platform_name) VALUES (8, 'Apple macOS'); COMMIT;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started