Database Lesson NOtes

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

Database Lesson #1 of 8 - Introduction to into which those data can be placed.

Finally,
Databases a database provides us with a mechanism
for interacting with our data. Now, interacting
Welcome, everyone. This is Dr. Soper And with data can generally
today we be described in four different operations.
will be going through our first lecture for our Here they're listed as querying, creating,
database class. modifying,
I need to operate under the assumption that and deleting data. But there's another more
not everyone in the class has had experience interesting acronym, which may help you to
with databases in the past. remember this.
And so this first lecture is intended to bring And that acronym is CRUD, C-R-U-D. This
everyone up to the same basic level of stands for create, read, update, and delete.
understanding These are the four basic operations that we
with respect to several important database can use when interacting with data.
concepts. We have several different A key point to remember here is that, in
objectives, business, there are many natural, hierarchical
which we will seek to achieve in this lecture. relationships among data.
These are listed on the screen right now. For example, a customer can place many
First, we want to try to understand why orders. Another way of saying that is many
storing data in a list is not necessarily different orders
a very good idea. It can cause many different can be associated with the same customer.
types of problems. Or another example is a department
Second, we want to see if we can gain some can have many different employees, but a
insight into why an organization might want to given employee might work in one, and only
use a database. one, department. So these are hierarchical
Third, we will see how the notion of related relationships among the data.
tables of data, which forms a core part of the And a relational database allows us to model
relational database and represent these relationships.
model, provides a basis for eliminating many Let's take a look at a list of data. What I mean
of the problems which are associated with by a list here is a simple, two-dimensional
storing data table
in a list. We'll also explore the various of data. And in this table, we store information
components and elements that comprise a that is important to us for some reason.
database or a database system. An example might be, say that we have many
And we will learn about the purpose of different projects in our company, and we
something that we call a DBMS, a database want to keep track of who the project
management system. manager is for each project. Therefore, for
And along the way, we're going to explore each project, we may
some of the functions that a robust database track the project manager's name, their ID
application can provide to us. What, then, is number,
the purpose of a database? and maybe their phone extension within our
Well, it's important to remember that a company. Now, ordinarily this wouldn't be
database does not have just a single such a big problem.
purpose. But imagine if the same person, the same
Instead, there are several key advantages project manager, is simultaneously managing
that databases provide. First, a database multiple projects.
provides a repository for storing data. In that case, using a simple list, the project
That's kind of implicit in the name. Database manager's information
implies that we have a place to store data. would necessarily appear on the list multiple
However, what might not be so obvious is times. Now, what is the problem with this?
that databases provide an organizational Well, there isn't really any major problem,
structure aside from the fact that it's redundant.
for data. That is, we don't just have a place to Another way of saying that is we are using
store data, but the database also provides an more space than is necessary to record
organized structure which project manager is
associated with which projects. Another potentially could occur. So let's take a look at
problem with storing data in a list some of these modification issues.
is that the list of data may contain more than Here we have a list of data, which contains
one concept information on students.
or more than one theme. I want you to So we have a student's last name, first name,
remember this idea of a business concept, their email address. And then we see who
because we will see it again and again that student's advisor is.
throughout our course. A business theme or So the last name of the student's advisor, the
concept refers email of the student's advisor,
to a number of different attributes or and the department in which they work, along
properties with some additional information.
that are all naturally related to one type of Let's take a look at how some of these
business entity. modification anomalies might emerge.
An example might be an employee. An In the first case, imagine that we want to
employee is a business concept. change a student's advisor. And for this
Employees have different attributes that we example, we're going
may want to track for each employee to change Advisor Baker to Advisor [?
in our organization. For example, we may Tiang. ?] When we do this, not only are we
want to track the employee's ID going
number, the employee's name, the to have to update the last name of the advisor
employee's salary. in the list, but to maintain the overall quality of
Other examples of business concepts or the data, a concept
business themes include things like that we call data integrity, we are going to
departments, products, customers, orders, have to also update the advisor's email
locations, and so forth. Returning to lists, a address.
major problem Note, in this case, that we do not need to
is with these multiple themes. That is, for update the department or the administrator's
each row of the list, last name,
we might be recording information about because those are the same for advisors [?
more than one of these business concepts. Tiang ?] and Baker. However, if, for some
As an example, consider our list of project reason, we wanted
managers. If we also wanted to include to change the student's advisor from, say,
project information-- that Baker to Valdez,
is, perhaps, a project name, a project ID, any well, now not only do we need to update the
additional information about the project-- last name and the email address,
we might store that in the same row along but we also need to update the department
with the project manager. and the admin last name attributes as well.
Aside from redundancy, as I mentioned Just to do something as simple as changing
earlier, the problem here is not necessarily the student's advisor with this list approach
how we are storing this information, but what requires
might happen to the information that four separate pieces of information be
if it is stored in this way. When we store updated. So this is what we might call an
information in a list, we introduce the update anomaly or an update
possibility of something problem. Next, let's look at a deletion
called data anomalies. And specifically, there problem.
are three types of these anomalies. Imagine that our student, listed here as Chip
Here they're listed as a deletion problem, an Marino,
update problem, and an insertion problem. decides to drop out of the university. So we
Later in our course, we will refer to these as need to remove Chip from our list of students.
deletion anomalies, update anomalies, Now, look what happens if we delete this row
and insertion anomalies. So the structure of a of data. When the row of data is deleted, not
list and its associated problems only
of redundancy and multiple themes can do we lose the student's information, but
produce a situation in which these we've also lost information about the advisor
modification problems
and the department in which that advisor The convention in the relational database
works. That is, you will notice that Advisor [? world is that the columns represent different
Tran ?] is not attributes
currently assigned to advise any other of an entity. And each row in the table
students. So when we delete this row of data, represents
we may entirely lose the knowledge that an instance of the entity. So for example, if I
Advisor [? Tran ?] even exists. have an employee table
And that can be a problem. In this case, this with an employee ID, an employee name,
is called a deletion problem or a deletion and an employee telephone
anomaly. Finally, let's look at an insertion number, we would list those three attributes--
anomaly. ID, name, and telephone number-- as
Let's say that at our university, we decide that columns in the table.
we want to add a new department. And then each row in the table would
So we create a biology department. Well, this represent an individual employee.
is fine. We add information to our list. Again, we said that there are these natural
We now have a biology department and an relationships among different business
administrator's last name. concepts
However, we now have all of this missing out there in the business world. In a relational
data in our table. There are empty cells. database, data for each of these concepts
There's no information for a student. There's is stored in its own table. So I may have an
no information for an advisor. All we have employee table.
here is information for the department. I may have a department table. And then I
This means that data are missing, and we're can create a relationship
not efficiently utilizing our available storage between those tables, which will allow me to
space. These are some of the problems with figure out which employees work in which
these lists. Now, remember, earlier I departments.
mentioned So a good way of thinking about this is
that in the business world there are complex instead of storing all of the information in one
relationships big list,
among different types of data. For example, a we break the list apart into separate pieces
department may have many employees according to which information is
who work in that department. Or a product associated with which business theme or
may be assembled from many different business concept.
components. Therefore, all of the information associated
Or a customer might place many different with an employee might go into an employee
orders with our company. table.
So there are these natural complexities that And all of the information associated with a
arise in business. department might go into a department table.
And relational databases, as we will see, not Although, inside a relational database,
only solve information about different business concepts
the problems that are associated with lists, or business
but also allow us to model these natural themes is stored in separate tables, it may be
relationships necessary-- say, for reporting purposes-- for
among business data. Now, I've been using us
this term relational database. to reassemble all of the data from these
So it would probably be a good idea for us to different tables
consider what a relational database actually back into a list. Now, we can accomplish this
is. in the relational database world
On a very basic level, relational databases by performing something called a join
store data in a table. operation. That is, we join the tables together.
Now, a table is simply a two-dimensional grid Now, a very, very important concept for you
of data that contains columns, and it contains to understand
rows. is that in the relational database world, we
link the records in different tables
together using matched pairs of values.
These matched pairs of values allow us to database, or an Access database, or an
associate a row in one table Oracle database, or a DB2, or a MySQL
with one or more rows in another table. For database, or even a database
example, if we have a project table for, say, a mobile device. Most databases,
and we have a customer table, and we use including all of those that I mentioned,
an attribute called a customer ID support the Structured Query Language. So if
to uniquely identify each customer, then what you can learn the Structured Query
we can do Language,
is we can place a customer ID attribute in the you will be very well positioned to work with
project table. almost any database.
And we can then use the ID of the customer Even though we're still early in our course, I
in each table to link related rows together. want to give you an example of the
Now, of course, you may be listening to this, Structured Query Language
and you may think, why do we want to do all now so that you can see that it's really not
of this extra work? that difficult to understand.
And it is true that relational databases are This is certainly not a full scale computer
more complicated programming language.
than storing data in a list. However, as we will The Structured Query Language was
see, relational databases designed from the ground up to be simple to
have many, many advantages over a list. use and to be simple to understand.
Among these, first, a relational database So what we have here is an example
minimizes data redundancy. In the examples where we have three tables. There is a
we saw earlier, we customer table, and a course table,
saw that there exists with lists the possibility and an enrollment table. So let's say that
to have all sorts of redundant data. these are art courses.
Relational databases eliminate this. We have customers who have signed up to
Relational databases also allow us take different art
to model the natural relationships that exist courses to see, perhaps, if they can learn to
among business concepts in the real world. paint or they can learn to sculpt.
And there are several other advantages as Now, although we start with three tables, if
well, including providing a solid basis from we need to combine all of the information
which to do things like generate reports together in order to restore the original list
or build user interface forms. I mentioned a structure of the data, we can do that
few minutes ago that there by using something called a SQL SELECT
are four basic ways of interacting with data-- statement. Here we see an example of such
create, a statement.
read, update, and delete. In the relational I know this looks complicated. But hopefully,
database world, you are able to read this even right now
we have access to something called the at the beginning of our course and get a good
Structured Query Language, often called idea for what this statement is supposed to
SQL, or SEQUEL, if you like. do.
And this is the primary tool that we can use So let's take a look. We are selecting the
for performing these four customer's last name, the customer's
basic operations on our data. In a few weeks, first name, the customer's phone number,
we will begin learning the Structured Query and the date of the art
Language. This is an extremely valuable skill course, the amount paid out of the enrollment
for you to develop. table,
If you are able to learn the Structured Query the course itself, and the total course fee from
Language well, then you will be able to sit our three different tables--
down and work customer, enrollment, and course. We are
with virtually any modern database with a then linking the related records in each table
very, very together
short learning curve. It doesn't matter if you using these matched pairs of values that I
need to work with a SQL Server mentioned earlier. In the first case, we are
linking the customer table
to the enrollment table using matched pairs of That website could be considered a database
customer application. You will notice that the database
numbers. And in the second case, we're application
linking the course table talks to the DBMS. The DBMS, the database
to the enrollment table using matched pairs of management system,
course numbers. What this will do for us is acts as a gatekeeper. All of the information
restore flowing in or out of the database
the original list of data. So you can see our must travel through the DBMS. It is a critical
list. It contains the customer's last name and mechanism for maintaining the quality
first name, of the data in the database. We do not allow
customer's phone number, the course date, our users or our database applications
the amount that the customer has paid so far, to directly access the data in the database.
the course they are taking, and the total To work with the data, to access those data,
course fee. Now, the SQL statement that we database applications must go through the
saw was a SELECT statement. database management
And that is a statement which just pulls data system. And then, finally, far over on the right
from the database. side of our screen,
There are many other things that we can do we see the database itself. And this is where
with SQL, like deleting data, inserting new we actually store the raw data
data, in their separate tables. So what do the users
updating data in the database, and so forth. of a database system do?
And we will learn how to do all of those Well, they do many different things. You and I
various tasks are users of database systems on almost a
when we study the Structured Query daily basis, even if we don't realize it.
Language in more depth in a few weeks. So we can look up our checking account
Now I would like to turn our attention to some balances online.
conceptual information. We can produce reports. We can seek
Let's focus on a database system. It's information on Wikipedia.
important to remember that a database All of these are examples of us as users
system is not interacting with database applications.
just the database itself. Rather, it exists in a A few interesting things to note about the
broader hierarchy, which database itself is that it is a self-describing
includes users, application software programs collection
which of related records. What this means is that
rely on the database, something called a the database does not just
database management system, a DBMS, and contain the data, but it also contains a
then, of course, the database itself. definition of its own structure.
The broader picture of a database system Databases also contain metadata. The
includes these four components. simplest way to understand metadata
Here we see the relationships between the is that metadata are data which describe
four components of a database system. other data.
On the far left, we see users. Now, users are And in the context of the database world,
people, just like you metadata are data which describe the
or me, who might need to use the data in a structure
database. But a user doesn't necessarily of the data in the database. So for example, I
have to be a human being. may say that an employee table contains
It is possible, for example, for other software an attribute called Employee ID, and that ID
programs value is
to be users of our database as well. Now, you an integer. That knowledge that the
will see that users interact Employee ID value is an integer
with database applications. These are the is metadata. And of course, databases allow
programs that rely on the database. us to establish
So if we are a human user, we might, for relationships between tables. So that means
example, use a website, which interacts with the tables within a database
a database.
are related to each other according to the ever goes wrong. So the DBMS is a very
relationships that we establish. critical piece of software.
So it's important to remember that a database Now, businesses often operate with many
does not just contain the data that we have different types of business rules or
put into it. constraints.
A database also contains metadata, which And one of the great things about working
describe our data. with databases is that the DBMS can
It contains, or potentially can contain, what establish and enforce
we might refer to as overhead data. many different types of constraints. One of
These are tables of data that are used to the most useful types of constraint
improve performance or track that a DBMS can enforce is called a
the status of the database or how users are referential integrity constraint.
interacting with the database. The purpose of a referential integrity
And one of the major types of these overhead constraint is to ensure that values that we are
data are called indexes. entering in one table
Later in our course, we will examine database have matching values in another table. Now,
indexes. And of course, databases can also that's a very abstract way of trying
contain application metadata. So these are to convey a simple concept. As an example,
data values that are imagine that we have a customer
used by the applications which rely upon the table and a project table. And we are trying to
database. enter information
An application, for example, might store user about a new project in the project table. And
preferences in the database. we specify that the customer ID
Now, to reiterate, a DBMS, or a database that is associated with this project is customer
management system, number 5.
serves as a gatekeeper or an intermediary Referential integrity means that the database
between the database and the applications will actually check in the customer table to
which rely upon that database. The purpose see
of the DBMS is to control and manage if customer number 5 exists. If customer
the operations of the database. The DBMS is number 5 does not exist,
a special kind of software program, which then the database will not allow us to add that
is used to not only create databases, but also customer ID to our project table.
to process and administer those databases. And in this way, I hope you can see it helps to
So a DBMS is a type of application program. maintain the quality of the data
But it is not the database. in the database, what we call data integrity.
The DBMS interacts with the database, but it Now, the fourth component of our database
itself is not the database. system were database applications.
What, then, can a database management And database applications are simply those
system do for us? Well, the answer is it can software programs that need to use or work
do many different things, with data in the database. So these might be
as we see here on your screen. We can use data driven websites.
the DBMS to create a new database. They might be mobile apps. They might be
And then, within that database, we can create desktop applications or productivity software.
tables and establish relationships between Just remember that these applications are not
tables. allowed to talk to or use the database directly.
We can read, write, edit, and delete data But rather, they must go through the DBMS to
using the DBMS. work with or use those data.
We can establish rules which regulate and Finally, for this lecture, I want to just talk
control the data in the database. about some
The DBMS provides an additional layer of of the different types of database systems
security for us. And it also provides that are available. First, we can consider
mechanisms through which something called a personal database
we can backup our data and recover our data system. These are very small databases.
if anything They are typically used by a single user at a
time.
They are not complicated. They are simple in So I might have part of my database in my
design. And they're not really suitable for corporate offices in Los Angeles,
supporting another part in Beijing, another part in Berlin
medium or large businesses. They might be in Germany.
used by very small businesses just out And Enterprise-Level database management
of convenience. But as those companies systems support more than one database.
grow, they will, at some point, So within the same database management
certainly need to choose a more robust system, we might, for example, have our
database solution. operational database,
An example of a personal database system which allows us to run our business and keep
might be Microsoft Access. track of transactions in real time.
Convenient, easy to use, but not very And we might also create a data warehouse
powerful. or data marts.
One of the interesting characteristics of And they can all be managed by the same
personal database systems is that they often Enterprise-Level database management
contain the capability to build a database system.
application, or at least interfaces to the These are large databases. As an example,
database consider an ERP system like SAP.
within the DBMS. So in Microsoft Access, for A typical ERP implementation will have
example, thousands of tables, all related
I can create data entry forms or generate to each other in some way. An Enterprise-
reports for my Microsoft Access database. Level database management system
That is, it kind of combines the database can handle this level of complexity with
application and the database management relative ease.
system into a single entity, So here we see a graphical example of these
conceptually speaking. On the other hand, we Enterprise-Level database systems.
have a class of database systems The DBMS, again, serves as an intermediary
that are called Enterprise-Level database or a gatekeeper between the databases
systems. These are databases that are used and all of the various database applications
by medium and large size that want to rely on the data in those
companies to support their operations. And it databases.
is Enterprise-Level databases And they can be mobile applications,
that we will learn to use and interact with in applications that are written in Java, or C#,
this class. or even web applications. It might be
Compared to personal database systems, ASP.NET or PHP apps.
Enterprise-Level databases are designed Just as examples of some commercial DBMS
to support many different users at the same products, again, I mentioned that personal or
time. And this could be thousands or tens of desktop DBMS products
thousands of users might include Microsoft Access. Whereas,
all at the same time. Enterprise-Level Enterprise-Level products
databases also serve data include SQL Server, which is what we will be
to more than one application. For example, if using in this class, Oracle, MySQL, and DB2.
we are a retailer like Target MySQL, if you're interested, is a completely
or Walmart, we may have a database that free and open
provides data to our website source database. Well, my friends, thus ends
and also provides data to the dashboards that our first lecture
are used by our managers. for our database class. I hope you learned
Enterprise-Level databases are commonly something. And come back soon, and we'll
spread across multiple physical computing begin our exploration
devices. of our next topic. Until then, have a great day.
So many different computers. So a single
database might be running on many physical
INTRODUCTION TO DATABASE MANAGEMENT
servers.
SYSTEMS
Enterprise-Level databases can also be
geographically distributed. welcome to the course of database
management
systems or in short we call it as dbms collection of
in this video we will be seeing the related data now a random collection of
basic introduction to dbms data
before dbms we were using the file or data that is not related cannot be
system approach referred to as a database
in the later videos we will see more it has to be a collection of related
about file systems data
and why we prefer dbms approach over the like for example the data in an
file system approach online banking system database has to be
before we get into the topic let us see related to that particular bank
the outlines or the topics that we are similarly the data in library management
going to cover in this video system database
the first one we are going to see is the has to be related to that particular
basic definitions library so this is what we call as a
or the basic terminologies that we need database the next one is metadata
to know metadata is nothing but the database
next we'll be looking into the definition
definition and or in other words i can say it is the
functionalities of database management complete
system description of a database or it defines
and then we'll be discussing about the the database
properties of database information like the storage format or
next we'll be briefly looking into an the data
illustration of a type of the data that we are going to
simplified database system environment store in the database
and then finally to understand database or the constraints on the data all these
and its functionalities better information is called as metadata
we'll be looking into an example of so these are the basic definitions we
university database have seen in the further videos we will
so as we discussed first we'll be see more definitions in relation to dbms
looking into the basic definitions in next let us see the definition of
relation to dbms database management
the first one is data data system database management system
is any raw facts or unprocessed is a system to manage the database
facts that you can record like for and here managing could be either
example storing of data
any numbers name of a person name of a or retrieval of data from the database
place now let's look into the proper
any kind of text images audio video definition of database management system
etc all these are called as data database management system is a system
next what is information or it is a software or i can say it is a
these unprocessed facts or otherwise collection
called as of programs that enables users
data when they are processed to make a or that allows the users to create
meaningful context and maintain the database so this is a
then that is called as information or in very simple definition
other words i can say now let's move on to the functionalities
it is the processed data like for of database management system
example database management system allows users
the age of suresh is 25. so here i take to define the database to construct
the raw facts or the unprocessed facts the database manipulate and
process it to make a meaningful context share the database now defining the
and that is called as information next database
let us see involves specifying the data type
what is a database database is a for the data that we are going to store
in the database otherwise called as the mini world
also specifying the structures and so anything in this mini world the
constraints for the data objects
now constraints is nothing but the their properties the relationships
limits on the data between them
like for example if i have age as the all that is represented by a database
data to be stored then i can have a and if there is any change in the real
constraint world that change will also be reflected
say age greater than 18 so only if age in the
is greater than 18 database the second property is
then only that data can be stored in the a database is a logically coherent
database collection
so that is what we call as a constraint of data with some inherent meaning
the next functionality so as i said earlier a random collection
constructing the database is nothing but of data
the process of or unrelated data cannot be referred to
storing data on some storage medium as a database
or in other words i can say it is a the data in the database has to be
storage of data related
so when data is stored a database is or logically coherent the next property
being constructed is
the next functionality manipulation of a a database is designed and then built
database and populated with data
includes functions like querying the for a specific purpose so these are the
database to retrieve three main properties of database
or to get any data that the user needs the first one is a database represents
it the real world
also allows users to update the database secondly it is a logically coherent
and for generating reports the next collection of data
functionality and thirdly a database is designed built
sharing the database allows multiple and then filled with data for some
users and programs purpose
to access the database concurrently next let us look into an illustration of
or simultaneously or in other words i database system
can say environment so here we have the users or
many users can access or share the same the programmer
database who writes queries or programs and these
at the same time in an efficient manner queries or programs are processed by the
so these are the main functionalities dbms software
that dbms provides and then based on the processed queries
the other functions provided by dbms are dbms software
protection of the database from accesses the stored data in the database
unauthorized access that is it accesses the stored database
or from hardware or software failures as well as it accesses the metadata
and also as we have already seen metadata is the
maintenance of the database for a long database definition
period of time so this is a simple illustration of a
so that is with the functionalities of database system
database management environment where users write their
system next we will be discussing the queries
properties and it is processed by the dbms software
of database there are three properties and based on the processed queries
of database dbms software accesses the store
the first one is a database represents database as well as the metadata
some aspects of the real world or as we discussed in the outlines finally
to understand the database which is nothing but
a database and its functionality is storage of data
better we'll be taking an example of a so when data is stored a database is
university database being constructed
that stores student and course then we saw database manipulation as the
information next functionality
so here i have taken three tables the which involves querying and updating the
first one is the student table database
which holds information about the examples of queries would be listing all
students in that university the students
the second table is the course table in the cs branch in that university or
which holds information about the listing the grades received by a
courses available particular student in each course
and third table is a grade report table and then we saw sharing the database
which contains where this particular database can be
information about the grades received by shared
each student by many users at the same time in an
in a particular course as we have seen efficient manner
earlier the four functionalities so this is a very simple example of a
provided by dbms database that i've taken
let us try to understand those to help you understand what a database
functionalities better with this example is and also to understand its
as we learn defining the database functionalities
involves specifying the data type with this we come to the end of this
structures and constraints for the data video hope you all have understood the
that we are going to store in the basic introduction to dbms.
database
so here specifying the structure of each
1 DBMS CHARACTERISTICS
record
means specifying the different types of hello everyone
data elements present in that particular and welcome back continuing with the
record previous video
so here we have three records the introduction to dbms let us see in this
student record the course record video
and the grade report record and these the characteristics of dbms
columns are called as data elements in as i mentioned in the previous video
each record before dbms
now specifying a data type would be now we were using the file system approach
for example in traditional file systems data was
for student name i can say the data type stored in
should be a string of characters files now for example
or for data element role number i can if i have one user say the accounts
say the data department who keeps track of the
type should be an integer and so on and student fees
we've already discussed what a and their dues this user just needs the
constraint is student role number student name
i can give a constraint on the student the fees paid by the students as well as
name saying that student name cannot be any dues
null so this is all about defining the and if i have another user say the exam
database department
the next functionality constructing the who keeps track of the grades received
database is nothing but by the students
storing data so once data is being that is it can have student role number
stored a database is being constructed student name
the next functionality is constructing course and the grades received by that
student in a particular course
here both the users are interested in a database system
data about students a database system not only consists of a
but they have to maintain different database but it also contains the
files because both have different metadata
interests the accounts department is we have already seen what a metadata is
only interested in the fee details in the previous video
whereas the exam department is only so it is nothing but the database
interested to know about the grades definition or a complete description of
received by the student in each course the
so since both have different interests database information like the data type
they cannot have a common file and hence and the constraints etc all these
have to maintain different files information
as we can see here the student details is what we call as metadata and this
as the student role number and the information
student name is stored in the dbms catalog
is being repeated in both the files this and this catalog is used by the dbms
leads to redundancy or software
duplication of data as well as wastage as well as it is used by the database
of storage space users who wants to know
whereas in the dbms approach the entire what the structure of the database is
data is stored in a single repository let us just see
and multiple users can access the data an example of a catalog so that you
based on their interests like for understand better
example in the previous video we have taken this
data like student role number student very simple example
name the fees paid fees of a university database that stores
due the grades they have received etc student and course information
can be stored in the single repository so based on this very simple example let
and any number of users can access this us see an example of a catalog
repository so here we'll see an example of a
and view whatever data they want database catalog
hence there is no duplication of data where relations or table name along with
so that is why we prefer dbms over the the number of columns are mentioned
traditional file system approach in our example of university database we
hope you all have understood the have three tables or three relations
difference between the file system the first table that we have is the
approach student table with four columns
and the dbms approach now we are going then we have the course table with three
to discuss columns
the main characteristics of dbms and then finally the grade report table
approach with
the first one is self-describing nature three columns and also in our catalog we
of a database system the second can have
characteristic another table which defines the columns
is insulation between programs and data present
and data abstraction the third in each table or in each relation their
characteristic of dbms approach is data type
support of multiple views of the data and to which table or to which relation
and the last characteristic that we are that column belongs to
going to discuss would be based on our example of university
sharing of data and multi-user database the column
transaction student name has the data type character
processing let us look into each of of size 30 and it belongs to the
these in detail relation or belongs to student table
the first one self-describing nature of similarly the column roll number is of
integer data type and belongs to student from the programs
relation or student table so if there is any change brought to the
so this is an example of a database structure of the data files it does not
catalog affect the programs
where information about the database or and that is called as program data
a description of the database is stored independence we have already seen an
now going back to the characteristic example of university database
that we were discussing so in that database we had a student
now the next point is dbms software table or a student record
must work equally well with any number so let us see an internal storage format
of for that student record
database applications we can have any here we have the data item name or the
number of database applications like for column name
example in that record or in that table the
a university database a library database starting position
or a banking database and the length in characters in
as long as the database definition or traditional file systems
the metadata this structure is present within the
is stored in the catalog dbms software programs itself
has to work efficiently or equally well now say if i want to add another piece
with any number of database applications of data say the date of birth
whereas in the traditional file since the structure is changed this
processing program will not work
data definition or what we call as and the program has to be changed
metadata in dbms whereas in the database approach
is part of the application programs if you want to add a new piece of data
itself say the date of birth
so they work with only one specific we can add it without affecting the
database application programs
because the structure is declared in the since the structure is separate from the
program programs we don't have to change the
itself unlike dbms they cannot work with programs
more than one we just have to add this new information
database application so we have seen the in the catalog
very first characteristic of dbms so next time a dbms program refers to
approach the catalog
now moving on the next characteristic of the new structure will be referred and
dbms approach used
is insulation between programs and data so that is called as a program data
and data abstraction in traditional file independence
processing the structure of data files now the characteristic that allows
is program data independence
embedded in the application programs is called data abstraction dbms
itself that is the structure is within provides users with conceptual
the program representation of data
it is not separate so if there is any that is it hides the behind the scene
change to the structure of data files it details or the complicated details
is going to affect the programs we also that are not of interest to the database
need to change the application user
program whereas in the database approach a data model is a type of data
the structure of data files is stored in abstraction
the dbms that provides conceptual representation
catalog and it is separate from the to the database
access programs users in a way that most users can
since the structure is stored separately understand and the data model hides the
storage and implementation details from or
the reservation agents and if one of the
users so this is what is insulation agents
between programs and data or what we is booking a bus ticket for a particular
call as program data independence passenger
and the characteristic that allows the and if he is assigning a seat for that
program data independence is called as passenger
data abstraction the next characteristic then that particular seat should get
of dbms blocked and no
is support of multiple views of the data other agents should be able to access or
a database has many users and book that seat for any other passenger
each of those users will have different and that is what we call as
needs concurrency control these kind of
or they may require a different view or applications that require concurrency
a different control
perspective of a database like for are called as oltp or online transaction
example processing and it is a major part of
one user will be only interested to know database application
the grades received by the students dpms must enforce or must ensure
while another user will be interested to several transaction properties and here
only know the courses transaction means
taken by each student so dbms will program under execution so the two
provide only that necessary data that is different transaction properties are
required for each isolation and atomicity now what is
user a view which is a subset of isolation like we already discussed in
database the previous example
that is it is derived from a main if one agent assigns a seat to a
database table particular passenger
it contains virtual data or then that seat is blocked or it is
data that is not physically stored or isolated from
that is not other agents so that is one of the
explicitly stored so that is transaction properties that dbms must
support of multiple views of the data enforce
where dbms will provide the next property is atomicity where
as many views as required by each dbms should
database user ensure that the transaction is executed
the next characteristic of dbms is completely
sharing of data or none at all now when an agent is
and multi-user transaction processing assigned a seat for a passenger
as the name suggests a multi-user dbms and if the transaction is stuck midway
allows multiple users to access the or if it is
database incomplete then that seat has to be
at the same time now for multiple users released for
to other agents to access so either the
access the database at the same time transaction
dbms has to provide or it must include should be executed completely or none at
concurrency control now what is all
concurrency control so this is sharing of data and
concurrency control is nothing but when multi-user transaction
multiple processing with this we come to the end
users are sharing the same database at of this video
the same time hope you all have understood the main
it should prevent two users from characteristics of dbms approach.
editing the same data at the same time
like for example we have travel agents Database Users
manage these resources
going to see briefly the different types similarly in the database environment
of database users we have database as the primary resource
based on their interaction with the and database management system that is
database database users are divided into dbms and its related software
two as a secondary resource and it is the
the first is actors on the scene actors responsibility of a database
on the scene administrator or a dba
are the people whose jobs involve using to administer or to manage these
large databases every day or in other resources that is the primary and the
words i can say secondary resources
people whose jobs involve day-to-day use the other responsibilities of a database
of a large administrator or a dba
database under that we have four types are they authorized access to the
of users database
the first one is the database that is they can grant any user the
administrators permission to access the database
then we have database designers the and the next responsibility of a dba is
end users and finally system analysts coordinating and monitoring the use of
and application programmers also called database also a dba is responsible for
as acquiring or obtaining
software engineers next we have any hardware and software resources as
workers behind the scene workers behind needed
the scene so these are the main responsibilities
are the people whose work is to maintain of a database administrator
the database system environment the other responsibilities would be
we have already seen a simple troubleshooting if any problem arises
illustration of a database system or to see if there are any security
environment in our previous video these issues and so on
people in a large organization a dba or a
maintain the database system environment database administrator
that is they deal with the design will have a support staff behind to help
development and him with his duties and responsibilities
operation of the database system so that's about database administrators
environment or a dba
and they are not interested in the and his responsibilities moving on to
database itself the next type of database users under
under this we have the three types of actors on the scene
users we have database designers
the system designers and implementers database designers are responsible for
the tool developers and finally the identifying the data that we're going to
operators and maintenance store in the database
personnel let us look in detail the and based on this data that we're going
roles and to store in the database
responsibilities of each of these a database designer should choose
database users appropriate structures
so first let us look at the actors on to represent and store this data and a
the scene database designer
under this the first type of database is also responsible for communicating
user that we have with the database
are the database administrators now in users and try to understand what their
any large requirements are
organization we might have many and based on their requirements a
resources and we always need a main database designer designs a
person or a chief person or a manager to database now these database designers
they interact with each group of users standard type of
and develop queries and updates to query the
views for each of these group of users database for some data or to update the
based on their requirement we have database for some
already seen what a view is in the changes like for example a reservation
previous video agent for probably
a view is a subset of the database airlines or hotel or train or bus
it is derived from the main database and as per the request from the customer
it only contains they check the availability and make
data that is required by a particular reservations
user so database designers develop on a daily basis they use similar set of
views for each group of users and then functions
each view to make reservations or to check for
is linked with the views of other group availability
of users and so they have a predefined set of
and that final database design should queries or a standard type of queries
fulfill the requirements of to query any data that they want or for
all the user groups and that is about updating the database for some
database designers and his changes the next category of end users
responsibilities now let's look on to are the sophisticated end users
the next type of database user sophisticated end users
the end users end users are the engineers scientists business
are the people whose jobs require access analyst
to the database and any other users who are familiar
for querying the database to get any with the dbms or the database management
data that they want system
or to update the database to bring in and the facilities that the dbms
some changes provides they develop their own database
and for generating reports now let's applications to meet their requirements
look into the categories and then we have the standalone users
of end users the first one is the casual these users maintain personal databases
end user a casual end user accesses by using ready-made program packages
database occasionally that is they now for example a person running a
access the database not business would like to keep track of his
very frequently not very regularly or personal financial data
not on a daily basis for tax purposes so for that he
they access the database only when they maintains his
want to query some data or if they want own personal databases using the
to update the database ready-made packages
or for generating reports and usually and these ready-made packages would be
the middle or high level managers or the either menu driven or
top level managers or graphic-based interface so that's all
other occasional browsers come under about the
this category end users and the categories of end
the next category of end users are the users
nav or parametric the casual end users and the nav or
end users most of the end users parametric
come under this category and these end end users don't know in detail the dbms
users facilities whereas the sophisticated end
constantly query the data from the users
database are experts or know much about the dbms
and also updates the database for any facilities to
changes satisfy their requirements and the
using canned transactions now what standalone users are experts in the
are canned transactions they are the ready-made packages that they use
now the next type of database users are are persons who design
the system analysis and and implement tools which is nothing but
application programmers or otherwise the software packages
called as a software and these software packages are optional
engineers the system analysts determine and can be purchased separately
the requirements of the end users to help improve the performance of a
especially the nav users or the database system
parametric end users the next type of database user that we
and then develop specifications for have under workers behind the scene
canned are the operators and maintenance
transactions we have already seen what a personnel they are responsible for the
can transaction is actual running and maintenance of the
so a system analyst based on the hardware and software
requirements of the end users of the database system environment so
will design these standard types of these are the types of database
queries users under workers behind the scene and
and an application programmer is they are involved
responsible for testing in making the database system available
debugging documenting and maintaining to the end users
these scanned transactions that are but they do not use the database for
developed by the system analysts their own purpose
these system analysis and application with this we come to the end of this
programmers are called as software video hope you have understood the
engineers different types of database users
and they have to be experts or
completely familiar with the facilities Data Models
provided by the dbms
next let us see the types of database Imagine that you’re designing a new home
users under workers behind the scene and that a plumbing sales rep tells you that
we have already seen initially that he has a packaged plumbing design for 2
workers behind the scene story
are the people whose job is to maintain homes which will reduce the cost of
the database system architecting the plumbing into your future
environment and these people they are house.
not You think to yourself, “well I’m not the first
interested in the database itself that person to build a house, and this sounds
is the work behind the scene and the like it might save some money.”
types of database users under them So you go ahead and move forward with the
are the first one is system designers idea.
and implementers So you build your house with the packaged
these are people who design and design and to your absolute dismay the
implement the dbms modules packaged
and interfaces as one software package design is not for your house layout but just
a dbms is a very complex software system that of a generic 2 story home!
which consists of many modules like So you have pipes going right through the
modules for implementing the catalog middle of your living room and other places
for processing query language for in the house!
controlling concurrency Worse yet the bathroom doesn’t even get any
handling recovery of data and security plumbing!
etc OK…
so the system designers and implementers I’ve made this example as extreme and
have to design obvious as possible.
and implement all these modules and But I’ve done that so I can introduce you to its
interfaces as one software package equivalent in the data integration
next we have the tool developers they space called Packaged Data Models.
OK first let’s talk about what a data model is. The ETL, Staging, Data Model, and Reports
A data model represents the framework of are all in place and now need a major rebuild.
what the relationships are within a database. If you are going to use a packaged data
This framework in the world of data model, at the very least, you should vet it
warehousing is a critical component as it will completely
provide the structure which will support the before deploying it in your business.
analytical needs of the decision makers. Rather than thinking of the packaged data
The data itself will literally be stored within model as the end game you’re better off
this framework on a database. thinking of it as a guide while you design your
So building a data model is a critical step in own data warehouse.
the design of the data warehouse. This is because you’re likely to have a lot of
This step requires your business people to deviations from what the vendor would
engage in the process by participating in consider as “standard”.
facilitated sessions with our data architects. And it also enables you to build in your
This can seem intimidating for organizations competitive advantage above and beyond
to take on, so often organizations start your competitors
looking analytics.
for something out of the box. Intricity has extensive experience in the
But here’s the kicker that most people don’t packaged data model space.
realize. We have modified, implemented, replaced,
The amount of effort that you would take in and designed such models for years.
vetting a packaged data model to ensure that We can help you determine what the right
it fits your business; is nearly the same level approach is when implementing a data
of effort to go ahead and design one model.
specifically for your business. I recommend you visit our website and talk
However, this is an easy trap to fall into with one of our specialists.
because data models appear to do more than The small investment in our guidance can
they actually do. bring you huge dividends for the future of
Especially to business people. your project.
The first thing to understand is that a data
model is just a shell.
A Data Model without populated data isn’t
much more than a drawing.
The real expense and heavy lifting in a data
warehouse project is not in the design of
the model, but rather populating that model
with data from your source systems.
And that is where the big money is spent to
create a Data Warehouse.
Now some organizations don’t even vet
packaged data models, assuming they are
well positioned
out of the box.
But they’re usually in for a huge shock once
all the reporting and analytics go live.
They often find that the logic does not mirror
their internal practices and rules.
Additionally, they find entire dimensions not
being represented.
Like our example with the home, fixing the
problem is an expensive rip and replace
process
because the entire house around the pipes is
already built.
The same is true for a data warehouse.

You might also like