Database Related Flashcards
Database related cards
What is CAP theorem
A dis distributed system can only have two of consistency, availability or partition tolerance
What CAP theorem characteristics does relation database has?
Availability and Consistancy
What are the types of database consistency? What consistency type do relational databases have? What about nonrelational DBS?
Types of consistency
1. Strict consistency 2. Eventual Consistency
RelationsDBs have strict consistency. (changes are reflected immediately)
nonrelational DBS Eventual Consistency(changes are not reflected immediately)
What is serialiazable interface in java
Serializable is a marker interface your classes must implement if they are to be serialized and deserialized.
Serialization in Java allows us to convert an Object to a stream that we can send over the network or save it as file or store in DB for later usage.
What is Referential integrity
Referential integrity is a property of data stating that all its references are valid. In the context of relational databases, it requires that if a value of one attribute (column) of a relation (table) references a value of another attribute (either in the same or a different relation), then the referenced value must exist