Unit 2 Flashcards
ahhh shiii here we go again
What is an instance?
Collection of a data in a database at a particular moment
Schema
Overall design
Subschemas
Having several schemas at view level
Vrai ou faux: logical schema is by far the most important, in terms of its effect on application programs, since programmers construct applications by using
the logical schema
Vrai. I was about to say it was the physical one…welp
Vrai ou faux: the physical schema can be easily changed without affecting the application program.
Vrai. Since it is hidden beneath the logical schemas
ANSI-SPARC can be divided to:
Internal, conceptual and external
Internal level
AKA physical level
how data is stored in a storage
File structures and access methods
Data compression and encryption techniques
Conceptual
AKA logical(community view)
What is stored and what relationships exist
Abstracts low level complexities of the physical storage
The level app developers work on
External
AKA view level
What the end users use
What are the objectives of the 3TA(three tier arc)
DATA ABSTRACTION
views allow data to be viewed for d/t users
user doesn’t care about the physical storage detail
Vrai ou faux: Physical storage structure can be changed without requiring changes in
conceptual structure of the database as well as users view
Vrai
Vrai ou faux: Conceptual structure of the database can be changed without affecting end
users.
vrai encore
What is Data Independence
allows changes to be made to a database without affecting the applications that use it
Logical data independence:
conceptual doesn’t change the external schema and vise versa
Physical data independence
conceptual doesn’t change the internal schema and vise versa
Layers of ANSI-SPARC organ data
external and Internal
External Mapping
the DBMS maps names in the user’s view to the relevant part of the conceptual schema (translator)
Internal Mapping
(Navigator) DBMS funds the records in physical storage based on the constraints…ig
Multi- User architectures
Tele processing, file and client server
Main-Frame (teleprocessing)
Mainframe dependent, uses dumb terminals to access apps and the database
File Server
One computer(file server) connects to workstations and they share storage, the apps run on the workstation while asking the file server files when necessary
disadvantages of file server
Heavy network traffic
Cost of ownership
Complex integrity, concurrency, and recovery control
Client Server arc
The client and server
don’t reside on the same machine
What is a server?
device that provides and manages, access to a
centralized resource or service to another device , program or end user in a network
Client server arc types
Two and three tier
Two tier client server
3 components of app are divided to client application code and database server
client -presentation
client & server - process
Server - store
What are the three components of an application
Presentation, processing and data
disadvantage of the 2 tier client server arc
performance ↓ with ↑ users
Users need to remember and manage different logins for each database
Three tier client server arc
components of application are separated
Presentation layer- UI and communication
Application/logic/middle - business and data processing logic and can add, delete, or modify data in the data tier
Data tier- data validation, manage DB access
Vrai ou faux: In a three-tier application, all communication goes through the application tier. The
presentation tier and the data tier cannot communicate directly with one another
Oui oui
Advantage of 3 tier client server arc
reduced cost due to apps running in web browser
app logic centralized in an app server
↑ modularity
LE meilleur arc
which tier is harder to maintain: two tier/ three tier
three tier
why is the three tier more secure?
Cause direct client to database communication is prevented
what is an entity
a real world concept
Attribute?
Descriptive characteristic of an entity
Record?
what’s inside an attribute
Meta data is data about data but still metadata?
Describes length and composition ( basically based on the datatype
Stores structure, definition,
purpose, storage, number of columns and records, dependencies, access rights, owner… of an object
Where is meta data stored?
Data Dictionary or System Catalog
What is a data model
collection of conceptual tools for describing data, data relationships, data
semantics, and consistency constraints
shows how data is manipulated
has structural part, manipulative part and possibly a set of integrity rules
Data model types:
external, conceptual and internal
External Data Model
represent each user’s VIEWS of the organization aka the Universe of Discourse (UoD),
Conceptual Data Model
represent the conceptual (or community) view
that is DBMS independent;
what the system contains
View of the user in the real world
Internal/logical Data Model
represent the logical schema in such a way that it
can be understood by the DBMS
Designed and developed independently from the DBMS.
View in the database
Which data model shows Show relationships among data including:
* Constraints
* Semantic information (e.g., business rules)
* Security and integrity information
Conceptual
Other models of data
Object-based
Record-based
Physical
Physical data model
HOW it is implemented
physical representation ☺
Describes how the data is stored and deal with…Run-time performance, Storage utilization and compression, File organization and access methods and Data encryption
Physical data model is managed by
OS (storage and file management)
Object based data model
based on the concept of Entity (distinct object) where
Entity Relationship - considers only the data aspect
Object oriented- considers both data n behavior
Record Based
Based on fixed format records
each record has a fixed number of fields
each field is a fixed length
What is the ER model
design/blueprint of a database
high level conceptual data model
the algorithm basically
Based on entity/ attribute/relationship
Object oriented model
data is formed in the form of objects which have state and behavior
State-attribute
Behavior- methods/procedures
The designer defines classes with attributes/methods and relationships
What are classes
Grouping of all objects with the same properties and behaviors
what are pointers
adresses that facilitate objects access and relationships between objects
Vrai ou faux: Class constructors method created object instances
Vrai, each object has a unique object id
Advantages of conceptual and logical
supports complex data structs
has java features like inheritance and encapsulation
Reusable, real world modeling, flexible
Disadvatages of conceptual and logical models
no universally defined data model
Lacks theoretical foundation
Relatively limited
Complex
Hierarchical DB model
upside down tree?
other than the root, each record has one parent and many children
a parent node can have >1 child
one child can only have 1 parent
Relationship is established by creating physical link between records
Consists of boxes
Drawbacks of hierarchical
can only have one to many relationship models
to add new records the DB must be refined and stored in a new form
hard to accomodate changes
Complex implementation
Requires physical data storage characteristics
Advantages of hierarchical
data sharing
simple
secure
efficient with 1:many relationships
Network data model
Made to solve the short-comings of hierarchical
Child can be connected to multiple parents
Allows many to many relationship
Disadvantage of Network Model
Complex
Not all relations can be handled by assigning them in the form of owners and members.
Relational Data Model
Uses a collection of tables to represent both data and the
relationships among those data
Can define more flexible and complex
Stores information in the form of tables
What is a tuple/attribute
a row/column