Check your solution/ technical architecture knowledge – Design DB for User Interests List on ecommerce application

Matching Technical knowledge with various business scenarios often helps us to multiply our knowledge. In this blog I have listed one of the  scenario which I came across on my experience. Read the scenario and apply your thought process to refine your knowledge.Kindly note that this is my draft version and still enhancing improve further, your suggestions and comments are most welcome.

Scenario:  Business would like to develop a e-commerce site like amazon.com, and one of the requirement is users should get list of their interested products when they first login t a system. Design DB model for this requirement, and the DB relations should explain about all the relationship across a tables.

Expected Though Process:

  1. Find out basic buliding blocks, various systems need to handshake
  2. Build solution architecture
  3. OLTP vs OLAP (RDBMS vs NOSQL)
  4. detailed technical / application architecture
  5. pros, cons of each of the approach
  6. NFR details

Answers:

User Interest data can be collected from
a. user browser behaviour
b. order history
c. user profile

RDBMS approach
Following Tables are involved
a.Users
b.UserInterest
c.product
Relationships
a.One to many between user and user interest
b.many to many between userinterst and product tables.

NOSQL Approach:

As a good alternate option, we can Leverage NOSQL databases

References

  1. http://code.tutsplus.com/articles/sql-for-beginners-part-3-database-relationships–net-8561
  2. http://codeverge.com/asp.net.sql-datasource/database-design-help/530713
  3. http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins
    sql server guide
  4. http://www.techonthenet.com/sql_server/foreign_keys/foreign_keys.php
  5. https://howtoprogramwithjava.com/database-relationships-many-many-one-one/
  6. http://www.lornajane.net/posts/2011/inner-vs-outer-joins-on-a-many-to-many-relationship

Notes:

Cross Join(outer join)- no condition, cartesian product result
natrual join – only matching common field
inner join – This query will return all of the records in the left table (table A) that have a matching record in the right table (table B).
SELECT <select_list>
FROM Table_A A
INNER JOIN Table_B B
ON A.Key = B.Key

left join – This query will return all of the records in the left table (table A) regardless if any of those records have a match in the right table (table B)
SELECT <select_list>
FROM Table_A A
LEFT JOIN Table_B B
ON A.Key = B.Key

Right join- This query will return all of the records in the right table (table B) regardless if any of those records have a match in the left table (table A)
SELECT <select_list>
FROM Table_A A
RIGHT JOIN Table_B B
ON A.Key = B.Key

Outer Join –
This Join can also be referred to as a FULL OUTER JOIN or a FULL JOIN. This query will return all of the records from both tables, joining records from the left table (table A) that match records from the right table (table B)
SELECT <select_list>
FROM Table_A A
FULL OUTER JOIN Table_B B
ON A.Key = B.Key

Left Excluding Join –
This query will return all of the records in the left table (table A) that do not match any records in the right table (table B)SELECT <select_list>
FROM Table_A A
LEFT JOIN Table_B B
ON A.Key = B.Key
WHERE B.Key IS NULL

Right Excluding JOIN
This query will return all of the records in the right table (table B) that do not match any records in the left table (table A)
SELECT <select_list>
FROM Table_A A
RIGHT JOIN Table_B B
ON A.Key = B.Key
WHERE A.Key IS NULL

Outer Excluding JOIN

his query will return all of the records in the left table (table A) and all of the records in the right table (table B) that do not match.
SELECT <select_list>
FROM Table_A A
FULL OUTER JOIN Table_B B
ON A.Key = B.Key
WHERE A.Key IS NULL OR B.Key IS NULL

 

Advertisements

Test your AEM knowledge part 2

 

  1. AEM
  2. AEM architecuture, Deployment Process
  3. Miceo Kernal
  4. Challenging Project
  5. Reverse Replication, Replication in AEM
  6. Aem Architecture
  7. Bootstrap, JackRabbit
  8. AEM 6 Features
  9. Sling vs JCR
  10. SSO
  11. Authentication Handler in AEM
  12. AEM 6 Features
  13. WCM evaluation
  14. Project Costs & Duration
  15. When you will chose Mongo MK
  16. Integrations worked on
  17. Consulting Experience
  18. How did you handle securities on AEM?
  19. How do you troubleshoot Replication Queue?
  20. How do you trobleshoot workflow issue?
  21. EventInterface
  22. Workflow api/ method
  23. no authentication / public url using dispather
  24. reverse replication
  25. dispatcher configuration
  26. mongo configurations
  27. AEM 6 features
  28. OSGi Lifecycle
  29. how service dependency solved
  30. resource merging/overlay
  31. usage of sling resource resolver in OSGi/ Servlet
  32. AEM exp
  33. pattens used in Aem
  34. service
  35. component
  36. coding best practices
  37. architectures changes added on AEM 6
  38. AEM community
  39. navigation author
  40. service creation
  41. aem community
  42. aem 6 architecture changes
  43. permission sensitive caching

 

  1. osgi service dependency
  2. dispatcher configurations vhost
  3. sling resolution selector, extensions
  4. how do access node from servlet
  5. how to handle form is AEM
  6. satisfied stage in OSGI
  7. how to cache vanity URL in AEM
  8. AEM 6 vs 561
  9. AEM cloud services
  10. How do you handle performance in AEM
  11. How do you set benchmarks for AEM application
  12. Deployment strategy / AEM 6.1 / Why not Mongo?
  13. AEM Architecture (Sling and OSGI)
  14. SlingServlet code/ OSGI Service code
  15. How session get created from Resource Resolver
  16. slingsfeservlet vs allmethodsservlet
  17. custom servlet
  18. custom agent

 

  1. probs vs evars

 

  1. how marketing cloud work with AEM ex analytics
  2. what are the essential items you check on any project for evaluation
  3. what are pros and cons of AEM
  4. 1, ecommerce various integration
  5. sightly loop
  6. performance optimization all layers
  7. AEM 6 features
  8. how https works
  9. AEM estimation questions

 

 

  1. https set up
  2. dispatacher
  3. How to use fragments in AEM
  4. AEM 6 Features
  5. AEM 6 Developer, Architectute features

 

 

  1. dispatcher – permission sensitive caching, dos prevenstion from dispathcer, allowed cleinets
  2. performance handling – for large size files like pdf
  3. sling authentication
  4. ldap/db authentication
  5. search optimization
  6. i18 folders
  7. sso, saml
  8. different anaytics for same page
  9. best practices followed
  10. psrsonalization performance, how to improve personalization

 

  1. sling dynamic include
  2. salesforce integration

 

  1. AEM 6 developers certification
  2. scene7
  3. dtm
  4. sso
  5. performance
  6. aem deploymnet models
  7. scalability
  8. dispatcher complete
  9. architecture with personalisation
  10. msm
  11. translation
  12. aem 6.2 features
  13. search enging config
  14. indexing
  15. jcr
  16. sling
  17. osgi

 

  1. all APIS – JCR(Query, ), Sling(Custom servelet), OSGI
  2. custom components
  3. Angular fundamentals
  4. AEM 6 Indexing
  5. AEM 6 Deploymnet
  6. Performance & Scalability Improvement

 

  1. AEM 6.2
  2. Procedural failover tarMK
  3. Priority Queuing
  4. Package Replication from package manager
  5. AEM content Fragments
  6. Template Editor
  7. AEM 6.1
  8. CSRF Protection for HTTP Methods
  9. Transient W/F
  10. HTTP API based on JSON+Siren
  11. Responsieve Layout
  12. AEM 6
  13. OAK
  14. Sightly
  15. Social Community

 

  1. Portal vs AEM, Sightly, Java Script API, OSGI service
  2. Complicated component developed, Video Component, Responsive Image how works on Front End?

 

  1. Integrations worked with AEM
  2. Creative Cloud and Marketing Cloud Integration
  3. AEM with Transaction based System
  4. NFR for Transaction based
  5. Performance handling
  6. WPS vs AEM
  7. JEE vs OSGI
  8. Asset Manager

 

 

 

 

Test your core java knowledge – part 2

1.How HashMap works?
2.When to override hashcode() and equals().
3.How to make an object immutable?
4.Difference between creating String new() and literal
5.Difference between abstract class and interface.
6.Difference between abstraction and encapsulation.
7.why wait() notify and notifyall() are in object class?
8.transient and volatile keywords.
9.Difference between iterator and lisiterator.(Class and interface hierarchy)
10.Deep copy and shallow copy.
11.sleep() and wait() difference.
12.access modifiers.
13.Garbage collection. how to call it? does it always work?
14.Collection Hierarchy and exception class hierarchy.
15.Why collection doesnt extend serializable and cloneable?(What are marker interfaces?)
16.Why map doesnt extend collection interface?
17.Difference between collections questions.
18.How hashset works?
19.how many Null element added in hashset and treeset.
20.Difference between implements runnable and extend thread.
21.join() and yield()
22.Writing a deadlock and resolving.
23.producer and consumer problem.
24.overriding of methods like main(),static, abstract. Overriding and overloading rules.
25.how string pool works?memory management.intern().
26.widening and narrowing in inheritance and exception classes.
27.can we override wait() or notify() methods?
28.Heapoutofmemory : reasons, fixings, best practices
29. Singleton class. singleton in multithreaded
30.executors thread pool concepts.
31.Dynamic dispatch(static binding and dynamic binding)

32.Java passby value or reference – for java script?
0.1+0.2=? Why BigDecimal, Float etc IEEE7
33.”Semapore vs Lock, which controls the thread? OS?
34.What type of mechanism followed Preemptieve. How the contect swithing happens?”
35.Spring MVC – how do you control DOS attack? Header
36.jquery – how to apply style for all paragraphs
37.single java script minimized or multiple?
38.wht stack flow error?
39.What Ioc? Why Proxy used?

Refresh your Java/JEE/SDLC/Program Management knowledge

  1. Differentiate Application Architect, Solution Architect and Enterprise Architect
  2. “What are the profile tool used?
  3. How does the profile works?”
  4. “Have you come across with
  5. any outofmemmory issues? How did you handle it?”
  6. Http over SOAP vs Http over JMS service
  7. How do you handle securtity in SOAP based and Rest Services?
  8. Explain about Estimation WBS vs Function Point
  9. What are the input used in FP?
  10. How does Agile Scrum methodology works?
  11. Benefits of Agile
  12. SDLC comparision (WaterFall vs Agile)
  13. Agile Scrum vs XP vs Test Driven Programming
  14. What are the diagrams used in Design?
  15. How do you convert functional decomposoition into Use cases and class diagram?
  16. Differntiate Portal vs Web application
  17. Tell me about one of the Tough Architecture / Design Scenario handled in your experience?
  18. What are the important aspects/diagrams need to be in Architecture Document?
  19. What is the need for Cache? Types of Caching.
  20. What are the important work for Architect?
  21. “How do you handle NFRs?
  22. What are the Design approach proposed?
  23. Conceptual Architecture diagram vs Physical Architecture diagram
  24. Where does web server runs?
  25. Why we need a firewall?
  26. What is DMZ?
  27. Microservices vs SOA
  28. Choose the best solution for the given requirement? “
  29. How can improve scalability?
  30. How do you design Scalable Application?
  31. How do you improve Performance?
  32. How do you design for creating portlet using web technologies?
  33. HTTPS
  34. What is SAML?
  35. SSO
  36. OAUTH
  37. How do you handle Cross Domain issues?
  38. XSS
  39. How encoding helps to fix XSS?
  40. SSL
  41. Java script synchrnous or not
  42. Modern SAAS Architecture for Healthcare product
  43. “Ajax vs WebSocket vs Socket.io vs Node Js
  44. Limitations on Flash and Applet
  45. Advantages of HTML5″
  46. HTTP Request Format
  47. HTTP Response Format
  48. HTTP Status Code
  49. Session Handling approach
  50. “What is Token based authentication?
  51. How does it support scalability?”
  52. xml parsers
  53. Artifacts involved in Architect and Design
  54. how do you tune object cache?
  55. how do you handle codeing standards?
  56. Continous Integration and Dev Ops
  57. technology choice and feedback
  58. Portal vs CMS, AEM personalization vs Portal
  59. App container vs Latest JS Portal vs WebSphere portal
  60. java vs java script-
  61. functional and non functional implementation on any projects
  62. Modern web applications vs traditional”
  63. How do you design saas vs hosting app
  64. Design authentication flow
  65. How do you handle scalability apart from h\w
  66. “how would you ensure to keep responsive time?
  67. How Response Time SLA is defined?”
  68. payment system – how do you prepare project plan?
  69. how LB/ webserver works
  70. “agile vs waterfall – Refer previous

 

 

  1. how do you find and manage risks?
  2. what are the challenges faced during coordination of program management?- Inter depen
  3. How does coordination works on program management? how the project plan works? Ref
  4. how do you chose project methodology for the project? agaile vs waterfall
  5. What is the one change you proposed and how it helped organisation?
  6. Top 10 facts of Program Management
  7. How metrics data collected? How does it help for any project?
  8. What are the challenges faced during your work? how did you handle it?
  9. any tools used for projects risks?
  10. “3 web services – web application scenarion transaction
  11. Global Transaction message or resource adaptor – Transaction”
  12. “Other than having Firewall, Https in place what are the things you do in your application code, to make code secure and safe from vulnerability?
  13. Specifically question was how you protect yourself from Cross Site scripting, cross site request forgery and other threats?”
  14. various types on cloud computing models?
  15. What are the various monitoring tools you have used in production?
  16. five essential characteristics of CLOUD
  17. Microservices vs SOA
  18. Sonar – Fundamentals
  19. asynchronous vs concurrency
  20. Thread dumb vs heap dumb analysis

 

Refresh Important Technical Terms

1.Proprietary vs Open source

2.Confidentiality is a set of rules that limits access to information,

3.Integrity is the assurance that the information is trustworthy and accurate

4.A digital signature is a mathematical scheme for demonstrating the authenticity of a digital message or documents. A valid digital signature gives a recipient reason to believe that the message was created by a known sender, that the sender cannot deny having sent the message (authentication and non-repudiation), and that the message was not altered in transit (integrity). Digital signatures are commonly used for software distribution, financial transactions, and in other cases where it is important to detect forgery or tampering.”

5.Whitelist (known goods). A Whitelist is a list of “”known good inputs””. A Whitelist is basically a list which says “”A, B and C is good (and everything else is bad)””.

6.Blacklist (known bads). A Blacklist is a list of “”known bad inputs””. A Blacklist is basically a list which says “”A, B and C is bad (and everything else is good)””.”

7.Encoding is the process of putting a sequence of characters (letters, numbers, punctuation, and certain symbols) into a specialized format for efficient transmission or storage. Decoding is the opposite process — the conversion of an encoded format back into the original sequence of characters.

8.UNICODE:Unicode is a character encoding standard that has widespread acceptance.Basically, “computers just deal with numbers. They store letters and other characters by assigning a number for each one. Before Unicode was invented, there were hundreds of different encoding systems for assigning these numbers. No single encoding could contain enough characters.1” This has been the problem we, in SIL, have often run into. If you are using a legacy encoding your font conflicts with the font someone in another area of the world uses. You might have an  in your font while someplace else someone used a  at the same codepoint. Your files are incompatible. Unicode provides a unique number for every character and so you do not have this problem if you use Unicode. If your document calls for U+0289  it will be clear to any computer program what the character should be.UTF-8 UTF-16 UTF-16BE UTF-16LE UTF-32 UTF-32BE UTF-32LE

9.An independent software vendor (ISV) is an organization specializing in making or selling software, designed for mass or niche markets. This is in contrast to software developed for in-house use only within an organization or software designed or adapted for a single, specific customer.

10. “Itempotent : An operation is idempotent if invoking it once has the same effect as invoking it more than once”

11. Memcached (Mem-Cache-D) is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

12. The CAP theorem states that out of three basic properties — Consistency, Availability and Partition Tolerance — only two are achievable at any given time in a distributed system.

13. The same-origin policy restricts how a document or script loaded from one origin can interact with a resource from another origin. It is a critical security mechanism for isolating potentially malicious documents.Two pages have the same origin if the protocol, port (if one is specified), and host are the same for both pages.

14.According to the Microsoft Developer Network, HttpOnly is an additional flag included in a Set-Cookie HTTP response header. Using the HttpOnly flag when generating a cookie helps mitigate the risk of client side script accessing the protected cookie (if the browser supports it).Nov 12, 2014

14. HATEOAS, an abbreviation for Hypermedia as the Engine of Application State, is a constraint of the REST application architecture that distinguishes it from most other network application architectures. The principle is that a client interacts with a network application entirely through hypermedia provided dynamically by application servers. A REST client needs no prior knowledge about how to interact with any particular application or server beyond a generic understanding of hypermedia. By contrast, in a service-oriented architecture (SOA), clients and servers interact through a fixed interface shared through documentation or an interface description language (IDL).

15.Web Distributed Authoring and Versioning (WebDAV) is an extension of the Hypertext Transfer Protocol (HTTP) that allows clients to perform remote Web content authoring operations.The WebDAV protocol provides a framework for users to create, change and move documents on a server, typically a web server or web share.

16. Interoperable – support with multiple devices

17.The Internet of Things (IoT), also called Internet of Everything[1] or Network of Everything,[2] is the network of physical objects or “things” embedded with electronics, software, sensors, and connectivity to enable objects to exchange data with the production, operator and/or other connected devices based on the infrastructure of International Telecommunication Union’s Global Standards Initiative.[3]

18.A distributed system is a software system in which components located on networked computers communicate and coordinate their actions by passing messages. The components interact with each other in order to achieve a common goal.

19.Throughput is a term used in information technology that indicates how many units of information can be processed in a set amount of time.

20.Interoperability is a property of a product or system, whose interfaces are completely understood, to work with other products or systems, present or future, without any restricted access or implementation.[

21.A bit (short for binary digit) is the smallest unit of data in a computer. A bit has a single binary value, either 0 or 1. Although computers usually provide instructions that can test and manipulate bits, they generally are designed to store data and execute instructions in bit multiples called bytes.

22.”Structural Pattern – simplest way realize relationship between objects, how to glue different pieces together in a flexible and extensible fashion. loose coupling. Adaptor, bridge, composition, facade,flyweight, proxy

23. Behavioural Pattern – concerned with assiging responsibilities between objects, encapsulating behaviour in object itself, communicate between objects.Decouple senders and recievers. How a group of peers objects can perform a task. chain of responsibility, state, strategy, command, interpretor, mediator, observer, template, visitor”

24. PolyGlot:

Test your Database knowledge

  1. Explain about Normalization. What type of Normalization you used?
  2. How do you design tables?
  3. How the Transactions are happening with DB?
  4. schema design for multi tenant DB
  5. Design Entitlement DB using SQL, NoSQL
  6. JS UI Unit Testing
  7. How Jquery works
  8. how do you handle transactions at clientside?
  9. ajax limitation
  10. How did you record user action on various workflows?
  11. Why you choose JQuery at front end….what are the different framework/ libraries you evaluated before using it?

Refresh your knowledge on Architecture, Design and OOP Patterns

  1. Explain about Architectural Pattern
  2. “Diff between Architectural Pattern
  3. vs Design PatternHow many design pattern you have used in your design and explain me one?”
  4. What is Micro services?
  5. “Tools / Technologies used
  6. to build Microservices”
  7. Diff Architectural pattern vs Style
  8. Integration patterns. Explain about few EAI patterns?
  9. “What are the ways application
  10. can be integrated(Integration styles)?
  11. What are the other way of integration apart from Webservices? Explain Application Integration”
  12. Client side agregation vs Server Side aggregation. What are the options available for client side aggregation.
  13. ” What are the web features
  14. you have used in expereince?”
  15. Patterns used in EJB
  16. Business Delegate vs Session Façade
  17. What is Microkernal Pattern?
  18. What is ESB? Why ESB? What is MOM?
  19. ESB vs Message Broker
  20. Prototype Pattern
  21. Desing pattern s used in app
  22. What are the architectural frameworks or tools you have used so far?
  23. Business Delegate vs Session Façade
  24. Architectural Pattern vs Design Patterns

 

Architectural Patterns
From Mud to Structure Pipe and Filter, Layer, BlackBoard Layer – Protocol, JVM, API,Windows NT
Distributed Broker, Pipe and Filter, MicroKernal
Interactieve MVC, Presentation Abstraction
Adaptable MicroKernal, Reflection

Refresh your knowledge on JEE

  1. JSF vs Struts
  2. Ibatis vs Hibernate
  3. “messahing basis –
  4. MDB vs Message Listener
  5. MDB step by step
  6. counter in servlet
  7. ejb concurrency
  8. jpa ORM mapping with example
  9. “EAR structure
  10. WAR
  11. JAR”
  12. http session resource is very low – scaling.
  13. Draw Deployment diagram for your last application.
  14. “Client doesn’t want to use Spring or JEE, what you
  15. will recommend him to use?”
  16. “On technologies selection…what practice you use to select various technologies?
  17. 2 Various question on reason for selecting specific tool or technology in my current project.”
  18. Have to use JMX in real production application?
  19. Why do we need to have init method in servlet?
  20. “Were you passing some special token in web service request….I said yes….do you remember that token value? ………as per my knowledge he was referring to encrypted

values of username and password…”