Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

concepts of database management system

Rating
-
Sold
-
Pages
8
Uploaded on
13-08-2024
Written in
2024/2025

it gives a details of sql

Institution
Course

Content preview

Outline

 Structure of Relational Databases
 Database Schema
 Keys
 Schema Diagrams
 Relational Query Languages
 The Relational Algebra
Chapter 2: Intro to Relational Model




Database System Concepts, 7th Ed.


LICET, CSE 2.2 ©Silberschatz, Korth, Sudarshan and GK




Example of a Instructor Relation Relation Schema and Instance

 A1, A2, …, An are attributes
attributes  R = (A1, A2, …, An ) is a relation schema
(or columns)
Example:
instructor = (ID, name, dept_name, salary)
tuples  A relation instance r defined over schema R is denoted by r (R).
(or rows)
 The current values a relation are specified by a table
 An element t of relation r is called a tuple and is represented by
a row in a table




LICET, CSE 2.3 ©Silberschatz, Korth, Sudarshan and GK LICET, CSE 2.4 ©Silberschatz, Korth, Sudarshan and GK

, Attributes Relations are Unordered

 The set of allowed values for each attribute is called the domain of the  Order of tuples is irrelevant (tuples may be stored in an arbitrary order)
attribute  Example: instructor relation with unordered tuples
 Attribute values are (normally) required to be atomic; that is, indivisible
 The special value null is a member of every domain. Indicated that the
value is “unknown”
 The null value causes complications in the definition of many operations




LICET, CSE 2.5 ©Silberschatz, Korth, Sudarshan and GK LICET, CSE 2.6 ©Silberschatz, Korth, Sudarshan and GK




Database Schema Keys

 Database schema -- is the logical structure of the database.  Let K  R
 Database instance -- is a snapshot of the data in the database at a given  K is a superkey of R if values for K are sufficient to identify a unique tuple
instant in time. of each possible relation r(R)
 Example: • Example: {ID} and {ID,name} are both superkeys of instructor.
• schema: instructor (ID, name, dept_name, salary)  Superkey K is a candidate key if K is minimal
• Instance: Example: {ID} is a candidate key for Instructor
 One of the candidate keys is selected to be the primary key.
• Which one?
 Foreign key constraint: Value in one relation must appear in another
• Referencing relation
• Referenced relation
• Example: dept_name in instructor is a foreign key from instructor
referencing department




LICET, CSE 2.7 ©Silberschatz, Korth, Sudarshan and GK LICET, CSE 2.8 ©Silberschatz, Korth, Sudarshan and GK

Written for

Course

Document information

Uploaded on
August 13, 2024
Number of pages
8
Written in
2024/2025
Type
Class notes
Professor(s)
Abraham silberschatz, henry f. korth, s. sudharsha
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sathishelumalaie67

Get to know the seller

Seller avatar
sathishelumalaie67 Loyola-icam college of engineering and technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
10
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions