0% found this document useful (0 votes)
11 views8 pages

Experiment 1

Data Base Management System 1

Uploaded by

lakshyasantani14
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)
11 views8 pages

Experiment 1

Data Base Management System 1

Uploaded by

lakshyasantani14
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/ 8

‭Batch:‬‭C-3‬ ‭Roll No.:‬‭16014223049‬ ‭Experiment No.

:‬‭01‬

‭ im:‬‭Formulation of a problem definition for specific‬‭real world DMS system and Drawing‬
A
‭ER/EER diagram for the same‬‭.‬

‭Resources needed:‬‭MS-office‬

‭Theory:‬

‭ ntity‬ ‭relationship‬ ‭model‬ ‭is‬ ‭a‬ ‭data‬ ‭model‬ ‭which‬ ‭represent‬ ‭the‬ ‭overall‬ ‭logical‬
E
‭structure‬‭of‬‭a‬‭database‬‭and‬‭it‬‭is‬‭very‬‭useful‬‭in‬‭mapping‬‭the‬‭meanings‬‭and‬‭interactions‬
‭of real world enterprises onto a conceptual schema.‬

‭ he E-R model employs three basic notations:‬


T
‭Entity‬ ‭sets:‬ ‭An‬ ‭entity‬ ‭set‬ ‭is‬ ‭a‬ ‭set‬ ‭of‬ ‭entities‬ ‭of‬ ‭the‬ ‭same‬ ‭type‬ ‭that‬ ‭share‬ ‭the‬ ‭same‬
‭properties .(an entity is a real world object)‬
‭Relationship‬ ‭sets:‬ ‭Relationship‬ ‭set‬ ‭is‬ ‭a‬ ‭set‬ ‭of‬ ‭relationships‬ ‭of‬ ‭the‬ ‭same‬
‭type.(relationship is an association among several entities)‬
‭Attributes:‬‭Attributes‬‭are‬‭properties‬‭of‬‭entity‬‭set‬‭used‬‭to‬‭describe‬‭it.‬‭Different‬‭types‬
‭of attributes are composite, multivalued, derived and simple.‬

I‭ n‬‭extended E R model‬‭we have three additional concepts:‬


‭Specialization:‬ ‭The‬ ‭process‬ ‭of‬ ‭designating‬ ‭the‬ ‭subgroupings‬‭within‬‭an‬‭entity‬‭set‬‭is‬
‭called specialization( finding specialized attributes)‬
‭e.g.‬ ‭in‬ ‭entity‬ ‭set‬ ‭person‬ ‭we‬ ‭have‬ ‭two‬ ‭types‬‭of‬‭entities‬‭like‬‭customer‬‭and‬‭employee.‬
‭Both‬ ‭are‬ ‭person‬ ‭but‬ ‭employee‬ ‭have‬ ‭specialized‬ ‭attribute‬ ‭salary‬ ‭and‬ ‭customer‬ ‭have‬
‭rating.‬
‭Generalization:‬ ‭It‬ ‭is‬ ‭a‬ ‭top‬ ‭down‬ ‭design‬ ‭process‬ ‭in‬ ‭which‬ ‭multiple‬ ‭entity‬ ‭sets‬ ‭are‬
‭synthesized into a higher level entity set on the basis of common features.‬
‭e.g.‬ ‭customer‬ ‭entity‬ ‭set‬ ‭and‬ ‭employee‬ ‭entity‬ ‭set‬ ‭both‬ ‭have‬ ‭common‬ ‭attributes‬ ‭like‬
‭name,‬ ‭address,‬ ‭age‬ ‭which‬ ‭can‬ ‭be‬ ‭used‬ ‭as‬‭attributes‬‭of‬‭higher‬‭level‬‭entity‬‭set‬‭person.‬
‭Aggregation:‬ ‭it‬ ‭is‬ ‭an‬ ‭abstraction‬ ‭through‬ ‭which‬ ‭relationships‬ ‭are‬ ‭treated‬ ‭as‬ ‭higher‬
‭level entities.‬
‭The‬‭most‬‭important‬‭use‬‭of‬‭the‬‭E-R‬‭diagram‬‭is‬‭it‬‭represents‬‭some‬‭constraints‬‭like‬‭total‬
‭and‬ ‭partial‬ ‭participation,‬ ‭one‬ ‭to‬ ‭one,‬ ‭many‬ ‭to‬ ‭many,‬ ‭many‬ ‭to‬ ‭one,‬ ‭one‬ ‭to‬ ‭many‬
‭mapping etc.‬
‭Symbols used in EER diagram:‬
‭Procedure:‬

‭Identify the real world objects to start drawing the diagram‬


‭1.‬ ‭Entity – An real world object which can be converted into table name.‬
‭2.‬ ‭Entity type – It defines the collection of similar type of entities.‬
‭3.‬ ‭Attributes‬‭–‬‭Properties‬‭of‬‭entity‬‭which‬‭describes‬‭the‬‭entity.‬‭Attributes‬‭are‬‭of‬‭different‬
‭types‬
‭a.‬ ‭Atomic Attributes‬
‭b.‬ ‭Composite Attributes‬
‭c.‬ ‭Single valued attributes‬
‭d.‬ ‭Multivalued Attributes‬
‭e.‬ ‭Derived Attributes‬
‭4.‬ ‭Relationship‬ ‭–‬ ‭When‬ ‭one‬ ‭entity‬ ‭refers‬ ‭to‬ ‭another‬ ‭entity‬ ‭type‬ ‭a‬ ‭relationship‬ ‭exists‬
‭between the two entities.‬
‭5.‬ ‭Relationship‬ ‭types‬ ‭–‬ ‭A‬ ‭relationship‬ ‭type‬ ‭R‬ ‭among‬ ‭n‬ ‭entity‬ ‭types‬ ‭defines‬ ‭a‬ ‭set‬ ‭of‬
‭associations among entities of other types.‬
‭6.‬ ‭Weak entity – the entity depends on another entity is called as weak entity.‬
‭7.‬ ‭Specialization‬ ‭–‬ ‭this‬ ‭is‬ ‭process‬‭of‬‭defining‬‭a‬‭set‬‭of‬‭subclasses‬‭of‬‭an‬‭entity‬‭type‬‭.It‬‭is‬
‭derived from a super class depending upon different attributes.‬
‭8.‬ ‭Generalization‬‭–‬‭It‬‭is‬‭the‬‭process‬‭of‬‭abstraction‬‭in‬‭which‬‭we‬‭suppress‬‭the‬‭differences‬
‭among‬‭several‬‭entity‬‭types‬‭grouping‬‭some‬‭entities‬‭and‬‭eliminating‬‭common‬‭features.‬
‭We generalize them into a single super class.‬
‭a.‬ ‭Disjoint – In this, entity can be a member of any one of the subclass‬
‭b.‬ ‭Overlap – In this, entity can be a member of more than one subclass.‬
‭c.‬ ‭Total – All the entities are member of any one of the subclasses.‬
‭d.‬ ‭Partial – Entity is not a member of any one the subclass.‬
‭9.‬ ‭Union – the subclass represent collection of objects.‬

‭ his detailed problem statement gives the clarification about the database design.‬
T
‭This‬‭is‬‭tool‬‭to‬‭find‬‭out‬‭missing‬‭functional‬‭dependencies‬‭to‬‭convert‬‭the‬‭schema‬‭to‬‭the‬
‭appropriate normal form.‬

‭ ormulate‬‭the‬‭problem‬‭definition‬‭to‬‭get‬‭the‬‭detailed‬‭description‬‭of‬‭the‬‭problem‬‭domain‬‭so‬
F
‭that entities can be easily identified from the problem definition.‬

‭There are many components used into EER.‬


‭1.‬ ‭First find out the real world objects as entities.‬
‭2.‬ ‭Find out the attributes which will describe the object.‬
‭3.‬ ‭Find the relationships and the participation constraints.‬
‭4.‬ ‭Apply‬ ‭object‬ ‭oriented‬ ‭fundamentals‬ ‭and‬ ‭get‬ ‭the‬ ‭specialization‬ ‭and‬ ‭generalization‬
‭objects.‬
‭5.‬ ‭Draw the diagram‬
‭Results: (Document printout/handwritten)‬

1‭ .‬‭Problem definition‬
‭2.‬‭ER/EER diagram‬
‭Example:‬
‭Problem Definition for COMPANY database system‬
‭The‬ ‭company‬ ‭is‬‭organized‬‭into‬‭DEPARTMENTs.‬‭Each‬‭department‬‭has‬‭a‬‭name,‬‭number‬‭and‬
‭an‬ ‭employee‬ ‭who‬ ‭manages‬ ‭the‬ ‭department.‬ ‭We‬ ‭keep‬ ‭track‬ ‭of‬ ‭the‬ ‭start‬ ‭date‬ ‭of‬ ‭the‬ ‭department‬
‭manager.‬
‭Each‬ ‭department‬ ‭controls‬ ‭a‬‭number‬‭of‬‭PROJECTs‬‭.‬‭Each‬‭project‬‭has‬‭a‬‭name,‬‭number‬‭and‬‭is‬
‭located at a single location.‬
‭It‬ ‭stores‬ ‭each‬ ‭EMPLOYEE’s‬ ‭social‬ ‭security‬ ‭number,‬ ‭address,‬ ‭salary,‬ ‭gender,‬‭and‬‭birthdate.‬
‭Each‬ ‭employee‬ ‭works‬ ‭for‬ ‭one‬ ‭department‬ ‭but‬ ‭may‬ ‭work‬ ‭on‬ ‭several‬ ‭projects.‬ ‭It‬ ‭keep‬ ‭track‬ ‭of‬ ‭the‬
‭number‬‭of‬‭hours‬‭per‬‭week‬‭that‬‭an‬‭employee‬‭currently‬‭works‬‭on‬‭each‬‭project.‬‭We‬‭also‬‭keep‬‭track‬‭of‬
‭the‬‭direct supervisor‬‭of each employee.‬
‭Each‬‭employee‬‭may‬‭have‬‭a‬‭number‬‭of‬‭DEPENDENTs.‬‭For‬‭each‬‭dependent,‬‭we‬‭keep‬‭track‬‭of‬
‭their name, gender, birthdate, and relationship to employee.‬

‭Outcomes:‬‭Learn how to plot an Entity Relationship‬‭Model for a given problem statement.‬


‭Problem Statement :‬

‭ eople who are new to a state, city, or country often struggle to find the ideal type of food they crave.‬
P
‭This can lead to several challenges:‬

‭●‬ P ‭ ersonalized recommendations based on your dietary preferences, such as vegetarian, vegan,‬
‭gluten-free, etc.‬
‭●‬ ‭Trying local restaurants or food stalls that may lack hygiene and quality standards.‬
‭●‬ ‭Spending significant amounts of money at expensive hotels without enjoying the taste and‬
‭food quality.‬
‭●‬ ‭Resorting to fast food from large franchises, which can lead to unhealthy eating habits and‬
‭weakened immunity.‬

‭ eatures we provide :‬‭To address these issues, we‬‭propose developing a modern restaurant locator‬
F
‭system with the following advanced features:‬

‭●‬ L ‭ ocate the Best Restaurants :‬‭Discover top-rated restaurants‬‭in your area known for serving‬
‭your preferred cuisine and flavors.‬
‭●‬ ‭Affordable and Delicious Options : Find delicious, homely meals within your budget,‬
‭avoiding hefty expenses.‬
‭●‬ ‭Online Ordering and Table Reservations : Enable online ordering and table reservations to‬
‭eliminate waiting times upon arrival.‬
‭●‬ ‭Enhanced Dining Experience : Ensures a memorable dining experience by matching‬
‭preferences for ambiance, music, and seating arrangements.‬
‭●‬ ‭Detailed Insights : Provide information on food quality, customer service, recent reviews, and‬
‭cooking techniques.‬
‭ dvantages for both Restaurants and Customers :‬‭Such‬‭a modern restaurant locator system offers‬
A
‭substantial benefits to both restaurants and customers:‬

‭●‬ B ‭ oosts Restaurant Visibility and Sales : Enhances the visibility and sales potential of‬
‭restaurants.‬
‭●‬ ‭Satisfies Cravings : Helps customers find the exact type of food they desire.‬
‭●‬ ‭Ensures Convenience : Provides the most convenient dining options.‬
‭●‬ ‭Support for Local Businesses: Promotes local restaurants and small businesses, contributing‬
‭to the local economy and community.‬
‭●‬ ‭Saves Time and Effort: Saves time by providing accurate information on nearby dining‬
‭options, reducing the need for extensive research and exploration.‬
‭●‬ ‭Cultural Exploration: Facilitates cultural exploration by recommending authentic local‬
‭eateries and hidden gems that tourists might overlook.‬

‭ By integrating these features, the Restaurant Finder aims to revolutionize how people‬

‭explore and enjoy dining experiences, ensuring satisfaction and culinary enjoyment wherever‬
‭they go.”‬
‭Questions:‬

‭Q1 Explain total and partial participation with example‬

‭Q2 Differentiate between Primary key and Unique key‬

‭Answers :‬

‭Ans 1.‬

‭ otal Participation-‬‭It specifies that each entity‬‭in the entity set must compulsorily participate in at‬
T
‭least one relationship instance in that relationship set also called mandatory participation. Total‬
‭participation is represented using a double line between the entity set and relationship set.‬

‭ artial Participation-‬‭It specifies that each entity‬‭in the entity set may or may not participate in the‬
P
‭relationship instance in that relationship set also called as optional participation. Partial participation‬
‭is represented using a single line between the entity set and relationship set.‬

‭Ans 2 .‬

‭Primary Key‬ ‭Unique Key‬


‭●‬ A ‭ Primary Key identifies each record as an‬ ‭●‬ A ‭ Unique Key avoids duplicate entries‬
‭individual record.‬ ‭except for NULL.‬
‭●‬ ‭A Primary Key value cannot be Null.‬ ‭●‬ ‭A Unique Key can have a Null value.‬
‭●‬ ‭There can only be one Primary Key.‬ ‭●‬ ‭There can be multiple Primary Keys.‬
‭Entity Relation Diagram :‬

You might also like