0% found this document useful (0 votes)
22 views4 pages

IDS 521 - HW1

Uploaded by

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

IDS 521 - HW1

Uploaded by

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

IDS 521 - HW1

Naman Sreyas Goda - 657659623

1. Define each of the following terms:


a. An entity:
An entity refers to a unit of data that the system tracks and stores. It can range from basic
information like a customer’s name and address to more complex data such as orders or
invoices. Typically, an entity consists of several attributes, which are the specific pieces of data
that define it. Types of entities are: Strong entities and Weak entities.

b. Entity set:
In a database management system (DBMS), an entity set is a group of similar entities. Each
entity has attributes that help define it, and these attributes can be used to establish constraints
or conditions. Entity sets are typically defined by a database administrator (DBA) or other IT
personnel. Entity sets are utilized to represent real-world objects like customers, products, or
orders. They can also be used to model abstract concepts, such as profit margins or customer
satisfaction levels.

c. Entity-Relationship model:
An ER model is a framework which uses the concepts to represent the structure of a database.It
visually depicts the relationships between different entities in a system, including their attributes
and their relationships.The three main components of an ER model are: entities, attributes, and
relationships. The ER model is most commonly represented by ER diagrams.

d. Entity instance:
Every single occurrence of an entity type is considered to be an entity instance. For example an
Entity Student can have many student instances.

e. Relationship type
Relationship type defines the representation of data between the entity set in the E-R model. It
is generally categorised depending upon the cardinality i.e — the number of instances of one
entity that can or must be associated with each instance of another entity and the degree of the
relationships i.e the number of entity types that participate in it.
Types based on Cardinality
● One-to-one relationship - each entity in one set is associated with one entity in another
set.
● One-to-many relationships - One entity in one set can be associated with multiple
entities in another set.
● Many -to-one relationship - Multiple entities in one set can be associated with single
entity in the other set.
● Many - to -many relationships
Degree of relations
● Unary
● Binary
● Ternary

f. Relationship set - refers to the mathematical representation of relationships between multiple


entities in an entity set. They are represented by diamonds in ER diagrams

g. Strong entity type - an entity which is not dependent on any other entity.

h. Weak entity - an entity which cannot exist on its own and is dependent on Strong entity

i. Multivalued attribute - an attribute which can hold multiple values for a single entity. For
example multiple addresses or phone numbers for a single employee.

j. Binary relationship - It is the relationship between two different entities. There are 3 types of
binary relationships:
● One-to-one: instance of one entity is related with only one instance of another entity.
● One-to-many: one instance of one entity is related to many instances of a second entity.
And many instances group of the second entity is mapped to only one instance of the
first entity.
● Many-to-many: One instance group of one entity is related to many instances group of
second entity and one instance group of the second entity is related to many instances
group of the first entity.

k. Unary relationship - a relationship is called unary when the entity is related to itself. For
example, an employee who manages other employees forms a unary relationship where both
the entities are the same.

l. Tertiary relationship - here, three different entities are involved in a relationship which makes
the relationship degree = 3.

m. Business rules - Business rules are provided to direct the business and lead the progress
of the objective. They provide logical schema that database designers follow during the
development of the database. These rules also help maintain integrity and accuracy of data.

n. Metadata - It refers to the information about the data stored in the database. Usually the
information is represented in metadata tables where the attributes of the entities are described
with their names, data types, and constraints.

2. Why must some identifiers be composite rather than simple?


In order to accurately represent the entities we want to model in a relational database and
ensure that data is uniquely and correctly recorded, it is crucial to use identifying keys that
consist of multiple attributes, rather than relying on single values alone.
3. Describe the difference between composite attributes and multivalued attributes. Give
some examples.
● Composite attributes: attributes which can be broken down into smaller sub-attributes,
each having unique values and are independent.
Example: an address can be broken down into Street name, city, state, country, and zip
code.
Essentially, a complex attribute is the combination of multiple, smaller attributes to form a
more complex data field.
● Multivalued attributes: attributes that can hold multiple values for a single entity is called
a multivalued attribute.
Example: A “smartphone” entity could have a “memory size” attribute that allows
available multiple memory storage size options.

4. Describe general steps for data modeling for designing a database. Choose any
business or operation model/application for a database and start data modeling (define at
least two objects/entities, define business rules for the operation, relationships,
attributes/data fields, and detail metadata tables).

Coffee Shop - Small Business

General steps for data modeling for designing a database:


1. Gathering information for the business model.
2. Data modeling: defining components of the business model.
3. Identify entities: describe and mention entities for the business running.
4. Define attributes: attributes are defined for every entity.
5. Primary keys are defined.
6. Metadata is created for the entities and their characteristics are defined.
7. ER diagram is designed.

Data model: The coffee shop sells coffee, pastries, and cookies. At any given time, there is one
employee who takes customer orders.

Entities:
1. Products: these are the menu options for the customers to choose from. Here, they
serve different varieties of coffee, pastries, and cookies.
2. Employee: At a given time, there is one employee tending to the customers.
3. Customers: Customers choose from the available options in the menu, and wait for their
service.
4. Inventory: this is the entity referring to the storage of the shop which has safety stock
and additional products.
Business rules for the operation:
● Customers can choose from multiple available options and place their order. This is a
one-to-many relationship.
● The employee tends to multiple customers. This is a one-to-many relationship.
● The employee works with multiple products in the store. This is a one-to-many
relationship.
● The employee takes care of the inventory. This is a one-to-many relationship.
● Availability of inventory is directly related to the availability of items on the menu. This is
a many-to-many relationship.

Metadata Table:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy