Ask a question from expert

Ask now

Database System: Entities, Attributes, Relationships, and Normalization

This task requires students to design a database and provide related SQL queries based on a set of business scenarios.

19 Pages1425 Words294 Views
   

Added on  2023-05-27

About This Document

This text explains the concepts of entities, attributes, relationships, and normalization in database systems. It provides examples of tables and SQL queries and emphasizes the importance of avoiding anomalies and reducing redundancy. The text also covers the implementation of a database for an art gallery and a university.

Database System: Entities, Attributes, Relationships, and Normalization

This task requires students to design a database and provide related SQL queries based on a set of business scenarios.

   Added on 2023-05-27

BookmarkShareRelated Documents
Database System: Entities, Attributes, Relationships, and Normalization_1
pg. 1
Database System: Entities, Attributes, Relationships, and Normalization_2
Question 1
Exercise 1
The database to be implemented at the Saffron Gallery has various entities and attributes. The
entities have the various relations between each other. The entities in the database will include
Work, Artist, and Visitors. These entities have attributes that describe that describe them fully in
order to be identified.
Work is one of the entity of the database it has a barcode, title, and description as attributes. The
barcode is the primary key of the entity it uniquely identifies any description that is given in this
entity. The title is another property of this entity that describes the type of the job in this case
the.It is of datatype text [1]. The title, in this case, can include painting, sculptures, and e.t.c. The
description is of datatype text gives a clear definition of the entity.
Artist is the second entity in the database its attributes include name, address, and contact. The
name is of datatype text.Address attribute describes the location of the artist and is of datatype
varchar. Contact attribute is of datatype integer they give details on how the artist can be
reached.
Visitors entity contains attributes such name, address, phone and the barcode id that is given to
them. Name attribute is of datatype text, the address is of datatype varchar while phone number
is of data type integer.
Relationship
The entities, in this case, have different types of relationship.
The relationship between artist and work is one too many, meaning that one artist may be
involved in working in different categories of jobs.
The relationship between visitors and work is many to many.Meaning that different visitors may
visit various categories of work at any given point.
pg. 2
Database System: Entities, Attributes, Relationships, and Normalization_3
Exercise 2
The diagram shows a clear relationship between the entities
Exercise 3
Artist
The above table was created using the below script.
CREATE TABLE IF NOT EXISTS `Artist` (
`Name` TEXT(255) NOT NULL,
`Address` VARCHAR NOT NULL,
`Contact` INTEGER (10)NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
pg. 3
Database System: Entities, Attributes, Relationships, and Normalization_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Assignment on Database PDF
|14
|2236
|34

Database Design and Implementation
|24
|3777
|335

Business Rules for Database (CSC72001)
|10
|771
|17

Introduction of DBMS (Database Management System)
|28
|2805
|27