Basics of Relational Database .


108 views
Uploaded on:
Category: Music / Dance
Description
Essentials of Social Database. Yong Choi Institute of Business CSUB, Bakersfield. Study Targets. Comprehend the social database model's fundamental segments are elements and their characteristics, and connections among substances
Transcripts
Slide 1

Essentials of Relational Database Yong Choi School of Business CSUB, Bakersfield

Slide 2

Study Objectives Understand the social database model\'s fundamental parts are elements and their properties, and connections among elements Identify how elements and their qualities are sorted out into tables Understand idea of honesty guidelines of social database

Slide 3

Relational Model In the social information demonstrate the database is spoken to as a gathering of related tables. The social information model was presented in 1970 by E. F. Codd of IBM distributed a paper in CACM entitled "A Relational Model of Data for Large Shared Data Banks". It is as of now the most prominent model. The numerical effortlessness and simplicity of perception of the social information display have added to its prosperity.

Slide 4

Formal social term Informal reciprocals connection table tuple line or record cardinality number of lines quality segment or field degree number of segments (one of a kind) identifier Primary key area pool of legitimate qualities Definitions of Terminology

Slide 5

Characteristics of a Relation (table) Two-dimensional structure with lines and segments A connection speak to a solitary substance Each table must have a credit to extraordinarily distinguish each line Column values all have same information sort Order of the lines and sections is unimportant to the DBMS

Slide 6

Properties of a Relation Based on the set hypothesis 1. There are no copy tuples (columns). The body of the connection is a numerical set (i.e., an arrangement of tuples), and sets in arithmetic by definition do exclude copy components. On the off chance that a "relation" contains copy tuples, then it is not a connection .

Slide 7

Properties of a Relation 2. Tuples (lines) are unordered (start to finish). Sets in arithmetic are not requested. Along these lines, regardless of the possibility that a connection A\'s tuples are contrarily requested, it is as yet a similar connection. In this manner, there is no such thing as "the fifth tuple" or the last tuple . At the end of the day, there is no understanding of positional tending to.

Slide 8

Properties of a Relation 3. Qualities (sections) are unordered (left to right). The heading of a connection is additionally characterized as a set. There is no such thing as "5th property (column)" or the last characteristic.

Slide 9

Properties of a Relation 4. All characteristic qualities are nuclear . At each line and-section position inside the table, there dependably exists decisively one esteem , never a rundown of qualities. Or, on the other hand proportionally, relations don\'t contain rehashing bunches. A connection fulfilling this condition is said to be in First Normal Form .

Slide 10

Primary Key A PK is a trait, or accumulation of characteristics, whose qualities particularly recognize each tuple in a connection. To being one of a kind, a PK must be insignificant (contain no pointless traits) and must not change in esteem .

Slide 11

Primary Key (con\'t) One quality, or gathering of traits, that can fill in as a PK is called competitor ke y , And the rest of the keys that can\'t be utilized as a PK are called substitute key . Cost of PK SS# versus unique finger impression

Slide 12

StateAbbrev StateName StateNumber StateBird StatePopulation CT Connecticut 5 American Robin 3,287,116.00 MI Michigan 26 Robin 9,295,297.00 SD South Dakota 40 Phesant 696,004.00 TN Tennessee 16 Mockingbird 4,877,185.00 TX Texas 28 Mockingbird 16,986,510.00 Candidate Key and Alternate key State Could any characteristic (section) fill in as the PK? hopeful key Is there any property that ought not be filled in as the PK? substitute key

Slide 13

Entity Integrity Rule Guarantees that every element will have an interesting personality and guarantees that outside key qualities can appropriately reference essential key qualities. Necessity No segment of the essential key is permitted to acknowledge nulls. By "null" here, we imply that data is absent for reasons unknown.

Slide 14

Foreign Key A property in one table whose qualities should either coordinate the essential key in another table or be invalid. Characteristic FK of base connection R2 is a remote key if and just on the off chance that it fulfills the accompanying two time-autonomous properties: Each estimation of FK is either entirely invalid or completely non-invalid. Each non-invalid estimation of FK is indistinguishable to the estimation of PK in some tuple of R1.

Slide 15

Foreign Key (con\'t)

Slide 16

Referential Integrity Rule The database must not contain any unmatched outside key qualities. Similarly as essential key qualities speak to element identifiers, so outside key qualities speak to substance references. The referential trustworthiness decide basically says that if B references A, then An unquestionable requirement exist.

Slide 17

Referential Integrity Enforcement Restriction: does not permit any cancellation Nullification: if esteem is erased, reference esteem will set to be invalid. Falling: if esteem is erased, reference esteem will likewise be erased. in the event that esteem is refreshed, reference esteem will likewise be refreshed. Default esteem: if esteem is erased, reference esteem will be have default esteem, which is given by the framework.

Slide 18

Access DB Referential Integrity Cascade Update Related Fields Change of PK values in essential table  programmed change of FK qualities Cascade Delete Related Fields Delete of a record in the essential table  programmed erase of all records in the related table that have a coordinating FK esteem

Recommended
View more...