Professional Documents
Culture Documents
Explain
Data
A data model is a collection of concepts that can be used to
describe the structure of a database. Data models have 3
categories:
Field
A space allocated for a particular item of information. A tax
form, for example, contains a number of fields: one for your
name, one for your Social Security number, one for your
income, and so on. In database systems, fields are the
smallest units of information you can access.
Record
A complete set of information. Records are composed of
fields, each of which contains one item of information. A set
of records constitutes a file. For example, a personnel file
might contain records that have three fields: a name field, an
address field, and a phone number field.
File
Relative data and information is stored collectively in file
formats. A file is sequence of records stored in binary format.
A disk drive is formatted into several blocks, which are
capable for storing records. The following are the types of file
organization
1)
2)
3)
4)
Differentiate
Desktop Database
Workgroup Database
Enterp
1 user
Limited Storage
User can only
access db
<50 Users
4GB Of Storage
Users within the
group can access
db
Stored as single
Microsoft Access
file(.mdb)
Stored using
Microsoft Access
file and FileMaker
Pro
>50 U
Up to
Vario
enter
the d
super
Store
Oracl
Serve
Functionality of DBMS
There are several functions that a DBMS performs to ensure
data integrity and consistency of data in the database. The
ten functions in the DBMS are:
1. Data Dictionary Management
Data Dictionary is where the DBMS stores definitions of
the data elements and their relationships (metadata).
The DBMS uses this function to look up the required
data component structures and relationships. The Data
Dictionary is often hidden from the user and is used by
Database Administrators and Programmers.
2. Data Storage Management
This particular function is used for the storage of data
3.
4.
5.
6.
7.
2. Normalization
3. Basics of DBMS
Entity
An entity is a distinct or discrete things or objects
which helps us to make a efficient data management
system providing the relation between the entities. For
example - An office could have these entities likeEmployees, Department, Salary.
Attribute
an attribute refers to a database component, such a
table. It also may refer to a database field. Attributes
describe the instances in the row of a database.
Primary Key
The PRIMARY KEY constraint uniquely identifies each
record in a database table. Primary keys must contain
unique values. A primary key column cannot contain
NULL values. Most tables should have a primary key,
and each table can have only ONE primary key.
Foreign Key
A foreign key is a field in a relational table that
matches the primary key column of another table. The
foreign key can be used to cross-reference tables.
Relationship
A relationship exists between two database tables
when one table has a foreign key that references the
primary key of another table. Three different types of
database relationships:i.
One-to-one relationships
ii.
One-to-many relationships
iii.
Many-to-many relationships
Data Dictionary
A data dictionary contains a list of all files in the
database, the number of records in each file, and the
names and types of each field. Most database
management systems keep the data dictionary
hidden from users to prevent them from accidentally
destroying its contents. It do not contain any actual
data from the database, only bookkeeping
4. SQL Statements
Insert
Used to insert a one or more records into a table. Example of
SQL INSERT statement when inserting a single record using
the VALUES keyword is:
INSERT INTO table
(column1, column2, ... )
VALUES
(expression1, expression2, ... );
Delete
Used to delete a one or more records from a table. Example
of SQL delete statement is
DELETE FROM table
WHERE conditions;
Select
Used to retrieve records from one or more tables in your SQL
database. Example of SQL select statement is:
SELECT expressions
FROM tables
WHERE conditions;
Update
Used to update existing records in the tables.Example of SQL
update statement when updating one table is:
UPDATE table
SET column1 = expression1,
column2 = expression2,
...
WHERE conditions;