290 likes | 420 Views
Lecture # 3 & 4. Chapter # 2 Database System Concepts and Architecture. Muhammad Emran Database Systems. Elements of the Database Approach. Enterprise Data Model Graphical model showing high-level entities and relationships for the organization Relational Databases
E N D
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems
Elements of the Database Approach • Enterprise Data Model • Graphical model showing high-level entities and relationships for the organization • Relational Databases • Database technology involving tables (relations) representing entities and primary/foreign keys representing relationships • Use of Internet Technology • Networks and telecommunications, distributed databases, client-server and 3-tier architectures • Database Applications • Application programs used to perform database activities (create, read, update, and delete) for database users
One customer may place many orders, but each order is placed by a single customer One-to-many relationship
One order has many order lines; each order line is associated with a single order One-to-many relationship
One product can be in many order lines, each order line refers to a single product One-to-many relationship
Therefore, one order involves many products and one product is involved in many orders Many-to-many relationship
Relationships established in special columns that provide links between tables
Database Management System (DBMS) A software system that enables users to define, create, maintain, and control access to the database. (Database) application program: a computer program (written in any high level language) that interacts with database by issuing an appropriate request (SQL statement) to the DBMS.
Database Approach • Data definition language (DDL). • Permits specification of data types, structures and any data constraints. • All specifications are stored in the database. • Data manipulation language (DML). • General enquiry facility (query language) of the data.
Database Approach • Controlled access to database may include: • a security system • an integrity system • a concurrency control system • a recovery control system • a user-accessible catalogue
Views • Allows each user to have his or her own view of the database. • A view is essentially some subset of the database.
Views - Benefits • Reduce complexity • Provide a level of security • Provide a mechanism to customize the appearance of the database • Present a consistent, unchanging picture of the structure of the database, even if the underlying database is changed
Components of DBMS Environment • Hardware • Can range from a PC to a network of computers. • Software • DBMS, operating system, network software (if necessary) and also the application programs. • Data • Used by the organization and a description of this data called the schema.
Components of DBMS Environment • Procedures • Instructions and rules that should be applied to the design and use of the database and DBMS. • People • Who uses the database with different views
DBMS Architecture • The Internal or Physical Level: • The collection of files permanently stored on secondary storage devices. • And it provides a low-level description of the physical database, and an interface between the operating system's file system and the record structures used in higher levels of abstraction. • At this level record types and methods of storage are defined, as well as how stored fields are represented.
DBMS Architecture • The Conceptual Level: • It presents a logical view of the entire database, which allows you to bring all the data in the database together and see it in a consistent manner. • The first stage in the design of a database is to define the conceptual view, and a DBMS provides a data definition language DDL for this purpose. • The data definition language used to create the conceptual level must not specify any physical storage considerations that should be handled by the physical level. It should not provide any storage or access details, but should define the information content only.
DBMS Architecture • The External or View Level: • It provides a window on the conceptual view which allows the user to see only the data of interest to them. • The user can be either an application program or an end user. Any number of external views can be defined and they can overlap each other. • The System Administrator and the DBA are special cases. Because they have responsibilities for the design and maintenance for the design and maintenance of the database, they at times need to be able to see the entire database. The external and the conceptual view are functionally equivalent for these two users.
Roles in the Database Environment • Data Administrator (DA) • Database Administrator (DBA) • Database Designers (Logical and Physical) • Application Programmers • End Users (naive and sophisticated)
History of Database Systems • First-generation • Hierarchical and Network • Second generation • Relational • Third generation • Object-Relational • Object-Oriented
DBs Hierarchical 1960s • The hierarchical data model organizes data in a tree structure. • There is a hierarchy of parent and child data segments. • This structure implies that a record can have repeating information, generally in the child data segments. • Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record type. • These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows. • To create links between these record types, the hierarchical model uses Parent Child Relationships. These are a 1:N mapping between record types. This is done by using trees,
DBs Network 1970s • Data were more naturally modeled with more than one parent per child. • So, the network model permitted the modeling of many-to-many relationships in data • The basic data modeling construct in the network model is the set construct. • A set consists of an owner record type, a set name, and a member record type. A member record type can have that role in more than one set
Advantages of DBMSs • Control of data redundancy • Data consistency • More information from the same amount of data • Sharing of data • Improved data integrity • Improved security • Enforcement of standards • Economy of scale
Advantages of DBMSs • Balance conflicting requirements • Improved data accessibility and responsiveness • Increased productivity • Improved maintenance through data independence • Increased concurrency • Improved backup and recovery services
Disadvantages of DBMSs • Complexity • Size • Cost of DBMS • Additional hardware costs • Cost of conversion • Performance • Higher impact of a failure