6. (4 points) You need to create a second table called hw2tlogevents, which keep
ID: 3793300 • Letter: 6
Question
6. (4 points) You need to create a second table called hw2tlogevents, which keeps tracking ofthe time spans during which each user has logged on to the system. create the following table first, do not populate data, for you are going to populate this table in a new way. Note that the first column eventide serves as the primary key for second table, and the userid serves as the foreign key to the table By attacking this problem, you will study how to use foreign key to connect the relate userid to the userid from the previous table. hw2tlog events eventid number) userid (varchar2(10) timespan (number User1 50 User2 ser1 User User2Explanation / Answer
Answer to your first question:
CREATE TABLE hw2tlogevents(
PRIMARY KEY(eventid) INT,
userid VARCHAR(10) references secondTable(userid),
timespan INT
);
For your second more information is needed.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.