Prologue to Database Systems CS363/607* Lecture #2Slide 2
Last class What is a database? What is a DBMS? Database history DBMS segments Terminology Data model, pattern, information, DDL, DML, DBA Relational database frameworkSlide 3
Entity-Relationship Model The E/R model permits us to outline the configuration of a database casually. Plans are pictures called element relationship outlines . Genuinely mechanical procedure to change over E/R graphs to genuine executions like social databases exist.Slide 4
Database displaying procedureSlide 5
Entity Sets Entity = âthingâ, a theoretical object or some likeness thereof. Like an article in item arranged dialects. Substance set = a gathering of comparable elements. Like a class in item situated dialects. Samples: understudies, films, starsSlide 6
Attributes = properties of the substances in an element set. By and large, all elements in a set have the same properties. Traits are basic qualities, e.g. whole numbers or character strings. Illustrations: studentNo, accountNoSlide 7
Relationships are associations among two or more element sets. Case: Entity: Star, motion picture Relation: Star-in A film substance m is identified with a star element s by the relationship star-in if s shows up in motion picture mSlide 8
E/R Diagrams In an element relationship chart: Each element set is spoken to by a rectangle. Every quality of an element set is spoken to by an oval, Relationships are spoken to by jewels Edges are utilized to interface a substance to its properties furthermore join a connection boat to its element sets.Slide 9
Example Entity set Beers has two properties, name and producer. Every Beer substance has values for these two characteristics, e.g. (Budweiser, Anheuser-Busch) name maker BeersSlide 10
name addr name manf Bars Beers Sells Bars offer a few brews. permit Drinkers like a few lagers . Frequents Likes Note: permit = lager, full, none Drinkers visit a few bars . Consumers name addr ExampleSlide 11
Entity Set and Relationship Set The current âvalueâ of a substance set is the arrangement of elements that have a place with it. Case: the arrangement of all bars The âvalueâ of a relationship is an arrangement of arrangements of at present related elements, one from each of the related element sets.Slide 12
Example Bar Beer Joeâs Bar Budweiser Joeâs Bar Miller Sueâs Bar Budweiser Sueâs Bar Peteâs Ale Sueâs Bar Bud LiteSlide 13
Example name telephone ID Students stature Each understudy has four characteristics: ID, name, telephone, tallnessSlide 14
Example Students Courses Sally C131 Sally C363 Joe M130 â¦ â¦ Taking Students CoursesSlide 15
Example: An occurrence The individuals from the relationship set are the table\'s lines. For Instance, (Basic Instinct, Sharon Stone) Is a tuple in the relationship set for the present example of relationship Star-inSlide 17
Binary Relationship A paired relationship can interface any individual from one of its element sets to any individuals from the other substance set. It is the least complex relationship which just interfaces two substance sets. Illustration Student ClassSlide 18
Many-Many Relationships In a numerous relationship, a substance of either set can be joined with numerous elements of the other set. Case: Think of a relationship between two element sets, for example, Sells in the middle of Bars and Beers . A bar offers numerous brews; a lager is sold by numerous bars.Slide 19
Many-One Relationships Some double connections are numerous - one starting with one substance set then onto the next. Every element of the first set is associated with at most one element of the second set. Be that as it may, a substance of the second set can be joined with zero, one, or numerous elements of the first set.Slide 20
Example Favorite , from Drinkers to Beers is numerous one. A consumer has at most one most loved lager. Be that as it may, a brew can be the most loved of any number of consumers, including zero.Slide 21
One-One Relationships In an one-one relationship, every element of either substance set is identified with at most one element of the other set. Case: Relationship Best-merchant between substance sets Manufacturers and Beers . A brew can\'t be made by more than one producer, and no maker can have more than one hit( (accept no ties).Slide 22
Example Runs Studios PresidentsSlide 23
Representing âMultiplicityâ Show a numerous one relationship by a bolt entering the âoneâ side. Demonstrate an one-one relationship by bolts entering both substance sets. In a few circumstances, we can likewise declare âexactly one,â i.e., every element of one set must be identified with precisely one element of the other set. To do as such, we utilize an adjusted bolt.Slide 24
numerous many numerous one one-one In Picture Representation of Many-One E/R: bolt indicating âone.â Rounded bolt = âexactly one.âSlide 25
Example Likes Drinkers Beers FavoriteSlide 26
Example Consider Best-vender in the middle of Manufacturers and Beers . A few brews are not the smash hit of any producer so an adjusted bolt to Manufacturers would be unseemly. However, a maker needs to have a blockbuster( (we expect they are lager producers).Slide 27
In the E/R Diagram Best-vender Manufacturers BeersSlide 28
Roles Sometimes a substance set seems more than once in a relationship. Mark the edges between the relationship and the element set with names called parts .Slide 29
Relationship Set Husband Wife Bob Ann Joe Sue â¦ â¦ Married spouse wife Drinkers ExampleSlide 30
Attributes on Relationships Sometimes it is valuable to connect an ascribe to a relationship. Think about this characteristic as a property of tuples in the relationship set.Slide 31
value Sells Bars Beers value Prices Sells Bars BeersSlide 32
Multiway Relationships Sometimes, we require a relationship that interfaces more than two element sets. Assume that consumers will just drink certain lagers at specific bars. Our three twofold connections Likes, Sells, and Frequents don\'t permit us to make this qualification. Yet, a 3-way relationship would.Slide 33
name addr name manf Bars Beers permit Preferences Drinkers name addr ExampleSlide 34
Bar Drinker Beer Joeâs Bar Ann Miller Sueâs Bar Ann Budweiser Sueâs Bar Ann Peteâs Ale Joeâs Bar Bob Budweiser Joeâs Bar Bob Miller Joeâs Bar Cal Miller Sueâs Bar Cal Bud Lite A Typical Relationship SetSlide 35
Example Contract Stars Movies Studios (Studio, Star, Movie)Slide 36
BBP The-Bar The-Beer The-Price Bars Beers Price Converting Multiway to 2-Way Many-one connections from the uniting E.S. to the others.Slide 39
A four-way relationshipSlide 40
Subclasses A substance set contains certain elements that have extraordinary properties not connected with all individuals from the set. Subclass = extraordinary case = less substances = more properties. Case: Ales are a sort of lager. Not every lager is a beer, but rather some are. Give us a chance to assume that notwithstanding every one of the properties (qualities and connections) of lagers, lagers likewise have the characteristic shading .Slide 42
Subclasses in E/R Diagrams Assume subclasses frame a tree. I.e., no various legacy. Isa triangles demonstrate the subclass relationship. Point to the superclass.Slide 43
Example Beers name producer isa Ales shadingSlide 44
E/R Vs. Article Oriented Subclasses In the item arranged world, items are in one class just. Subclasses acquire properties from superclasses. Conversely, E/R substances have parts in all subclasses to which they have a place. Matters when we change over to relations.Slide 46
Peteâs Ale Example Beers name manf isa Ales shadingSlide 47
Exercise 1 Let us plan a database for a bank, including data about clients and their records. Data around a client incorporates their name, address, telephone, and SSN. Records have numbers, sorts and equalizations. We likewise need to record the clients who own a record. Draw the E/R outline for this database. Make sure to incorporate bolts where suitable, to showing the variety of a relationship.Slide 48
Summary E/R model Elements of E/R model Entity sets Attributes Relationships Entity-Relationship graph Binary and multiway connections Roles Converting multiway to twofold subclassSlide 50
Design guideline Faithfulness Avoiding excess Simplicity checks Choosing the right connections Picking up the right sort of componentsSlide 51
Faithfulness The configuration must be steadfast to the particulars, which is, substance sets and their traits ought to mirror the truth Examples: Stars in the middle of stars and motion pictures Teaches in the middle of courses and educators Stars-in Stars Movies Teaching Courses educatorsSlide 52
Avoiding repetition Not illicit, yet unsafe in light of the fact that: Take more space to store Increase unpredictability, may bring about irregularity Example: studioname claims Studios Movies name addressSlide 53
Simplicity Less components is great Example: Represents possesses Movies Holdings Studios claims Movies StudiosSlide 54
Choosing the right connections Entity sets can be associated with different connections, including more in the outline is bad on the grounds that: Redundancy More space utilization Modifying turns out to be more perplexingSlide 55
Example Stars-in Movies Stars Contracts possesses StudiosSlide 56
Another case Stars-in Movies Stars Works-for claims StudiosSlide 57
Picking the right sort of components by and large, an ascribe is less difficult to execute that an element set or a relationship, on the other hand, yo
ASP Instructional exercise HTML Structure to Database Network Database Availability (1 of 3) You ...
A database-driven Web webpage is a Web website that uses a database to accumulate, show, or ... ...
Disappointments may leave database in a conflicting state with fractional upgrades completed ... ...
Two-level Architecture: e.g. customer projects utilizing ODBC/JDBC to speak with a database. Thr ...
7. Outer/calculated illustration. The ANSI/SPARC Architecture of a Database Environment. 8 ... i ...
Database Architecture. Database Management System Architecture. Database Capabilities ... The wo ...
Before begin to discuss database structural planning note that in any information model, it is c ...
Motivation behind Database Systems. In the good 'ol days, database applications were fabricated ...
Overseeing information documents requires that the information be stayed up with the latest. ... ...
<version> SQL server JDBC driver default. Window Preferences Data ... Make Database Connections ...
You Plan For Your Code To Change. Why Do You Act Like Your Database Doesn\'t?. Automatic respons ...
Chapter 13 Client/Server Database and Distributed Database. Fundamentals of Database Manageme ...
Develop a search statement for searching a database?. First, you need to understand what a da ...
DATABASE CONCEPTS. Leo Mark College of Computing Georgia Tech (January 1999). Course Cont ...
The twenty-four/seven database Oracle Database Security. David Yahalom Senior database cons ...
DATABASE MANAGEMENT SYSTEMS. BASIC CONCEPTS 1. What is a database? A database is a collecti ...
2. Layout. DefinitionsSelecting a dbmsSelecting an application layerRelational DesignPlanningA n ...
In this Lecture. Course InformationDatabases and Database SystemsSome HistoryThe Relational Mode ...
Dept of Computing Science, University of Aberdeen. 2. In this address you will learn. Database f ...