代做CS6083, Spring 2025 Project #1代写数据库编程

Computer Science and Engineering

CS6083, Spring 2025

Project #1 (due April 27)

April 14, 2025

You are hired by a startup company to help build the database backend for a new web-based service, similar to Pinterest,  that allows people to maintain online “pinboards” with pictures that they find and like and want to share with others. Users  can sign up for the service, and can then create one or more pinboards.  Later, users can “pin” pictures that they find on  the web or upload themselves, and these pictures then become visible on one of their pinboards.  Users can also “repin” pictures that they nd on other user’s pinboards, which adds them to their own boards. Users can also follow other people’s  pinboards, and can invite users to be their friends. Finally, users can “like” pictures they find on other boards, and can add  short comments to other’s pictures.

As an example, consider two users, Erica and Timmy. Erica likes to travel, and also loves antique furniture.  She signs up and creates two pinboards, “Furniture” and “Dream Vacations” . Whenever she sees a picture on the web that she likes and wants to show to her friends, say a picture of a nice sofa on an website, or a picture of a beautiful beach, she pins it to one of her boards. Erica also has friends who often look at her images and sometimes like the pictures or leave comments such as Cute” or love it!” . Timmy is seven years old, likes dinosaurs and monsters, and when he grows up he wants to become a pirate. He creates boards named “Super Dinosaurs” and “Pirates” and whenever he sees a picture of dinosaurs or pirates (or even better, dinosaurs and pirates) he pins it to his boards.  He also follows several pinboards by others that have a lot of pictures of monsters and dinosaurs – to do so he defines a ‘follow stream” called “Monsters and Dinosaurs” containing pictures from four other boards that he follows. He also sometimes repins some of these pictures so they appear on his own board. For simplicity, we assume that all boards, pictures, pins, and likes are visible to everyone, and that all pictures could be repinned and liked by any other user. However, a user’s follow stream is private.

So this describes the basic idea behind the system. (You may also explore services such as Pinterest to get the idea.) In this first part of the course project, you will have to design the relational database schema that stores all the information about users, boards, pictures, friendships, follow streams, repins, likes, and comments. In the second part of the project, you have to design a web-accessible interface that makes this system usable for real users.

You should use your own database system on your laptop or an internet-accessible server. Use a system that supports text operators such as like and contains. Both parts of the project may be done individually or in teams of two students. However, you have to decide on a partner and email the TAs with your names by Monday, April 21.  The second part of the project will be due a few days before the final exam. Note that the second project builds on top of this one, so you cannot skip this project.

Before starting your work, you should think about what kind of operations need to be performed, and what kind of data needs to be stored. For example, there should be a login page, a page where a user can sign up for the rst time (by supplying an email address and choosing a user name), and a page where users can create or update their profiles.  Users should be able to create pinboards, ask other users to become friends, and should be able to answer friend requests.  They should be able to pin pictures they find on the web, or which they upload themselves. They should be able to repin and like pictures. For simplicity, we assume that all boards, pictures, pins, and likes are visible to everyone, and that all pictures could be repinned and liked by any other user.  However, people may decide to only allow their friends to comment on pictures on their board (this is a setting they can choose for each board).  When a user likes a picture, this is counted as a like of the original pin of the picture, not of a particular repinning of the picture.  However, comments about a repinned picture are only associated with the repinned and not the original picture. Users may also use keyword queries to search for pictures, by matching against their tags, and the system would then return pictures matching the keywords sorted by either time, relevance, or number of likes.

Some words about pinning and repinning, which will mainly be important for the second part of the project. When a user pins a picture on the web, she should supply the URL of the image, the URL of the page in which the image was found, and a few tags (e.g., “couch, brown, modern’, ikea). The system should also download and store the picture itself in the database as a blob (in case the image changes later or is removed from the original site).  If the user uploads an image, the system would store the image on its site, assign a URL to the image, and then pin that URL. When a user repins (or re-repins etc.) an image, this does not result in a copy of the picture, but isjust a pointer to the picture as it was first pinned, with the same URL and tags, and if the first pinner removes it, it should become inaccessible everywhere it was repinned. Of course, the same picture might be originally pinned by several users, possibly under different URLs, and you do not have to remove such duplicate pictures. Also, ideally images would be pinned using a button on your browser that is provided as a browser plugin, but you do not have to do this as part of this project, so your system will probably require users to paste URLs into a dialog box.

Two more remarks: First, it is recommended to always store time stamps for any action such as pinning, liking, commenting, as real services use such log information for later data mining. Second, you should of course not use database permissions or views to implement user identification. There will not be a separate DBMS account for each user, but the web interface and application itself will log into the database. So, the system you implement can see all the content, but has to make sure at the application level that each logged-in user is identified through the use of cookies in the second part of the project.

Project Steps and Deliverables: In the following, we describe the suggested steps you should take for this project, and the associated deliverables.  You should approach this project like one of the design problems in the homeworks, except that the schema may end up being a bit more complicated.  You should spend some time carefully designing sample data that allows you to test some of the functionality. Note again that in this first problem, you will only deal with the database side of this project - a suitable web interface will be designed in the second part.  However, you should already envision, plan, and maybe describe the interface that you plan to implement. The suggested steps are as follows:

(a) Design, justify, and create an appropriate relational database schema for the above scenario.  Make sure your schema is space efficient, and suitably normalized.  Show an ER diagram of your design, and a translation into relational format. Identify keys and foreign key constraints. Provide a short discussion of any assumptions that you made in your design, and how they impact the model. Note that you may have to revisit your design if it turns out later that the design is not suitable.

(b) Use a database system to create the database schema, together with key, foreign key, and other constraints.

(c) Write SQL queries (or sequences of SQL queries) for the following tasks.

(1)  Signing Up, Creating Boards, and Pinning: Write queries that users need to sign up, to login, to create or edit their profile, to create pinboards, to pin a picture, and to delete a pinned picture.

(2)  Friends: Write queries for asking another user to be friends, and for answering a friend request.

(3)  Repinning and Following:  Write queries for repinning a picture and for creating a follow stream.  Also, write a query that given a follow stream, displays all pictures belonging to that follow stream in reverse chronological order.

(4)  Liking and Commmenting: Write queries to like a picture, and to add a comment to a picture (while making sure the user is allowed to comment on this picture).

(5)  Keyword Search: Write a query to perform. a keyword search for pictures whose tags match the keywords. Use the contain operator to do so.

(d) Populate your database with some sample data, and test the queries you have written in part (c).  Make sure to input interesting and meaningful data and to test a number of cases. Limit yourself to a few users and a few messages and threads each, but make sure there is enough data to generate interesting test cases. It is suggested that you design your test data very carefully. Draw and submit a little chart of your tables that fits on one or two pages and that illustrates your test data! Print out and submit your testing.

(e) Document and log your design and testing appropriately.  Submit a well-written description and justification of your entire design, including ER diagrams, tables, constraints, queries, procedures (if any), and tests on sample data.  Your documentation should be a comprehensive paper, including introduction, explanations, ER and other diagrams, and more (typically about 8-12 pages). This paper will be expanded in the second part of the project.





热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图