0 1. Consider the design of a database for a web site of jokes. Each joke...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
0 1. Consider the design of a database for a web site of jokes. Each joke is identified by a unique joke ID, a title, a description of the joke, the date the joke is posted, and a list of tags (each tag is a single word in lower cases). Only registered users can post, read, comment on jokes. Each registered user is identified by a user ID, a password, a first name, a last name, an email, the gender, and his/her age. A user can give at most one review for each joke, and on a particular day, the user can post at most 5 jokes and 5 reviews. Meanwhile, a joke can have no or many reviews. The review given by a user provides a score of "Excellent, Good, fair, or poor" and then a short remark. A user can modify an existing review that she/he gave earlier. One special user called "root" is designated as the administrator user. The root user can ban any other user into a black list. Once banned, a user will not be able to login into the system unless he/she is unbanned from the blacklist subsequently. In addition, each user has two dynamic lists: my favorite friends and my favorite jokes, which can be modified by the user when necessary by insert, delete or update. a). Draw an E-R diagram for the system, in particular, use arrows or thick lines to represent constraints appropriately. Write down your assumptions and justifications briefly and clearly. b). Translate the above E-R diagram into a relational model, i.e., write a set of CREATE TABLE statements. In particular, specify primary key, foreign key and other constraints whenever possible. 0 1. Consider the design of a database for a web site of jokes. Each joke is identified by a unique joke ID, a title, a description of the joke, the date the joke is posted, and a list of tags (each tag is a single word in lower cases). Only registered users can post, read, comment on jokes. Each registered user is identified by a user ID, a password, a first name, a last name, an email, the gender, and his/her age. A user can give at most one review for each joke, and on a particular day, the user can post at most 5 jokes and 5 reviews. Meanwhile, a joke can have no or many reviews. The review given by a user provides a score of "Excellent, Good, fair, or poor" and then a short remark. A user can modify an existing review that she/he gave earlier. One special user called "root" is designated as the administrator user. The root user can ban any other user into a black list. Once banned, a user will not be able to login into the system unless he/she is unbanned from the blacklist subsequently. In addition, each user has two dynamic lists: my favorite friends and my favorite jokes, which can be modified by the user when necessary by insert, delete or update. a). Draw an E-R diagram for the system, in particular, use arrows or thick lines to represent constraints appropriately. Write down your assumptions and justifications briefly and clearly. b). Translate the above E-R diagram into a relational model, i.e., write a set of CREATE TABLE statements. In particular, specify primary key, foreign key and other constraints whenever possible.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What is performance measurement?
-
Fred Nadir is planning to take a tour through Italy this summer. The tour will cost: 2,750 and includes transportation, hotels, and a guide. Fred estimates that round-trip airfare from his home in...
-
Apply the following operations on the corresponding polynomials: a. (x 3 + x 2 + x + 1) + (x 4 + x 2 + x + 1) b. (x 3 + x 2 + x + 1) (x 4 + x 2 + x + 1) c. (x 3 + x 2 ) (x 4 + x 2 + x + 1) d. (x 3...
-
Find the natural frequencies of a beam of length \(l\), which is pin connected at \(x=0\) and fixed at \(x=l\), using one beam element.
-
Melody Audio Company manufactures two models of speakers, DL and XL. Based on the following production and sales data for September 2007, prepare (a) A sales budget and (b) A productionbudget. DL XL...
-
What challenges and opportunities does neurodiversity present in workplace settings, and how can organizations create environments that are inclusive of individuals with different neurocognitive...
-
If Vs 2 V, R1 = 6 ohms, R2 = 8 ohms, and R3 = 9 ohms, the current lo (in amperes) is a. 0.3333 b. 0.6698 C. 0.7222 d. 0.7685 . 0.8519 R1 R2
-
Fill in the blank with the correct value for @Target that allows the code to compile. A. ElementType.METHOD, ElementType.CONSTRUCTOR B. ElementType.ANNOTATION_TYPE C. ElementType.CONSTRUCTOR,...
-
The market price of an Indochina Airlines bond (\($1,000\) par value) with an 8-year maturity is \($845.\) The bond pays 8 percent interest (4 percent semiannually). What is the bonds expected rate...
-
Pelwatte Sugar Industries has bonds that are selling for $1,432. The coupon interest rate on the bonds is 9.75 percent, and they mature in 23 years. What is the yield to maturity on the bonds? What...
-
On June 30, 20X5, Park Corporation incurred a $100,000 net loss from disposal of a business component. Also, on June 30, 20X5, Park paid $40,000 for property taxes assessed for calendar year 20X5....
-
Uzbekistan Airways issued bonds that pay 6.5 percent coupon interest rate. The bonds mature in 14 years. They are selling for $1,230. What would be your expected rate of return (yield to maturity) be...
-
Devons employer pays him every Friday. On April 15, 2016, Devon submits a revised W-4 to his employer. The employer is required to implement the changes by the payroll period ending on: Friday, April...
-
In Exercises 1-2, rewrite each verbal statement as an equation. Then decide whether the statement is true or false. Justify your answer. 1. The logarithm of the difference of two numbers is equal to...
-
Case 1 Adiabatic (i) Vary inlet flow rate of inert and observe the conversion and temperature profiles. Describe what you find. (ii) Find inlet temperature, T 0 , for which the reaction rate at V =...
-
The irreversible liquid-phase second-order reaction (r = kCA2) 2Ak1B k=0.03dm 3 /mols is carried out in a CSTR. The entering concentration of A, C A0 , is 2 molar, and the exit concentration of A, C...
-
The RTD for a nonideal reactor is shown in Figure P17-6B. What is the conversion predicted by the tanks-in-series model for a first-order reaction? Ak1B a. with k 1 = 0.4 min 1 ? b. with k 1 = 0.4...
-
The mean free path \(\lambda\) of a molecule of gas is the average distance it travels before collision with another molecule. It is given by \[\lambda=C \frac{m}{ho d^{2}}\] where \(m\) and \(d\)...
-
A rectangular gate (width \(w=2 \mathrm{~m}\) ) is hinged as shown, with a stop on the lower edge. At what depth \(H\) will the gate tip? Water H 0.55 m 0.45 m P3.46 Hinge Stop
-
Gates in the Poe Lock at Sault Ste. Marie, Michigan, close a channel \(W=34 \mathrm{~m}\) wide, \(L=360 \mathrm{~m}\) long, and \(D=10 \mathrm{~m}\) deep. The geometry of one pair of gates is shown;...
Study smarter with the SolutionInn App