150 likes | 306 Vues
Databases and Database Management Systems. What is a database?. A database is a file of similarly structured records. A database is a collection of information related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection.
E N D
What is a database? • A database is a file of similarly structured records. • A database is a collection of information related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection.
What is a database management system (DBMS)? • A database management system is software that allows you to manage all your data in a systematic fashion. • It allows you to design and create new databases and perform various operations on existing databases. • These operations include adding new data and retrieving, modifying or deleting existing data.
Types of DBMS architectures • Network (e.g. Cullinet Software’s IDMS) • Hierarchical (e.g. IBM’s IMS) • Relational (the most common in use today) • Object-relational • Object
“Large” Oracle DB2 (IBM) Informix Sybase “Small” Access (Microsoft) FoxPro dBase 4th Dimension Example relational DBMSs
Most common DBMS model on market? • Relational
The relational DBMS we will be using in the course? • Access, which is part of Microsoft Office
Two components of employing a DBMS • Designing and building the database • Manipulating the data
Steps in building a database • Choose a DBMS • Define the data structure (Data Definition) • Create or import a set of records
Steps in using a database • Data Manipulation: • Insert • Retrieve • Update • Delete • Sort • Calculate, etc. • Recovery, Security, etc.
Building a database • In the relational data model a database consists of one or more tables. (Each table is called a relation, hence the name relational.) • Each row in one of these tables is a record. • A record consists of a set of fields.
What is a database schema? • A database schema consists of all the information about what the tables are, what the fields are within each record in each table, how the tables are related, etc. • If you take an existing database and delete all the records, what’s left is the underlying database schema.
So the first step in building a new database is to create the underlying database schema. • A major component of this is to tell the DBMS what the structure of your records will be (Data Definition) within each table.
There are three main steps in data definition • Naming each field in a prototypical record, • Specifying its datatype, and • Specifying its size, if appropriate.
Data validation • One of the main features of a DBMS is to perform data validation when a user attempts to create a new record or modify an existing record. • The reason for specifying a datatype for a field is to allow the DBMS to check the validity of user-entered data and reject invalid data.