Introduction to Relational Databases — Transcript
Full transcript
- 0:00foreign
- 0:07welcome back we are now in the next
- 0:10chapter where we are going to focus on
- 0:12relational databases in this
- 0:15presentation we are going to focus on
- 0:17the introduction to relational databases
- 0:19in chapter 1 of this lecture series we
- 0:23have seen a lot of data models what is a
- 0:26data model it is the underlying
- 0:28structure of a database and actually
- 0:30this data model is a conceptual tool for
- 0:33describing the data the relationship
- 0:35among the data the data semantics and
- 0:38the data constraints if you are directly
- 0:41watching this lecture I request you to
- 0:43navigate to the first chapter of this
- 0:45playlist and please do watch the lecture
- 0:47title data models and we have seen the
- 0:50various categories of data models the
- 0:52relational model The Entity relationship
- 0:55model the object-based data model and
- 0:57the semi-structured data model in this
- 1:00chapter we are going to exclusively
- 1:01focus on the relational databases where
- 1:04relational databases follow those
- 1:06relational model if you are clear with
- 1:08relational model then understanding
- 1:10relational databases is easy so why
- 1:13waiting let's see the basic structure of
- 1:16relational databases
- 1:18what is a database basically a database
- 1:21is a collection of tables and we know
- 1:24what is a table a table is actually a
- 1:26data structure that is used to describe
- 1:28the data in rows and columns are tables
- 1:31going to store only data no tables
- 1:35represent both data and the relationship
- 1:37I will explain you suppose if you have a
- 1:40table with four attributes obviously we
- 1:42store all the data in the tables and
- 1:45this table is actually described by rows
- 1:47and columns let's take I am talking
- 1:49about a student table and this student
- 1:51table contains multiple attributes or
- 1:54columns let's take only two columns roll
- 1:56number and name say for example if roll
- 1:59number is 101 or 101 and the name of the
- 2:03person is Muhammad Khan so if You
- 2:05observe here the relationship is the
- 2:07roll number one out one is pertaining to
- 2:09the student Muhammad Khan or in other
- 2:12words Muhammad Khan is having the roll
- 2:14number 101 or 101 so what does it mean
- 2:18this means there exists a relationship
- 2:21among the values that are stored in the
- 2:23table in other words when you have a row
- 2:25each value in a row is having
- 2:28relationship among other values and not
- 2:31only this tables can also be used to
- 2:33maintain the relationship among other
- 2:36tables say for example an advisor table
- 2:39can be used to maintain the relationship
- 2:41between a student table and an
- 2:43instructor table no worries I will
- 2:46explain that shortly and that's why I
- 2:48have mentioned here as tables represent
- 2:51both the data and the relationship among
- 2:54the data present in the table now in
- 2:56relational model are we going to refer
- 2:58this as table no we are going to refer
- 3:01this as relation then why the term we
- 3:04are using for representing tables as
- 3:06relation in relational model because
- 3:09there is a close association between the
- 3:11dbms concept the table and the
- 3:14mathematical concept the relation and
- 3:16that's why in relational model we use
- 3:19the term relation instead of referring
- 3:21it as tables any way we will talk about
- 3:23this elaborately in the coming lectures
- 3:25for now just understand a table in
- 3:28relational model or a table in
- 3:30relational databases are referred as
- 3:32relation basically relations are tables
- 3:35but the important thing to note here is
- 3:37it has a very close association with the
- 3:40mathematical concept called relations
- 3:43anyway you will understand about this
- 3:45when we see the concepts relational
- 3:47algebra and relational calculus in the
- 3:49coming lectures for now just understand
- 3:51a relation in relational database
- 3:54management system is basically a table
- 3:56only but we can apply many mathematical
- 3:59operations on relations when you compare
- 4:02with the table then what about the rows
- 4:04and columns a row in a relation is
- 4:07referred as Tuple and a column in a
- 4:09relation is referred as attribute in a
- 4:12table we represent rows and columns in
- 4:14relation we represent it as Tuple and
- 4:17attributes remember a tuple is basically
- 4:20a row in a relation and coming to
- 4:23attribute this is actually the column in
- 4:26a relational database management system
- 4:27and we have already talked about
- 4:29instances and schemas what is an
- 4:32instance the data present in the
- 4:34database at a particular moment we call
- 4:36it as an instance in relational database
- 4:38we call it as relation instance what we
- 4:41mean by this this relation instead sense
- 4:43refers to a specific instance of a
- 4:45relation it means a specific set of rows
- 4:48for example if you are referring to a
- 4:50specific set of rows in a relation then
- 4:52this is referred as relation instance
- 4:55and coming to the next important Concept
- 4:57in relational database which is the
- 4:59domain what is a domain it is actually a
- 5:03set of permitted values I'll give you an
- 5:06example let's take we are talking about
- 5:08a banking database and let's assume this
- 5:11banking database is a relational
- 5:12database let's also assume this bank has
- 5:15five branches only five branches the
- 5:18branches are in New York Washington San
- 5:21Francisco Chicago and Austin or whenever
- 5:24we see a value in the database against
- 5:26the branch then only these five values
- 5:30are permitted what are the values New
- 5:32York Washington San Francisco Chicago
- 5:34and Austin let's say someone is trying
- 5:37to insert a row into the table with the
- 5:40value Los Angeles obviously Los Angeles
- 5:42is not a set of permitted values because
- 5:44there is no branch called Los Angeles
- 5:46for that particular Bank in that case
- 5:49that particular value is not belonging
- 5:51to a set of values right so that is what
- 5:54we call as a domain basically a domain
- 5:57is a set of parameter values and please
- 6:00see here an important question when a
- 6:03domain is said to be atomic the answer
- 6:06to this question should be known by all
- 6:08database administrators because this is
- 6:10going to be playing a crucial role in
- 6:12relational databases so let's understand
- 6:14what do you mean by atomic a domain is
- 6:17said to be Atomic if the elements in the
- 6:20domain are considered to be indivisible
- 6:23let's say we have a column in the table
- 6:25as the phone number this phone number if
- 6:28it is considered as a single value then
- 6:31it is an indivisible unit and we can say
- 6:33that this phone number is atomic in
- 6:35nature instead if we consider phone
- 6:37number has multiple units like country
- 6:40code area code and the local number in
- 6:42that case this phone number is referred
- 6:44as non-atomic so please be noted that
- 6:47when a domain is said to be Atomic in
- 6:49nature when the elements of the domain
- 6:52are considered to be indivisible so in
- 6:55the domain example we have taken Branch
- 6:57name right the branch name that we have
- 6:59taken our New York City Washington San
- 7:01Francisco Chicago and Austin all these
- 7:04are indivisible in nature so we can
- 7:06quote that the values present in the
- 7:08branch name is atomic in nature because
- 7:11it cannot be divided further and another
- 7:14important thing to note about the
- 7:16relational database is this null values
- 7:19what is the null value remember this
- 7:21null value is not a blank value or empty
- 7:24spaces or no value or no characters null
- 7:28values in dbms is a special value which
- 7:31represents that the value is either
- 7:33unknown or that does not exist I'll give
- 7:36you an example let's take if a student
- 7:38has no phone number in that case we
- 7:41cannot give 0 as the phone number
- 7:43because 0 is not an all value at the
- 7:45same time it may be added in the future
- 7:48so a student who is not having a phone
- 7:50number in the database the phone number
- 7:53column for that particular student it
- 7:55should be a null value because it is
- 7:58either unknown or does not exist I will
- 8:01elaborate about the concept of null
- 8:03values when the course progresses and
- 8:05I'll ask you a question will the
- 8:07relations are generally sorted in nature
- 8:09or unsorted in nature
- 8:11the relations are generally unsorted in
- 8:14nature the reason for this I'll explain
- 8:16you in the following slides let's take
- 8:18an example relation the example we are
- 8:21going to take here is the instructor
- 8:23relation which contains four attributes
- 8:25instructor ID instructor name Department
- 8:28name and salary and can you see here we
- 8:31have some rows here this is actually a
- 8:34tuple in relational database 34586 the
- 8:37instructor ID is pertaining to John who
- 8:40is working for the Department biology
- 8:42who is drawing a salary of 65 000. now
- 8:46the instructor ID of John is 34586 and
- 8:5034586 is actually John and that's why I
- 8:53told you a row in a table or a tuple in
- 8:56a relation represents the relationship
- 8:59among a set of values and this is about
- 9:02the instructor relation I'll show you
- 9:05one more relation the student relation
- 9:07in the student relation we have four
- 9:09attributes student ID student name
- 9:11student department and the total credits
- 9:14earned by the student so far we have
- 9:17seen two relations instructor relation
- 9:19and student relation let's assume these
- 9:21two relations are a part of university
- 9:23database what is a database it's a
- 9:25collection of table in this case we are
- 9:27assuming student table or student
- 9:29relation and instructor relation are
- 9:31part of university database how the
- 9:34relationship between the tables or
- 9:35relations are established it is also
- 9:38achieved using another relation I'll
- 9:41show you that now in this case we can
- 9:43see that the advisor is a relation that
- 9:46contains exactly two columns the student
- 9:48ID and the instructor ID the advisor for
- 9:51the student who is having the student ID
- 9:53103 is 25252 what do we mean by this it
- 9:58means I'll go to the previous slide 103
- 10:01is B and the instructor for the student
- 10:04B is Alia
- 10:0725252 that is what is mentioned here the
- 10:11student with the student ID 103 is B and
- 10:14the student base advisor is alya who is
- 10:17having the instructor ID 25252 and this
- 10:20is how the relationship among multiple
- 10:22tables or relations are maintained in
- 10:25the relational database management
- 10:26system
- 10:27before we sign out let's see a homework
- 10:30question here is the course relation
- 10:32this course relation has course ID the
- 10:35title the department name and credits
- 10:37and what I am asking you to do is just
- 10:40try to figure out the relationship
- 10:42between the student relation or the
- 10:44instructor relation with this course
- 10:46relation
- 10:47so this will definitely help you how
- 10:50these relationships are maintained in
- 10:52the database also I am going to answer
- 10:54you one more question whether the
- 10:56relations are sorted or unsorted if you
- 10:59see here I have just shown you an
- 11:01example where the course ID is actually
- 11:03sorted here because this course ID is
- 11:06actually sorted alphabetically B biology
- 11:09followed by computer science followed by
- 11:11electrical engineering followed by
- 11:13Finance followed by history followed by
- 11:16music and then physics so this is
- 11:18alphabetically sorted in real time
- 11:21databases need not be sorted let's say I
- 11:24am going to insert a new row to this
- 11:26course relation let's say the name of
- 11:28the subject is cryptography and network
- 11:30security and obviously it will be a part
- 11:33of the computer science department but
- 11:36do you think that this new row will be
- 11:37inserted between this and this no and
- 11:41that's why I told you in real time the
- 11:43relations are not sorted in the storage
- 11:45only it may not be sorted but while
- 11:48displaying you can sort and display
- 11:51and that's it guys I hope you guys
- 11:53enjoyed this presentation and thank you
- 11:55for watching
- 11:56[Music]
- 11:57[Applause]
- 11:59[Music]
About this transcript
This page contains the full transcript of Introduction to Relational Databases by Neso Academy, generated from the public captions YouTube serves with the video. The transcript has 1,949 words across 288 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.