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?
-
In what ways are the standards issued by the IAASB different from the standards issued by the AICPA and the PCAOB? In what ways are the standards issued by the IAASB consistent with the standards...
-
All things considered, should Henry lease or borrow and buy the equipment? Explain.
-
Shiloh supplies equipment to the automotive and commercial vehicle markets and other industrial customers. It specializes in materials and designs that reduce vehicle weight and increase fuel...
-
Dawson Toys, Ltd., produces a toy called the Maze. The company has recently established a standard cost system to help control costs and has established the following standards for the Maze toy:...
-
On Wednesday, February 18, Jim Elsey, cost management specialist at Deere & Company in Moline, Illinois, received a call from Glen Lowery, sales manager in the Agricultural Products Division: Jim, I...
-
The sources you find may affect your thinking on your topic, and you may discover new questions that you need to investigate in your research. Which of the questions below would be useful follow-up...
-
Edwina's accountant correctly calculated her 2 0 2 2 RRSP deduction limit to be $ 1 7 , 3 2 5 . In 2 0 2 2 , having no undeducted contributions from prior years, Edwina contributed $ 9 , 3 9 5 to her...
-
During the steelhead fishing season in north central Idaho, fishing enthusiasts flock to the Salmon river. The fish and game department recorded the distance between fishermen, in yards, on several...
-
Explain the ethical issue in the assigned scenario. Explain who the stakeholders are and the possible consequences to each stakeholder. Analyze the alternatives from the following standpoints: ( a )...
-
In the weighted interval scheduling problem, we are given n jobs, each of which has a start time, finish time, and weight. We say that two jobs are compatible if they do not overlap in time. We want...
-
Oslo Company prepared the following contribution format income statement based on a sales volume of 1 , 0 0 0 units ( the relevant range of production is 5 0 0 units to 1 , 5 0 0 units ) : Sales $ 2...
-
Name: Page of HW: 5-5-1 Using the method of composite volumes, find the centroid of the shape. Create a table to keep your calc organized. 0.25h 1.25in 4.25h 4.50 2.25 to.25" 2.75in 5.25h Answer(s):
-
A bar of a steel alloy that exhibits the stress-strain behavior shown in Figure 6.22 is subjected to a tensile load; the specimen is 375 mm (14.8 in.) long and has a square cross section 5.5 mm (0.22...
-
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...
-
Stadler Corporations federal income tax rate is 34 percent. It reports $100,000 depreciation expense on its financial statements and deducts $140,000 depreciation expense on its tax return. How...
-
Which of the following items is not deductible? a. Dues for club used solely for business meetings b. Directly related business entertainment c. Business gift of less than $25 in value d. Dues for...
-
John is a teacher at a local high school. During 2017, he travels three days per week to a school in the next county to work with gifted children in an after-school program that does not end until...
Study smarter with the SolutionInn App