0% found this document useful (0 votes)
7 views2 pages

CS 435 Assingment No 2

Cs 435p

Uploaded by

yaseen ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

CS 435 Assingment No 2

Cs 435p

Uploaded by

yaseen ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CS 435 –Database Systems, Assignment 2

This is an individual assignment (part 1 can be a group work, please write your partners name in the
submission).
A database company called ArtBase builds a product for art galleries. The core of this product is a
database with a schema that captures all the information that galleries need to maintain.
Galleries keep information about artists, their names (which are unique), birthplaces, age and style of art.
For each piece of artwork, the artist, the year it was made, its unique title, its type of art (e.g. painting,
lithograph, sculpture, photograph), and its price must be stored. Pieces of artwork are also classified into
groups of various kinds, for example, portraits, still lifes, works by Picaso, or works of the 19th century; a
given piece may belong to more than one group. Each group is identified by a name (like those just given
above) that describes the group. Finally, galleries keep information about customers. For each customer,
galleries keep that person’s unique name, address, total amount of dollars spent in the gallery, and the
artists and groups of art that the customer tends to like.

A relational schema corresponding to description and ER diagram is given below.


ARTIST (AName, Birthplace, Age, Style)
ARTWORK (Title, Year, Type, Price, AName)
CUSTOMER (CustId, CName, Address, Amount)
GROUP (GName)
CLASSIFY (Title, GName)
LIKE_GROUP (CustID, GName)
LIKE_ARTIST (CustID, AName)
1. Implement this schema in the MySQL database instance. Save your DDLs in Gallery.sql script file.
Consider the following points while working on this section.
• It’s important that both primary key constraints as well as foreign key constraints are enforced.
• You can assume that all String type attribute values will contain less than 100 characters and
use appropriate numeric data types for amount and price.
2. Write a client side implementation to access this database using any of your favorite programming
language.
3. Following functionality needs to be implemented  Add an artist to the database.
• Add a customer to the database.
• Add an artwork to the database.
o Add the new artwork to the table ARTWORK.
o Check if there is a group in the GROUP table with the given group name. If not add a
record with the given group name.
o Finally add an entry to the table CLASSIFY with the title of the artwork and the group
name.
• Add records to LIKE_GROUP table.
o It queries the classify table for the records with the same group name and extracts out
the artworks for those records.
o Then it queries for the artist names of these artworks.
o Finally it should add records to the LIKE_ARTIST table combining the artist’s name
and customer id if that combination is not already recorded.
• Implementing update functionality for the style field of artist o It should update the style
field of the artist record identified by the given artist’s name to the new style value.
• Reading from the database. There is a set of read operations that should be implemented for
certain tables to create a report. o Get the list of artists. o Get the list of artworks. o
Get the list of groups. o Get the list of classify entries. o Get the list of
like group entries.
o Get the list of like artist entries.

Your final deliverable should include the following.


• Complete source code.
• A Help file (explaining how to run your program)
• MySQL DDLs in Gallery.sql
• Upload everything in a zip file by the due date.

You might also like