Reviewer Sa Databseshit
Reviewer Sa Databseshit
DATA–The term that means groups of information that represent the qualitative or quantitative
attributes of a variable or set of variables.
DATABASE–A data base is a collection of information that is organized so that it can easily be
accessed,managed and updated.
File System Data Processing It is the job of updating,sorting,or validating a data file.A file is a
chunk of data. So file processing means anything you do to that data. Such as update ,rename,
move,copy and the like.
1970–Hierarchical and network (limited data dependence,no widely accepted theoretical model)
1980–Relational Database was developed by Dr.E.F.Codd
1990–Object-oriented database (large amount of structured and unstructured data)
2000– and beyond–multi-tier,client-server,distributed environments,web-based,datamining
Datamodeling- is the process of creating a simplified diagram of a software system and the
data elements it contains,using text and symbols to represent the data and how it flows.
Conceptual Model- It is the typical starting point for datamodeling,identifying the various data
sets and data flow through the organization.
Logical Model- It describes the data flow and database content .It adds detail to the overall
structure in the conceptual model.
Physical Model- It describes the specifics of how the logical model will be realized.It is specific
to a designated database software system.
Entity-Relationship Data Modeling- It visually map entities, their attributes and the
relationships between differententities.
Dimensional Modeling-They consist of fact tables that contain data about transactions or other
events and dimension tables that list attributes of the entities in the fact tables.
Graph Modeling- Typically paired with graph databases, it's often used to describe datasets
that contain complex relationships.
WEEK 3
•Database–oriented
•Application-oriented
Database–oriented- Database oriented business rules impose constraints that you can
establish within the logical design of the database. You implement a given constraint by
modifying various field specification elements, relationship characteristics,or a combination of
the two.
Application–oriented- Application oriented business rules impose constraints that you cannot
establish within the logical design of the database.You must instead establish them within the
physical design of the database or within the design of a database application,where they will be
more applicable and meaningful.
Data Abstraction- refers to the process of hiding irrelevant details from the user.
Data Independence-users and data should not directly interact with each other. The user
should be at a different level and the data should be present at some other level.
View Level- This level tells the application about how the data should be shown to the user.
Conceptual Level or Logical Level- This level tell show the data is actually stored and
structured.
Physical Level or Internal Schema- Physical level tells us that where the data is actually
stored; it tells the actual location of the data that is being stored by the user.
WEEK 4
RelationSchema:A relation schema represents the name of the relation with its attributes.
Degree:The total number of attributes which in the relation is called the degree of the relation.
Relation key:Every row has one,two or multiple attributes,which is called relation key.
DOMAIN Constraints
KEY Constraints
An attribute that can uniquely identify a tuple in a relation is called the key of the table. The
value of the attribute for different tuples in the relation has to be unique.
REFERENTIAL Integrity Constraints
WEEK 5
Key Constraints (cont.) There must be atleast one minimal subset of attributes in the
relation,which can identify a tuple uniquely. This minimal subset of attributes is called key for
that relation.If there are more than one such minimal subsets,these are called candidate keys.
Data Redundancy
Redundancy means having multiple copies of same data in the database.This problem a rises
when a database is not normalized.Suppose a table of student details attributes
are:studentId,studentname,collegename,collegerank,courseopted.
Insertion Anomaly - If a student detail has to be inserted whose course is not being decided
yet then insertion will not be possible till the time course is decided for student.This problem
happens when the insertion of a data record is not possible without adding somea dditional
unrelated data to the record.
DeletionAnomaly –If the details of students in this table are deleted then the details of college
will also get deleted which should not occur by commonsense.This anomaly happens when
deletion of a datarecord results in losing some unrelated information that was stored as part of
the record that was deleted fromatable.
UpdateAnomaly – Suppose if the rank of the college changes then changes will have to be all
over the database which will be time-consuming and computationally costly.
Database Relationships
One-to-OneRelationship
A one-to-one (1:1) relationship means that each record in Table A relates to one, and only
one,recordin TableB,and each recordinTable Brelates to one,and only one,recordinTableA.
One-to-ManyRelationship
A one-to-many (1:N) relationship means a record in Table A can relate to zero, one, or many
records in TableB. Many records in TableB can relate to one record in TableA. The potential
relationship is what's important; for a single record in TableA, there might be no related records
inTableB,or there might be only one related record,but there could be many.
Many-to-ManyRelationship
The given tables hold data about employees and the projects to which they are assigned. Each
project can involve more than one employee and each employee can be working on more than
one project (the"domorewithless"thing).This constitutes a many-to-many(N:N)relationship.
Rule 1: Information Rule The data stored in a database, may it be user data or metadata,
must be a value of some tablecell. Everything in a database must be stored in a table format.
Rule 2: Guaranteed Access Rule Every single data element (value) is guaranteed to be
accessible logically with a combination of table-name,primary-key(rowvalue),and attribute-
name(columnvalue).No other means,such as pointers,can be used to access data.
Rule 3: Systematic Treatment of NULL values The NULL values in a database must be given
a systematic and uniform treatment. This is a very important rule because a NULL can be
interpreted as one the following−data is missing,data is not known,or data is not applicable.
Rule 4: Active Online Catalog The structure description of the entire database must be stored
in an online catalog, known as data dictionary, which can be accessed by authorized users.
Users can use the same query language to access the catalog which they use to access the
database itself.
Rule 6: View Updating Rule All the views of a database, which can theoretically be updated,
must also be up datable by the system.
Rule 7: High-Level Insert, Update, and Delete Rule A database must support high-level
insertion,update,and deletion. This must not be limited to a singlerow, that is, it must also
support union,intersection and minus operations to yield sets of data records.
Rule 8: Physical Data Independence The data stored in a database must be independent of
the applications that access the database.Any change in the physical structure of a database
must not have any impact on how the data is being accessed by external applications.
Rule 9: Logical Data Independence The logical data in a database must be independent of its
user’s view (application) Any change in logical data must not affect the applications using it. For
example,if two tables are merged or one is split in to two different tables, there should be no
impact or change on the user application.This is one of the most difficult rule to apply.
Rule 10: Integrity Independence A database must be independent of the application that use
sit. All its integrity constraints can be independently modified without the need of any change in
the application.This rule makes a database independent of the front-end application and its
interface.
Rule 11: Distribution Independence The end-user must not be able to see that the data is
distributed over various locations. Users should always get the impression that the data is
located at one site only.This rule has been regarded as the foundation of distributed database
systems.
Rule 12: Non-Subversion Rule If a system has an interface that provides access to low-level
records,then the interface must not be able to subvert the system and by pass security and
integrity constraints.
DBMS supports relational set operators as well. The major relational set operators are union,
intersection and set difference.All of these can be implemented in DBMS using different queries.
Union
Union combines two different results obtained by a query into a single result in the formofatable.
However, the results should be similar if union is to be applied on them. Union removes all
duplicates,if any from the data and only displays distinct values.If duplicate values are required
in the resultant data,then UNIONALL isused.
Intersection
The intersection operator gives the common data values between the two data sets that are
intersected. The two data sets that are intersected should be similar for the intersection operator
to work.Intersectional so removes all duplicates before displaying the result.
SetDifference
The set difference operators takes the two sets and returns the values that are in the first set but
not the second set.
Types of Views
USER View – The user view lists only those tables and views which are created by the current
user/schema. It does not list the tables and views of other schemas nor the ones to which it has
access.It displays only those objects that are created by it.
ALL View The ALL view lists all the tables and views that are owned by the current user as well
as those tables and views to which it has access.That means it lists the tables and views that
are created by it, and those tables and views of other user/schema to which it has access.
DBA View DBA view will have access to all the tables and view so fall the users/schema. But
these views will be accessible by only those who have DBA privileges.