0% found this document useful (0 votes)
17 views12 pages

IT305

The document outlines the development of a Database Management System for Notown Records, aimed at efficiently managing data related to artists, instruments, songs, albums, and locations. It details the project's objectives, scope, team, and timeline, along with the entity-relation diagram and database schema, which includes tables for musicians, instruments, songs, albums, places, and telephones. Additionally, it describes the constraints and data types used to ensure data integrity and relationships among the various entities.

Uploaded by

a25665305
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)
17 views12 pages

IT305

The document outlines the development of a Database Management System for Notown Records, aimed at efficiently managing data related to artists, instruments, songs, albums, and locations. It details the project's objectives, scope, team, and timeline, along with the entity-relation diagram and database schema, which includes tables for musicians, instruments, songs, albums, places, and telephones. Additionally, it describes the constraints and data types used to ensure data integrity and relationships among the various entities.

Uploaded by

a25665305
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/ 12

IT 305

Assignment 1 Draft
Instructor: Twana Shareef
By: Abdulrahman Hussain Ali
21/Oct/2023
Contents
Project Overview........................................................................................................................................3
1.1 Advantage and Effect:.......................................................................................................................3
Project Scope..........................................................................................................................................4
Project Team...........................................................................................................................................4
Timeline..................................................................................................................................................4
Entity – Relation Diagram...........................................................................................................................5
Explanation.............................................................................................................................................6
Relationships:..........................................................................................................................................7
Relation Database Schema.........................................................................................................................8
Data Type Selection..................................................................................................................................10
Constraints Implementation.....................................................................................................................11
Project Overview

Project Name: Notown Records Database Management System

Project Objective: The major objective of this project is to develop and maintain a complete
database management system for Notown Records that efficiently arrange and handles
information on artists, instruments, songs, albums, locations, and phone records. Data retrieval
and management should be streamlined, interactions between different firm entities should be
facilitated, and data integrity should be guaranteed by the database system.
Important characteristics:
1. Data Storage: By storing details on artists, instruments, tracks, albums, locations, and phone
numbers, Notown Records is able to keep a centralized and orderly database of data.
2. Data Integrity: The system makes sure that the data is correct and consistent by enforcing
data integrity through the use of primary keys, foreign keys, and constraints.
3. Relationship Management: It oversees intricate connections between various entities,
including those that are many-to-many between artists and instruments, artists and songs, and
many-to-many between artists and producers, albums and songs, phones and locations, etc.
4. Search and Retrieval: Users may easily locate information about performers, albums, songs,
and more thanks to the system's effective search and retrieval capabilities.
5. Producer Information: Specifically, the system tracks the association between albums and the
musicians who produce them, ensuring that each album is linked to its respective producer.
6. Telephone and Address Linking: Telephone records are linked to specific places (addresses),
providing a means to organize contact information and link telephones to locations.

Advantage and Effect:


Numerous important advantages are offered by the Notown Records Database Management
System:
• Improved Data Management: It makes information easier to keep, retrieve, and update by
streamlining the organization's data management procedures.
• Better Decision-Making: The system helps the business to make well-informed choices by
providing accurate and well-organized data.
• Data Integrity: Constraints and keys are used to make sure the data is trustworthy and
consistent.
• Relationship Management: For a music production company such as Notown Records, the
database system plays a critical role in efficiently managing intricate relationships
.• Efficiency: Users save time and resources by being able to obtain the information they
require fast.

Project Scope: The database system's design, development, and implementation are all included in
this project. It offers features for data entry, data retrieval, and the creation of an intuitive user interface
for controlling the database. The project's scope may also include ongoing upkeep and assistance.

Project Team: A cross-functional team from Notown Records that includes database designers,
developers, administrators, and end users may be involved in the project.

Timeline: Depending on the system's complexity and particular requirements, the project's timeline
may change. Phases such as database design, development, testing, and deployment could be included
Entity – Relation Diagram
Explanation:

Musicians Table
This table serves as the core of the database, containing data about musicians. It is structured
with the musician's Social Security Number (SSN) as the primary key, ensuring each musician
has a unique identifier. The "Name" attribute stores the musician's name.

instrument Table
The information about musical instruments is gathered in the instrument table. A distinctive
"instrId" is used to identify each instrument. The "key" feature keeps track of the instrument's
related musical key, such as C or B-flat. The name of the instrument is stored in the "Dname"
element.

Songs Table
This table serves as a repository for song-related data, with "SongId" acting as the primary key.
The song's title is stored in the "Title" element, and the author's name is kept in the "Author"
attribute.

Album Table
This table stores information on albums and uses "albumIdentifier" as its main key. It includes
crucial details including the title, album speed, and copyright date. The "ProducerSSN" feature
also creates a connection to the musician in charge of the album's production, guaranteeing a
one-to-many linkage between albums and producers.

Place Table
This table focuses on representing physical locations or addresses. Each address is uniquely
identified by the "Address" attribute, which serves as the primary key.

Telephone table
This table contains phone numbers, with "Phone_no" serving as the primary key. In order to
preserve correspondence between phone numbers and addresses, the "Address" attribute
serves as a foreign key, creating a connection between phone numbers and certain locations.
Relationships:

- Musicians plays Instrument (Many-to-Many):


A many-to-many relationship is established between musicians and instruments via the
"MusiciansInstruments" table. This allows for the representation of the fact that musicians can
play multiple instruments, and each instrument can be played by multiple musicians.

- Musicians perform songs (Many-to-Many):


Similarly, a many-to-many relationship is captured between musicians and songs through the
"MusiciansPerformSongs" table. This accommodates the scenario where musicians may
perform multiple songs, and each song may be performed by various musicians.

- Each song appears on one album:


To ensure that each song is associated with one specific album, the "AlbumID" foreign key is
included in the "Song" table, enforcing this one-to-many relationship.

- Each album is produced by one musician:


The "ProducerSSN" attribute in the "Album" table establishes a one-to-many relationship
between albums and the musicians who produce them. Each album has precisely one
associated producer.

- Musicians live in a home:


While not explicitly implemented in a separate table, the implication is that musicians'
addresses stored in the "Musicians" table represent their homes.

- Every telephone is associated with a place (address):


The foreign key "Address" in the "Telephone" table ensures that each telephone number is
connected to a specific address or place, facilitating the organization of contact information.
Relation Database Schema
First, we should create all tables:

CREATE TABLE Musicians (

SSN CHAR(9) PRIMARY KEY,

Name VARCHAR(255)

);

CREATE TABLE Instrument (

instrID INT PRIMARY KEY,

Key VARCHAR(10),

Dname VARCHAR(50)

);

CREATE TABLE Song (

SongID INT PRIMARY KEY,

Title VARCHAR(255),

Author VARCHAR(255)

);

CREATE TABLE Album (

albumIdentifier INT PRIMARY KEY,

CopyrightDate DATE,

Speed INT,

Title VARCHAR(255),

ProducerSSN CHAR(9),

FOREIGN KEY (ProducerSSN) REFERENCES Musicians (SSN)

);

CREATE TABLE Place (

Address VARCHAR(255) PRIMARY KEY


);

CREATE TABLE Telephone (

Phone_no VARCHAR(15) PRIMARY KEY,

Address VARCHAR(255),

FOREIGN KEY (Address) REFERENCES Place (Address)

);

Create the MusiciansInstruments table (for the many-to-many relationship)

CREATE TABLE MusiciansInstruments (

MusicianSSN CHAR(9),

InstrumentID INT,

FOREIGN KEY (MusicianSSN) REFERENCES Musicians (SSN),

FOREIGN KEY (InstrumentID) REFERENCES Instrument (instrID),

PRIMARY KEY (MusicianSSN, InstrumentID)

);

Create the MusiciansPerformSongs table (for the many-to-many relationship)

CREATE TABLE MusiciansPerformSongs (

MusicianSSN CHAR(9),

SongID INT,

FOREIGN KEY (MusicianSSN) REFERENCES Musicians (SSN),

FOREIGN KEY (SongID) REFERENCES Song (SongID),

PRIMARY KEY (MusicianSSN, SongID)

);

Create a foreign key constraint to ensure each song appears on exactly one album

ALTER TABLE Song

ADD COLUMN AlbumID INT,

ADD FOREIGN KEY (AlbumID) REFERENCES Album (albumIdentifier);


Data Type Selection

1. Musicians Table:

- SSN: CHAR(9) - Social Security Numbers (SSN) typically consist of 9 characters, making CHAR(9) an
appropriate choice to store them.

- Name: VARCHAR(255) - Names can vary in length, so VARCHAR(255) provides flexibility to store
names of different lengths.

2. Instrument Table:

- instrID: INT - An integer data type is suitable for a unique instrument identifier.

- Key: VARCHAR(10) - Musical keys are typically represented as short strings (e.g., C, B-flat), and
VARCHAR(10) allows for flexibility in storing various key values.

- Dname: VARCHAR(50) - Instrument names are text descriptions, and VARCHAR(50) is sufficient for
most instrument names.

3. Song Table:

- SongID: INT - An integer data type is appropriate for a unique song identifier.

- Title: VARCHAR(255) - Song titles can vary in length, so VARCHAR(255) accommodates titles of
different lengths.

- Author: VARCHAR(255) - Author names can vary in length, so VARCHAR(255) provides flexibility.

4. Album Table:

- albumIdentifier: INT - An integer data type is suitable for a unique album identifier.

- CopyrightDate: DATE - Copyright dates are best represented as dates, and DATE is used for date-
related operations.

- Speed: INT - Assuming "Speed" represents a numerical attribute, INT is a suitable choice for an
integer value.
- Title: VARCHAR(255) - Album titles can vary in length, so VARCHAR(255) is used to store them.

- ProducerSSN (Foreign Key): CHAR(9) - To ensure that the "ProducerSSN" references an existing SSN in
the Musicians table, it uses the same data type (CHAR(9)).

5. Place Table:

- Address: VARCHAR(255) - VARCHAR(255) is commonly used for storing addresses, accommodating a


wide range of address lengths.

6. Telephone Table:

- Phone_no: VARCHAR(15) - Phone numbers can vary in length, and VARCHAR(15) allows for the
storage of different phone number formats.

- Address (Foreign Key): VARCHAR(255) - To ensure that "Address" references an existing address in
the Place table, it uses the same data type (VARCHAR(255)).

Constraints Implementation

a) I have applied the following constraints:

- Primary Key constraints to ensure uniqueness and identify primary keys for SSN, instrID, SongID,
albumIdentifier, Address, and Phone_no.

- Foreign Key constraints to enforce referential integrity in the relationships between tables (e.g.,
ProducerSSN in the Album table and AlbumID in the Song table).

- A unique constraint on Phone_no to ensure that each telephone number is unique within the
Telephone table.

b) The reasons for each constraint's inclusion:

- Primary Key constraints ensure that each primary key is unique within its respective table, allowing
for efficient data retrieval.

- Foreign Key constraints maintain referential integrity, ensuring that relationships between tables are
accurate and that related data exists.

- The unique constraint on Phone_no prevents duplicate phone numbers within the Telephone table,
helping to maintain accurate and unique phone records.
c) I have added the following ALTER statement to introduce a foreign key constraint to ensure that each
song appears on exactly one album. This constraint helps enforce the one-to-many relationship between
songs and albums

You might also like